Class JavaClass

java.lang.Object
com.iizigo.java.JavaClass

public final class JavaClass extends Object
The Java Class holds listeners to changes, performs class validation and is hooked into Eclipse Refactoring via its owner ModuleClasses.
  • Method Details

    • onQuery

      public void onQuery(EditorClassReference ref, GEvent event)
      Called when the property receives a GEvent.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 a GEvent.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 a GEvent.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, the IClassReferenceListener, 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 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 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(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

      public IzTypeDeclaration getTypeDeclaration()
      Get the type declaration of this Java class.