|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bm.introspectors.Property
public class Property
Every persistent property of a EJB3 entity bean can be defined as field access or method access (using setter/getters). The property class abstracts from the access method and represtets a field (AccessType.FIELD) OR getter/setter (AccessType.PROPERTY)
| Constructor Summary | |
|---|---|
Property(java.lang.Class declaringClass,
java.beans.PropertyDescriptor property)
Contructor using getter/setter access. |
|
Property(java.lang.reflect.Field fieldName)
Contructor uing field access. |
|
Property(FieldAnnotationMetadata metaData)
Contructor using field access. |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(java.lang.Object other)
Equals. |
|
|
getAnnotation(java.lang.Class<T> annnotation)
Returns a annotation for the current property if present. |
|
java.lang.Class |
getDeclaringClass()
Returns the class where the property is declared. |
|
java.lang.Object |
getField(java.lang.Object instance)
Returns a value of an field. |
|
java.lang.reflect.Type |
getGenericType()
Returns the generic Type of this property. |
|
java.lang.Class<java.lang.Object> |
getGenericTypeClass()
If the propety represents a genericType (e.g. |
|
java.lang.String |
getName()
Return the name. |
|
java.beans.PropertyDescriptor |
getProperty()
Returns the property. |
|
java.lang.String |
getPropertyName()
Returns null if the accestype is field. |
|
java.lang.Class |
getType()
Returns the type of the property. |
|
int |
hashCode()
Hash Code. |
|
void |
setField(java.lang.Object instance,
java.lang.Object value)
Sets a value of the field / getterMethod. |
|
java.lang.String |
toString()
To String. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Property(java.lang.Class declaringClass,
java.beans.PropertyDescriptor property)
declaringClass - -
the class wich declares the propertyproperty - -
the property descriptorpublic Property(FieldAnnotationMetadata metaData)
metaData - the ejb3 metadata informationpublic Property(java.lang.reflect.Field fieldName)
fieldName - -
der name des feldes| Method Detail |
|---|
public void setField(java.lang.Object instance,
java.lang.Object value)
throws java.lang.IllegalAccessException
instance - -
the instance (Typed)value - -
the new value
java.lang.IllegalAccessException - -
in error case
public java.lang.Object getField(java.lang.Object instance)
throws java.lang.IllegalAccessException
instance - -
the instance
java.lang.IllegalAccessException - -
in error casepublic java.lang.Class getType()
public java.lang.reflect.Type getGenericType()
public java.lang.Class<java.lang.Object> getGenericTypeClass()
public java.lang.String getName()
public java.lang.Class getDeclaringClass()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other to compare
Object.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.beans.PropertyDescriptor getProperty()
public java.lang.String getPropertyName()
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annnotation)
T - the annotation type.annnotation - the annotation class
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||