public class StaticFieldProperty extends StrictFieldProperty
Constructor and Description |
---|
StaticFieldProperty(String accessedClassName,
String property) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
get(IPropertySource source,
boolean instantiateAll)
Introspects source to retrieve property value.
|
String |
getAccessedClassName() |
Class<?> |
getDeclaringClass() |
protected IFieldAccessor |
getField(IPropertySource source,
boolean mandatory) |
Class<?> |
getGenericCollectionType(IPropertySource source)
Tries to detect if the generic type of the property if the type is a Collection, knowing the argument type to use.
|
Class<?> |
getGenericMapKeyType(IPropertySource source)
Tries to detect if the generic key type of the property if the type is a Map, knowing the argument type to use.
|
Class<?> |
getGenericMapValueType(IPropertySource source)
Tries to detect if the generic value type of the property if the type is a Map, knowing the argument type to use.
|
Class<?>[] |
getGenericTypes(IPropertySource source)
Tries to detect if the parameterized types of the property, whatever its type is, knowing the argument type to use.
|
Class<?> |
getType(IPropertySource source)
Tries to detect if the type of the property, knowing the argument type to use.
|
int |
hashCode() |
boolean |
isReadable(IPropertySource source)
Tries to detect if the property will be able to be read in theory, knowing the argument type to use.
|
boolean |
isWriteable(IPropertySource target)
Tries to detect if the property will be able to be written in theory, knowing the argument type to use.
|
protected Class<?> |
loadClass(String name) |
Object |
set(IPropertySource target,
Object obj,
boolean instanciateNested)
Introspects target to set property value.
|
String |
toString() |
getProperty
get, getGenericCollectionType, getGenericMapKeyType, getGenericMapValueType, getGenericTypes, getType, isReadable, isWriteable, set
public String getAccessedClassName()
public Class<?> getDeclaringClass() throws UtilsException
UtilsException
protected Class<?> loadClass(String name) throws UtilsException
UtilsException
public Object get(IPropertySource source, boolean instantiateAll) throws UtilsException
IProperty
get
in interface IProperty
get
in class StrictFieldProperty
source
- Source context to introspect.instantiateAll
- whether to try or not to instantiate null nested properties values.UtilsException
public Object set(IPropertySource target, Object obj, boolean instanciateNested) throws UtilsException
IProperty
set
in interface IProperty
set
in class StrictFieldProperty
target
- Source context to introspect.obj
- Value to setinstanciateNested
- whether to try or not to instantiate null nested properties values.UtilsException
IProperty.set(IPropertySource, Object, boolean)
public Class<?> getType(IPropertySource source) throws UtilsException
IProperty
getType
in interface IProperty
getType
in class StrictFieldProperty
source
- Source context to introspect.UtilsException
public Class<?>[] getGenericTypes(IPropertySource source) throws UtilsException
IProperty
getGenericTypes
in interface IProperty
getGenericTypes
in class StrictFieldProperty
source
- Source context to introspect.UtilsException
public Class<?> getGenericCollectionType(IPropertySource source) throws UtilsException
IProperty
getGenericCollectionType
in interface IProperty
getGenericCollectionType
in class StrictFieldProperty
source
- Source context to introspect.UtilsException
public Class<?> getGenericMapKeyType(IPropertySource source) throws UtilsException
IProperty
getGenericMapKeyType
in interface IProperty
getGenericMapKeyType
in class StrictFieldProperty
source
- Source context to introspect.UtilsException
public Class<?> getGenericMapValueType(IPropertySource source) throws UtilsException
IProperty
getGenericMapValueType
in interface IProperty
getGenericMapValueType
in class StrictFieldProperty
source
- Source context to introspect.UtilsException
public boolean isReadable(IPropertySource source) throws UtilsException
IProperty
isReadable
in interface IProperty
isReadable
in class StrictFieldProperty
source
- Source context to introspect.UtilsException
public boolean isWriteable(IPropertySource target) throws UtilsException
IProperty
isWriteable
in interface IProperty
isWriteable
in class StrictFieldProperty
target
- Source context to introspect.UtilsException
protected IFieldAccessor getField(IPropertySource source, boolean mandatory) throws UtilsException
getField
in class StrictFieldProperty
UtilsException
public String toString()
toString
in class StrictFieldProperty
public boolean equals(Object o)
equals
in class StrictFieldProperty
public int hashCode()
hashCode
in class StrictFieldProperty