|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ckkloverdos.beans.JavaBeanProperty
public class JavaBeanProperty
A generic representation of a JavaBean property.
It provides utility methods to retrieve its accessor, either
as property names (getPropertyAccessor(boolean)
) or as getter method calls (getReadMethodAccesor(boolean)
).
This is useful in a scripting or code generation environment.
Constructor Summary | |
---|---|
JavaBeanProperty(java.lang.Class c)
Constructs a JavaBeanProperty for the given class c . |
|
JavaBeanProperty(java.lang.Class c,
JavaTypeRegistry typeRegistry)
Constructs a JavaBeanProperty for the given class c ,
using the typeRegistry to resolve types . |
|
JavaBeanProperty(java.lang.String name,
java.lang.Class c,
JavaTypeRegistry typeRegistry)
Constructs a JavaBeanProperty for the given class c ,
using the typeRegistry to resolve types and
name as the property name. |
Method Summary | |
---|---|
java.lang.String |
getFullName()
Returns the fully qualified name of this property. |
java.lang.String |
getFullName(boolean includeTopParent)
Returns the fully qualified name of this property, with the option to include the top parent name in it. |
NameAndType |
getFullNameType()
|
NameAndType |
getFullNameType(boolean includeTopParent)
|
java.lang.Class |
getJavaClass()
Returns the java class of this property. |
java.lang.String |
getName()
Returns the non-qualified name of this property. |
NameAndType |
getNameType()
|
JavaBeanProperty |
getParent()
Returns the parent property. |
JavaBeanProperty[] |
getProperties()
Returns the sub-properties. |
JavaBeanProperty |
getProperty(java.lang.String name)
Returns the name d sub-property of the property represented by this instance. |
java.lang.String |
getPropertyAccessor(boolean fullyQualified)
Returns an accessor for this property, based on direct property access. |
java.lang.String |
getPropertyAccessor(boolean fullyQualified,
boolean includeTopParent)
Returns an accessor for this property, based on direct property access. |
java.lang.String |
getReadMethodAccesor(boolean fullyQualified)
Returns an accessor for this property, based on read method calls. |
java.lang.String |
getReadMethodAccesor(boolean fullyQualified,
boolean includeTopParent)
Returns an accessor for this property, based on read method calls. |
java.lang.String |
getReadMethodName()
Returns the method name used to read this property. |
JavaType |
getType()
Returns the type of this property. |
JavaTypeRegistry |
getTypeRegistry()
Returns the JavaTypeRegistry given in
this
or the other
constructor. |
boolean |
hasProperty(java.lang.String name)
Returns true iff name is a sub-property of the property represented by this instance. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JavaBeanProperty(java.lang.Class c)
JavaBeanProperty
for the given class c
.
The name of the property is the empty string.
c
- public JavaBeanProperty(java.lang.Class c, JavaTypeRegistry typeRegistry)
JavaBeanProperty
for the given class c
,
using the typeRegistry
to resolve types
.
The name of the property is the empty string.
c
- typeRegistry
- public JavaBeanProperty(java.lang.String name, java.lang.Class c, JavaTypeRegistry typeRegistry)
JavaBeanProperty
for the given class c
,
using the typeRegistry
to resolve types
and
name
as the property name.
name
- c
- typeRegistry
- Method Detail |
---|
public JavaTypeRegistry getTypeRegistry()
JavaTypeRegistry
given in
this
or the other
constructor.
public JavaBeanProperty[] getProperties()
public JavaBeanProperty getParent()
public java.lang.String getName()
public JavaType getType()
public NameAndType getNameType()
public NameAndType getFullNameType()
public NameAndType getFullNameType(boolean includeTopParent)
public java.lang.String getFullName()
getProperty(String)
calls, then the whole property hierarchy will appear in the full name.
public java.lang.String getFullName(boolean includeTopParent)
includeTopParent
- public java.lang.Class getJavaClass()
public java.lang.String getReadMethodName()
public boolean hasProperty(java.lang.String name)
true
iff name
is a sub-property of the property represented by this instance.
name
- public java.lang.String getPropertyAccessor(boolean fullyQualified)
fullyQualified
- public java.lang.String getPropertyAccessor(boolean fullyQualified, boolean includeTopParent)
fullyQualified
- includeTopParent
- public java.lang.String getReadMethodAccesor(boolean fullyQualified)
fullyQualified
- public java.lang.String getReadMethodAccesor(boolean fullyQualified, boolean includeTopParent)
fullyQualified
- includeTopParent
- public JavaBeanProperty getProperty(java.lang.String name)
name
d sub-property of the property represented by this instance.
name
- public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |