Class JavaPropReference


  • public class JavaPropReference
    extends PropReference
    The property reference class subclassing the PropReference to provide special functions for Java files.
    Author:
    Christopher Mindus
    • Constructor Detail

      • JavaPropReference

        public JavaPropReference​(java.lang.String name,
                                 java.lang.Class<?>[] supportedClasses,
                                 IPropReference listener)
        Constructs a new property reference without property owner. It is recommended to always use an owner property, so preferably the constructor PropReference(GProp owner, String name, Class [] supportedClasses, IPropReference listener) should be used.

        The class is used without checking for superclasses or subclasses, it must be a direct class match.

        If the listener parameter is null, no property listener is used, thus this class will be safe and cannot cause memory leaks, but the real-time change notification is lost.

        Parameters:
        name - The reference name.
        supportedClasses - Array of supported classes for the referenced property, or null for no check.
        listener - The listener, or null for none.
    • Method Detail

      • resolve

        public boolean resolve​(org.eclipse.core.resources.IFile file,
                               boolean doReCheck,
                               GEvent triggerEvent)
        Attempts to resolve the property name.
        Parameters:
        file - The Java source file.
        doReCheck - Force a re-check flag.
        triggerEvent - Event that triggered this call, null for none.
        Returns:
        true if the resolve completed successfully with correct class (if this applies).