public class PropertyReferenceDeclaration extends Object implements MemberDeclaration
| Modifier and Type | Class and Description |
|---|---|
static interface |
PropertyReferenceDeclaration.ReferenceContainer<E>
Represents a reference container.
|
static class |
PropertyReferenceDeclaration.ReferenceKind
Represents a reference kind.
|
static class |
PropertyReferenceDeclaration.ReferenceList
Represents a reference list.
|
static class |
PropertyReferenceDeclaration.ReferenceMap
Represents a reference association list.
|
| Constructor and Description |
|---|
PropertyReferenceDeclaration(AstNode originalAst,
ModelSymbol owner,
AstSimpleName name,
Type referentType,
PropertyReferenceDeclaration.ReferenceContainer<?> reference,
AstDescription description,
List<? extends AstAttribute> attributes)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static PropertyReferenceDeclaration.ReferenceList |
container(List<? extends PropertySymbol> symbols)
Returns an instance for the target references.
|
static PropertyReferenceDeclaration.ReferenceMap |
container(Map<String,? extends PropertySymbol> symbols)
Returns an instance for the target references.
|
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.
|
PropertyReferenceDeclaration.ReferenceContainer<?> |
getReference()
Returns the reference.
|
<T extends Trait<T>> |
getTrait(Class<T> kind)
Returns the specified trait of this declaration.
|
Type |
getType()
Returns the type of each referent property.
|
<T extends Trait<T>> |
putTrait(Class<T> kind,
T trait)
Puts a trait into this declaration.
|
static PropertyReferenceDeclaration.ReferenceContainer<?> |
stub(PropertyReferenceDeclaration.ReferenceKind kind)
Returns a stub instance.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindTraitpublic PropertyReferenceDeclaration(AstNode originalAst, ModelSymbol owner, AstSimpleName name, Type referentType, PropertyReferenceDeclaration.ReferenceContainer<?> reference, 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 referencereferentType - the type of referent propertiesreference - the reference containerdescription - the description of this reference, or null if unknownattributes - the attributes of this referenceIllegalArgumentException - if some parameters were nullpublic AstNode getOriginalAst()
ElementgetOriginalAst in interface Elementnull if unknownpublic AstSimpleName getName()
DeclarationgetName in interface Declarationpublic Type getType()
public PropertyReferenceDeclaration.ReferenceContainer<?> getReference()
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 <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 removepublic static PropertyReferenceDeclaration.ReferenceList container(List<? extends PropertySymbol> symbols)
symbols - the referencespublic static PropertyReferenceDeclaration.ReferenceMap container(Map<String,? extends PropertySymbol> symbols)
symbols - the referencespublic static PropertyReferenceDeclaration.ReferenceContainer<?> stub(PropertyReferenceDeclaration.ReferenceKind kind)
kind - the container kindCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.