public interface Declaration extends Element
Modifier and Type | Method and Description |
---|---|
default <T extends Trait<T>> |
findTrait(Class<T> kind)
Returns the specified trait of this declaration.
|
List<AstAttribute> |
getAttributes()
Returns the attached attributes of this element.
|
AstDescription |
getDescription()
Returns the description of this element.
|
AstSimpleName |
getName()
Returns the name of this declared element.
|
<T extends Trait<T>> |
getTrait(Class<T> kind)
Returns the specified trait of this declaration.
|
<T extends Trait<T>> |
putTrait(Class<T> kind,
T trait)
Puts a trait into this declaration.
|
getOriginalAst
AstSimpleName getName()
AstDescription getDescription()
null
not defindList<AstAttribute> getAttributes()
If not attributes are attached, this returns an empty list.
<T extends Trait<T>> T getTrait(Class<T> kind)
T
- type of traitkind
- the kind of traitnull
if not putIllegalArgumentException
- if some parameters were null
default <T extends Trait<T>> Optional<T> findTrait(Class<T> kind)
T
- type of traitkind
- the kind of traitIllegalArgumentException
- if some parameters were null
<T extends Trait<T>> void putTrait(Class<T> kind, T trait)
T
- type of traitkind
- the kind of traittrait
- the traits to put, or null
to removeIllegalArgumentException
- if some parameters were null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.