Package com.iizigo.java
Class JavaClass
java.lang.Object
com.iizigo.java.JavaClass
The Java Class holds listeners to changes, performs class validation and is hooked into Eclipse Refactoring via its owner
ModuleClasses
.Method Summary
Modifier and TypeMethodDescriptionGets the fully qualified class name.Gets the file resource.getType()
Gets the JDT IType of the class..Get the type declaration of this Java class.boolean
Checks if class reference disposed of.boolean
Checks if this reference is correct in terms of location and parsing, or if it needs to be renewed to get a new type (change from unresolved to parsed, or vice versa).boolean
Checks if this class is resolved.void
onDispose
(IClassReferenceListener listener) Called when a reference holder, theIClassReferenceListener
, has been disposed of.void
onQuery
(EditorClassReference ref, GEvent event) Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.void
onQuery
(EditorMethodReference2 ref, GEvent event) Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.void
onQuery
(EditorMethodReference ref, GEvent event) Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.void
resolve
(IClassReferenceListener listener) Resolves any references.void
Do for trigger SWT for async change.validateMethod
(String method, boolean isStatic, String requiredAnnotation, String annotationParam, String annotationValue, boolean allowAll) Validates the method for the annotation.
Method Details
onQuery
Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.- Parameters:
ref
- The Class Reference instance.event
- The event.
onQuery
Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.- Parameters:
ref
- The Method Reference instance.event
- The event.
onQuery
Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.- Parameters:
ref
- The Method Reference instance.event
- The event.
onDispose
Called when a reference holder, theIClassReferenceListener
, has been disposed of.- Parameters:
listener
- The listener.
getJavaSource
Gets the file resource.- Returns:
- The file, or null if not yet assigned.
getClassName
Gets the fully qualified class name.isRenewReferenceRequired
public boolean isRenewReferenceRequired()Checks if this reference is correct in terms of location and parsing, or if it needs to be renewed to get a new type (change from unresolved to parsed, or vice versa).- Returns:
- true If this Java source is currently not parsed and the current type is found to be parsed, or if reference instance is disposed of.
getType
Gets the JDT IType of the class..- Returns:
- The type, or null if class has been removed.
isDisposed
public boolean isDisposed()Checks if class reference disposed of.isResolved
public boolean isResolved()Checks if this class is resolved. Checking for implementing interface or annotation is not done.- Returns:
- true if resolved, false otherwise.
resolve
Resolves any references. The class reference should respond to the listener with a notification of "found" or "error".validateMethod
public MethodLookup validateMethod(String method, boolean isStatic, String requiredAnnotation, String annotationParam, String annotationValue, boolean allowAll) Validates the method for the annotation.- Parameters:
method
- The method name.isStatic
- Method must be static flag.requiredAnnotation
- The required annotation, or null for none.annotationParam
- Parameter member value pair to verify the value with for back-referencing, null for none.annotationValue
- The value to match for back-referencing, null for none.allowAll
- Flag to allow a ref "*" as back-reference.- Returns:
- The method look-up instance.
triggerSWTChangeEvent
public void triggerSWTChangeEvent()Do for trigger SWT for async change.getTypeDeclaration
Get the type declaration of this Java class.