Package com.iizigo.java
Class JavaClass
- java.lang.Object
- com.iizigo.java.JavaClass
public final class JavaClass extends java.lang.Object
The Java Class holds listeners to changes, performs class validation and is hooked into Eclipse Refactoring via its ownerModuleClasses
.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClassName()
Gets the fully qualified class name.JavaSource
getJavaSource()
Gets the file resource.org.eclipse.jdt.core.IType
getType()
Gets the JDT IType of the class..IzTypeDeclaration
getTypeDeclaration()
Get the type declaration of this Java class.boolean
isDisposed()
Checks if class reference disposed of.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).boolean
isResolved()
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
triggerSWTChangeEvent()
Do for trigger SWT for async change.MethodLookup
validateMethod(java.lang.String method, boolean isStatic, java.lang.String requiredAnnotation, java.lang.String annotationParam, java.lang.String annotationValue, boolean allowAll)
Validates the method for the annotation.
Method Detail
onQuery
public void onQuery(EditorClassReference ref, GEvent event)
Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.- Parameters:
ref
- The Class Reference instance.event
- The event.
onQuery
public void onQuery(EditorMethodReference ref, GEvent event)
Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.- Parameters:
ref
- The Method Reference instance.event
- The event.
onQuery
public void onQuery(EditorMethodReference2 ref, GEvent event)
Called when the property receives aGEvent.PROP_QUERY_DESIGNER_PROPS
event.- Parameters:
ref
- The Method Reference instance.event
- The event.
onDispose
public void onDispose(IClassReferenceListener listener)
Called when a reference holder, theIClassReferenceListener
, has been disposed of.- Parameters:
listener
- The listener.
getJavaSource
public JavaSource getJavaSource()
Gets the file resource.- Returns:
- The file, or null if not yet assigned.
getClassName
public java.lang.String 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
public org.eclipse.jdt.core.IType 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
public void resolve(IClassReferenceListener listener)
Resolves any references. The class reference should respond to the listener with a notification of "found" or "error".
validateMethod
public MethodLookup validateMethod(java.lang.String method, boolean isStatic, java.lang.String requiredAnnotation, java.lang.String annotationParam, java.lang.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
public IzTypeDeclaration getTypeDeclaration()
Get the type declaration of this Java class.