|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.data.model.property.PropertyHelper
public final class PropertyHelper
A helper class for manipulating properties.
| Constructor Summary | |
|---|---|
PropertyHelper()
|
|
| Method Summary | |
|---|---|
static MetaPropertyManager |
constructMetaPropertyManagerForClass(Class<? extends Identifiable> clazz)
Returns a MetaPropertyManager initialized with MetaPermanentProperty'ies and
MetaTransientProperty'ies defined (annotated) in given class. |
static Collection<MetaPermanentProperty> |
extractMetaPermanentProperties(Class<? extends Identifiable> clazz)
Returns a collection of MetaPermanentProperty'ies defined for given class. |
static Collection<MetaTransientProperty> |
extractMetaTransientProperties(Class<? extends Identifiable> clazz)
Returns a collection of MetaTransientProperty'ies defined for given class. |
static boolean |
isValidPropertyName(String name)
Checks if given name is a valid Property name. |
static boolean |
verifyGetterSignature(Method method,
Class<?> type)
Checks if given method has valid getter signature for given type. |
static boolean |
verifySetterSignature(Method method,
Class<?> type)
Checks if given method has valid setter signature for given type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyHelper()
| Method Detail |
|---|
public static boolean isValidPropertyName(String name)
Property name.
name - the name to check
true if the name is valid for a property, false otherwise
IllegalArgumentException - if given name is null
public static Collection<MetaPermanentProperty> extractMetaPermanentProperties(Class<? extends Identifiable> clazz)
throws PropertyAnnotationException
MetaPermanentProperty'ies defined for given class.
clazz - class to extract permanent properties from
PropertyAnnotationException - when property annotations are invalid
public static Collection<MetaTransientProperty> extractMetaTransientProperties(Class<? extends Identifiable> clazz)
throws PropertyAnnotationException
MetaTransientProperty'ies defined for given class.
clazz - class to extract transient properties from
PropertyAnnotationException - when property annotations are invalid
public static MetaPropertyManager constructMetaPropertyManagerForClass(Class<? extends Identifiable> clazz)
throws PropertyAnnotationException
MetaPropertyManager initialized with MetaPermanentProperty'ies and
MetaTransientProperty'ies defined (annotated) in given class.
clazz - class to extract permanent and transient properties from
MetaPropertyManager with permanent and transient properties from clazz
PropertyAnnotationException - when property annotations are invalid
public static boolean verifyGetterSignature(Method method,
Class<?> type)
method - the method to checktype - the expected return type
true if method is a getter of type
public static boolean verifySetterSignature(Method method,
Class<?> type)
method - the method to checktype - the type to set
true if method is a setter of type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||