Class MethodReference

  • All Implemented Interfaces:
    EventListener, IGProp<java.lang.String>, java.lang.Cloneable
    Direct Known Subclasses:

    public class MethodReference
    extends StringProp
    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.
    Christopher Mindus
    • Field Detail

      • requiredAnnotation

        protected java.lang.String requiredAnnotation
        The required annotation, or null for none.
      • runtimeMethod

        protected java.lang.reflect.Method runtimeMethod
        The method for runtime, null for none.
    • Constructor Detail

      • MethodReference

        protected MethodReference()
        Creates a Method Reference property with no name and with a null value.
      • MethodReference

        public MethodReference​(Atom propertyAtom)
        Creates a Method Reference property with the specified name with a null value.
        propertyAtom - the property atom.
      • MethodReference

        public MethodReference​(Atom propertyAtom,
                               java.lang.String newValue)
        Creates a Class Reference property with the specified name and value.
        propertyAtom - the property atom.
        newValue - the new string value for the property.
    • Method Detail

      • 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.
        isPropPrivateAtCreation in class GProp<java.lang.String>
        true, always.
      • equalsErrors

        protected boolean equalsErrors​(PropError pe1,
                                       PropError pe2,
                                       int how)
        Processes error property verification. The default processing is to verify the two error properties pe1 and pe2 for equality if includeErrors 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.

        equalsErrors in class GProp<java.lang.String>
        pe1 - The first error property, may be null.
        pe2 - The second error property, may be null.
        how - Flags EQC_* values for equal checking.
        Equality flag depending on includeErrors value.
      • initializeElement

        protected void initializeElement​(org.w3c.dom.Element element)
        Called when the XML file for the property tree is serialized from properties. The property should fill attributes and nodes with appropriate information.
        initializeElement in class GProp<java.lang.String>
        element - The Element to initialize.
      • initializeProp

        protected void initializeProp​(org.w3c.dom.Element element)
                               throws PropException
        Called to initialize the property from an Element. The property should initialize itself from attributes and nodes with appropriate information.
        initializeProp in class GProp<java.lang.String>
        element - The Element.
        PropException - when the initialization fails.
      • lookupMethod

        public java.lang.reflect.Method lookupMethod​(ClassReference classReference,
                                                     java.util.List<java.lang.Throwable> errors,
                                                     java.lang.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.
        classReference - The class reference instance.
        errors - A list of errors that occurred but did not cause an abort.
        parameterTypes - The list of parameters.
      • getRuntimeMethod

        public java.lang.reflect.Method getRuntimeMethod()
        Gets the loaded method for runtime.
        The loaded method, or null for none.