Class AbstractJavaClassInfo

java.lang.Object
gw.lang.reflect.java.JavaSourceElement
gw.lang.reflect.java.AbstractJavaClassInfo
All Implemented Interfaces:
IJavaAnnotatedElement, IJavaClassInfo, IJavaClassType, ITypeInfoResolver, Serializable
Direct Known Subclasses:
JavaArrayClassInfo, JavaSourceType, JavaSourceUnresolvedClass

public abstract class AbstractJavaClassInfo extends JavaSourceElement implements IJavaClassInfo
See Also:
  • Constructor Details

    • AbstractJavaClassInfo

      public AbstractJavaClassInfo()
  • Method Details

    • isAssignableFrom

      public boolean isAssignableFrom(IJavaClassInfo that)
      Specified by:
      isAssignableFrom in interface IJavaClassInfo
    • equals

      public boolean equals(Object that)
      Description copied from interface: IJavaClassInfo
      Two IJavaClassInfo instances are equal if they are both non-arrays and have the same name and module. If the two instances are arrays, then they are equal if their component types are equal.
      Specified by:
      equals in interface IJavaClassInfo
      Overrides:
      equals in class Object
      Parameters:
      that - the other object
      Returns:
      whether the two objects represent the same class.
    • hashCode

      public int hashCode()
      Description copied from interface: IJavaClassInfo
      In order to maintain consistency with IJavaClassInfo.equals(Object), the hash code of a non-array IJavaClassInfo must be computed as follows:

      getName().hashCode() * 31 + getModule().hashCode()

      For arrays, the hashCode is equal to the hashCode of the component type.

      Specified by:
      hashCode in interface IJavaClassInfo
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • isAssignableFrom

      public static boolean isAssignableFrom(IJavaClassInfo thisObj, IJavaClassInfo that)
    • equals

      public static boolean equals(IJavaClassInfo thisObj, Object that)
    • hashCode

      public static int hashCode(IJavaClassInfo thisObj)