public class LocalVarProperty extends SimpleProperty implements IProperty2
SimpleProperty2
, but has been externalized
for performance and maintainability reasons.)Constructor and Description |
---|
LocalVarProperty(String property) |
Modifier and Type | Method and Description |
---|---|
Object |
get(IPropertySource source,
boolean instantiateAll)
Introspects source to retrieve property value.
|
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.
|
boolean |
isGlobalVar()
This property is an access to global variable.
|
boolean |
isLocalVar()
This property is an access to local variable.
|
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 |
isVar()
This property is an access to local or global variable.
|
boolean |
isWriteable(IPropertySource target)
Tries to detect if the property will be able to be written in theory, knowing the argument type to use.
|
void |
optimize(ICompilationContext ctxt,
IPropertySource source)
Allows to optimize access if target type is known.
|
void |
parentWasRegistered(ICompilationContext ctxt,
IAddon parent)
Notifies this property that the owner has been registered in compilation context.
|
Object |
set(IPropertySource target,
Object obj,
boolean instanciateNested)
Introspects target to set property value.
|
equals, getProperty, getReadMethod, getWriteMethod, getWriteMethodParamType, handleGetFromMap, handleSetInTypedMap, hashCode, toString
get, getGenericCollectionType, getGenericMapKeyType, getGenericMapValueType, getGenericTypes, getType, isReadable, isWriteable, set
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
get, getGenericCollectionType, getGenericMapKeyType, getGenericMapValueType, getGenericTypes, getType, isReadable, isWriteable, set
public LocalVarProperty(String property)
public Object get(IPropertySource source, boolean instantiateAll) throws UtilsException
IProperty
get
in interface IProperty
get
in class SimpleProperty
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 SimpleProperty
target
- Source context to introspect.obj
- Value to setinstanciateNested
- whether to try or not to instantiate null nested properties values.UtilsException
public boolean isReadable(IPropertySource source) throws UtilsException
IProperty
isReadable
in interface IProperty
isReadable
in class SimpleProperty
source
- Source context to introspect.UtilsException
public boolean isWriteable(IPropertySource target) throws UtilsException
IProperty
isWriteable
in interface IProperty
isWriteable
in class SimpleProperty
target
- Source context to introspect.UtilsException
public Class<?> getType(IPropertySource source) throws UtilsException
IProperty
getType
in interface IProperty
getType
in class SimpleProperty
source
- Source context to introspect.UtilsException
public Class<?> getGenericCollectionType(IPropertySource source)
IProperty
getGenericCollectionType
in interface IProperty
getGenericCollectionType
in class SimpleProperty
source
- Source context to introspect.public Class<?>[] getGenericTypes(IPropertySource source) throws UtilsException
IProperty
getGenericTypes
in interface IProperty
getGenericTypes
in class SimpleProperty
source
- Source context to introspect.UtilsException
public Class<?> getGenericMapKeyType(IPropertySource source) throws UtilsException
IProperty
getGenericMapKeyType
in interface IProperty
getGenericMapKeyType
in class SimpleProperty
source
- Source context to introspect.UtilsException
public Class<?> getGenericMapValueType(IPropertySource source) throws UtilsException
IProperty
getGenericMapValueType
in interface IProperty
getGenericMapValueType
in class SimpleProperty
source
- Source context to introspect.UtilsException
public boolean isVar()
IProperty2
isVar
in interface IProperty2
public boolean isLocalVar()
IProperty2
isLocalVar
in interface IProperty2
public boolean isGlobalVar()
IProperty2
isGlobalVar
in interface IProperty2
public void optimize(ICompilationContext ctxt, IPropertySource source) throws MRuleValidationException
IProperty2
optimize
in interface IProperty2
ctxt
- Compilation contextsource
- Target type.MRuleValidationException
public void parentWasRegistered(ICompilationContext ctxt, IAddon parent)
IProperty2
parentWasRegistered
in interface IProperty2