Package com.iizix.prop
Class MethodReference
- All Implemented Interfaces:
EventListener
,IGProp<String>
,Cloneable
- Direct Known Subclasses:
EditorMethodReference
The Method Reference property class hold the reference to a Method that is in a Java class. This Java class reference "ClassReference" is held by a parent container in the tree. It includes support for Java Refactoring in Eclipse as well as Reference Validation.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionprotected String
The required annotation, or null for none.protected Method
The method for runtime, null for none.Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a Method Reference property with no name and with a null value.MethodReference
(Atom propertyAtom) Creates a Method Reference property with the specified name with a null value.MethodReference
(Atom propertyAtom, String newValue) Creates a Class Reference property with the specified name and value.Method Summary
Modifier and TypeMethodDescriptionprotected boolean
equalsErrors
(PropError pe1, PropError pe2, int how) Processes error property verification.Gets the loaded method for runtime.protected void
initializeElement
(Element element) Called when the XML file for the property tree is serialized from properties.protected void
initializeProp
(Element element) Called to initialize the property from anElement
.protected boolean
Called upon creation of the property to check it's private state.lookupMethod
(ClassReference classReference, List<Throwable> errors, Class<?>... parameterTypes) Called when the application is being prepared by the owner of the method reference to look-up the method with the specified parameters.Methods inherited from class com.iizix.prop.StringProp
appendPropValue, clone, getPropValue0, getString, getString, getValueClasses, initializeValue, setPropValue, toNativeValue0, validatePropType
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsObj, equalsPropValue, equalsTree, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropDispose, onPropInvalidateCache, onPropParentChanged, onPropTreeInitialized, onPropValueSet, onReferenceEvent, onRemoteEvent, onVirtualizationCompleted, paramString, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropValue, verify, virtualize, warning, warning, warning
Field Details
requiredAnnotation
The required annotation, or null for none.runtimeMethod
The method for runtime, null for none.
Constructor Details
MethodReference
protected MethodReference()Creates a Method Reference property with no name and with a null value.MethodReference
Creates a Method Reference property with the specified name with a null value.- Parameters:
propertyAtom
- the property atom.
MethodReference
Creates a Class Reference property with the specified name and value.- Parameters:
propertyAtom
- the property atom.newValue
- the new string value for the property.
Method Details
isPropPrivateAtCreation
protected boolean isPropPrivateAtCreation()Called upon creation of the property to check it's private state. This is used by properties that are not distributed to the remote party.- Overrides:
isPropPrivateAtCreation
in classGProp<String>
- Returns:
- true, always.
equalsErrors
Processes error property verification. The default processing is to verify the two error propertiespe1
andpe2
for equality ifincludeErrors
is 0 or 1, and returns true if the value is 2=no comparison with error properties.Override to verify property errors for reference properties.
- Overrides:
equalsErrors
in classGProp<String>
- Parameters:
pe1
- The first error property, may be null.pe2
- The second error property, may be null.how
- Flags EQC_* values for equal checking.- Returns:
- Equality flag depending on
includeErrors
value.
initializeElement
Called when the XML file for the property tree is serialized from properties. The property should fill attributes and nodes with appropriate information.- Overrides:
initializeElement
in classGProp<String>
- Parameters:
element
- TheElement
to initialize.
initializeProp
Called to initialize the property from anElement
. The property should initialize itself from attributes and nodes with appropriate information.- Overrides:
initializeProp
in classGProp<String>
- Parameters:
element
- TheElement
.- Throws:
PropException
- when the initialization fails.
lookupMethod
public Method lookupMethod(ClassReference classReference, List<Throwable> errors, Class<?>... parameterTypes) Called when the application is being prepared by the owner of the method reference to look-up the method with the specified parameters.- Parameters:
classReference
- The class reference instance.errors
- A list of errors that occurred but did not cause an abort.parameterTypes
- The list of parameters.
getRuntimeMethod
Gets the loaded method for runtime.- Returns:
- The loaded method, or null for none.