public class PropertyDeclaration extends Object implements MemberDeclaration
| Modifier | Constructor and Description | 
|---|---|
| protected  | PropertyDeclaration(ModelSymbol owner,
                   AstNode originalAst,
                   AstSimpleName name,
                   Type type,
                   AstDescription description,
                   List<? extends AstAttribute> attributes)Creates and returns a new instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| AstNode | getOriginalAst()Returns the corresponded syntactic element of this. | 
| ModelSymbol | getOwner()Returns owner of this member. | 
| PropertySymbol | getSymbol()Returns the symbol refer to this declaration. | 
| <T extends Trait<T>> | getTrait(Class<T> kind)Returns the specified trait of this declaration. | 
| Type | getType()Returns the type of this property. | 
| <T extends Trait<T>> | putTrait(Class<T> kind,
        T trait)Puts a trait into this declaration. | 
| String | toString() | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindTraitprotected PropertyDeclaration(ModelSymbol owner, AstNode originalAst, AstSimpleName name, Type type, AstDescription description, List<? extends AstAttribute> attributes)
owner - the owner symboloriginalAst - the original AST, or null if this is an ad-hoc elementname - the name of this propertytype - the type of this propertydescription - the description of this property, or null if unknownattributes - the attributes of this propertyIllegalArgumentException - if some parameters were nullpublic AstNode getOriginalAst()
ElementgetOriginalAst in interface Elementnull if unknownpublic AstSimpleName getName()
DeclarationgetName in interface Declarationpublic Type getType()
public AstDescription getDescription()
DeclarationgetDescription in interface Declarationnull not defindpublic List<AstAttribute> getAttributes()
DeclarationIf not attributes are attached, this returns an empty list.
getAttributes in interface Declarationpublic ModelSymbol getOwner()
MemberDeclarationgetOwner in interface MemberDeclarationpublic PropertySymbol getSymbol()
public <T extends Trait<T>> T getTrait(Class<T> kind)
DeclarationgetTrait in interface DeclarationT - type of traitkind - the kind of traitnull if not putpublic <T extends Trait<T>> void putTrait(Class<T> kind, T trait)
DeclarationputTrait in interface DeclarationT - type of traitkind - the kind of traittrait - the traits to put, or null to removeCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.