public class PropertyImpl extends AnnotatedElementImpl implements JProperty
Implementation of JProperty.
NO_ANNOTATION, NO_CLASS, NO_COMMENT, NO_CONSTRUCTOR, NO_FIELD, NO_METHOD, NO_NODE, NO_PACKAGE, NO_PARAMETER, NO_PROPERTY| Constructor and Description |
|---|
PropertyImpl(String name,
JMethod getter,
JMethod setter,
String qualifiedTypeName)
You'll usually want to use the getProperties() factory method
instead of constructing JProperties yourself.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(JVisitor visitor)
Accepts the given visitor.
|
void |
accept(MVisitor visitor) |
JAnnotation |
getAnnotation(String named)
Returns the first annotation with the given name that is found on
this property's getter and/or setters.
|
JAnnotation[] |
getAnnotations()
Returns all of the annotations on the getter and/or the setter
methods.
|
JComment |
getComment()
Returns the comment associated with this abstraction.
|
JMethod |
getGetter()
Returns a JMethod which represents the getter for this property.
|
String |
getQualifiedName()
Returns the simple name of this property.
|
JMethod |
getSetter()
Returns a JMethod which represents the setter for this property.
|
String |
getSimpleName()
Returns the simple name of this property.
|
JSourcePosition |
getSourcePosition()
Returns an object describing the source file position of this
elements, or null if the position is unknown on not applicable.
|
JClass |
getType()
Returns a JClass which represents the type of this property.
|
void |
setGetter(JMethod method) |
void |
setSetter(JMethod method)
Returns annotations with the given name that are found on this
property's getter and/or setter.
|
String |
toString()
Returns the same String as getQualifiedName().
|
addAnnotationForProxy, addLiteralAnnotation, createComment, findOrCreateAnnotation, getAllJavadocTags, getAnnotation, getAnnotationProxy, getAnnotationValue, getEditableProxy, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeAnnotation, removeCommentcompareTo, createSourcePosition, defaultName, equals, getArtifact, getClassLoader, getContext, getMutableSourcePosition, getParent, hashCode, removeSourcePosition, setArtifact, setSimpleNamegetAllJavadocTags, getAnnotation, getAnnotationProxy, getAnnotationValuegetArtifact, getParentcreateSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleNamepublic PropertyImpl(String name, JMethod getter, JMethod setter, String qualifiedTypeName)
You'll usually want to use the getProperties() factory method instead of constructing JProperties yourself. This constructor is exposed just in case the default rules in the factory method for identifying properties are insufficient for some use case.
public JClass getType()
public String getSimpleName()
getSimpleName in interface JElementgetSimpleName in class ElementImplpublic String getQualifiedName()
getQualifiedName in interface JElementpublic JMethod getSetter()
public JMethod getGetter()
public JAnnotation[] getAnnotations()
getAnnotations in interface JAnnotatedElementgetAnnotations in class AnnotatedElementImplpublic void setSetter(JMethod method)
public void setGetter(JMethod method)
public JAnnotation getAnnotation(String named)
getAnnotation in interface JAnnotatedElementgetAnnotation in class AnnotatedElementImplpublic JComment getComment()
JAnnotatedElementReturns the comment associated with this abstraction. Returns null if it has no comment.
getComment in interface JAnnotatedElementgetComment in class AnnotatedElementImplpublic JSourcePosition getSourcePosition()
JElementgetSourcePosition in interface JElementgetSourcePosition in class ElementImplpublic void accept(JVisitor visitor)
JElementAccepts the given visitor.
public String toString()
JElementReturns the same String as getQualifiedName().
toString in interface JElementtoString in class ElementImplCopyright © 2010 - 2020 Adobe. All Rights Reserved