Class 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 owner ModuleClasses.
    • Method Detail

      • 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 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.