Package com.iizigo.java
Class JavaPropReference
- java.lang.Object
- com.iizix.prop.PropReference
- com.iizigo.java.JavaPropReference
public class JavaPropReference extends PropReference
The property reference class subclassing the PropReference to provide special functions for Java files.- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.prop.PropReference
MSG_REF_NOT_FOUND, MSG_REF_WRONG_CLASS
Constructor Summary
Constructors Constructor Description JavaPropReference(java.lang.String name, java.lang.Class<?>[] supportedClasses, IPropReference listener)
Constructs a new property reference without property owner.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
resolve(org.eclipse.core.resources.IFile file, boolean doReCheck, GEvent triggerEvent)
Attempts to resolve the property name.Methods inherited from class com.iizix.prop.PropReference
dispose, finalize, getName, getOriginalName, getOwner, getProperty, isDisposed, isResolved, resolve, resolve, setName
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 constructorPropReference(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 isnull
, 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).