public class Property extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.jboss.forge.parser.java.Method<org.jboss.forge.parser.java.JavaClass> |
getAccessor()
Returns a reference to the accessor
Method instance for this property. |
org.jboss.forge.parser.java.Field<org.jboss.forge.parser.java.JavaClass> |
getActualField()
Returns a reference to the
Field instance represented by the property. |
org.jboss.forge.parser.java.Method<org.jboss.forge.parser.java.JavaClass> |
getMutator()
Returns a reference to the mutator
Method instance for this property. |
String |
getName()
The name of the property as governed by the JavaBeans property naming convention.
|
String |
getQualifiedType()
Retrieves the qualified name of the
Type corresponding to the property. |
String |
getSimpleType()
Retrieves the simple name of the
Type corresponding to the property. |
org.jboss.forge.parser.java.Type<?> |
getType()
Retrieves the
Type of the property. |
boolean |
hasAnnotation(Class<? extends Annotation> klass)
Verifies whether the provided annotation is present on the property.
|
boolean |
hasAnnotation(Class<? extends Annotation> klass,
ElementType type)
Verifies whether the provided annotation is present on the property at the level of the field or the accessor.
|
int |
hashCode() |
boolean |
isPrimitive()
Indicates whether the underlying field or the accessor returns a Java language primitive type.
|
boolean |
isReadable()
Indicates whether a property can be read from via a getter, or not.
|
boolean |
isReadOnly()
Indicates whether a property is read only or not.
|
boolean |
isTransient()
Indicates whether the property is transient or not.
|
boolean |
isWritable()
Indicates whether a property can be writter to via a setter, or not.
|
boolean |
isWriteOnly()
Indicates whether a property is write only or not.
|
public Property(String name)
public String getName()
getX() then the property name is 'X' (without quotes).
Boolean property getters starting with 'is' are also considered - isX() corresponds to a property
named 'X'.public org.jboss.forge.parser.java.Field<org.jboss.forge.parser.java.JavaClass> getActualField()
Field instance represented by the property.public org.jboss.forge.parser.java.Method<org.jboss.forge.parser.java.JavaClass> getAccessor()
Method instance for this property.public org.jboss.forge.parser.java.Method<org.jboss.forge.parser.java.JavaClass> getMutator()
Method instance for this property.public boolean isReadable()
public boolean isWritable()
public boolean isReadOnly()
public boolean isWriteOnly()
public boolean hasAnnotation(Class<? extends Annotation> klass)
klass - The annotation class whose presence is to be verifiedpublic boolean hasAnnotation(Class<? extends Annotation> klass, ElementType type)
klass - The annotation class whose presence is to be verifiedtype - The ElementType at which the annotation should be specified. Should be either
ElementType.FIELD or ElementType.METHOD.public boolean isTransient()
public org.jboss.forge.parser.java.Type<?> getType()
Type of the property.Type of the propertypublic String getSimpleType()
Type corresponding to the property.Type.public String getQualifiedType()
Type corresponding to the property.Type.public boolean isPrimitive()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.