Package gw.lang.reflect.java
Class AbstractJavaClassInfo
- java.lang.Object
-
- gw.lang.reflect.java.JavaSourceElement
-
- gw.lang.reflect.java.AbstractJavaClassInfo
-
- All Implemented Interfaces:
IJavaAnnotatedElement,IJavaClassInfo,IJavaClassType,ITypeInfoResolver,Serializable
public abstract class AbstractJavaClassInfo extends JavaSourceElement implements IJavaClassInfo
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gw.lang.reflect.java.IJavaClassInfo
IJavaClassInfo.Util
-
-
Field Summary
-
Fields inherited from interface gw.lang.reflect.java.IJavaClassInfo
LOCK
-
Fields inherited from interface gw.lang.reflect.java.IJavaClassType
EMPTY_ARRAY, ERROR_TYPE, NULL_TYPE
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaClassInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanequals(IJavaClassInfo thisObj, Object that)booleanequals(Object that)Two IJavaClassInfo instances are equal if they are both non-arrays and have the same name and module.inthashCode()In order to maintain consistency withIJavaClassInfo.equals(Object), the hash code of a non-array IJavaClassInfo must be computed as follows:static inthashCode(IJavaClassInfo thisObj)booleanisAssignableFrom(IJavaClassInfo that)static booleanisAssignableFrom(IJavaClassInfo thisObj, IJavaClassInfo that)-
Methods inherited from class gw.lang.reflect.java.JavaSourceElement
findInnerSourceType, getCompilationUnitTree, getDeclaringClass, getEnclosingClass, getEndPosition, getLocationInfo, getSourcePositions, getStartPosition, getTree
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getAnnotation, getDeclaredAnnotations, getEnclosingClass, getLocationInfo, isAnnotationPresent
-
Methods inherited from interface gw.lang.reflect.java.IJavaClassInfo
compile, createClassDocNode, getArrayType, getBackingClass, getComponentType, getConstructor, getDeclaredClasses, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredMethod, getDeclaredMethods, getDeepestClassAtOffset, getDisplayName, getEnclosingType, getEnumConstants, getField, getFields, getGenericInterfaces, getGenericSuperclass, getInterfaces, getJavaType, getMethod, getMethodDescriptors, getModifiers, getNameSignature, getPropertyDescriptors, getRelativeName, getSourceFileHandle, getSuperclass, getTypeParameters, hasCustomBeanInfo, isAnnotation, isArray, isCompilable, isEnum, isHiddenViaFeatureDescriptor, isInterface, isInternal, isPrimitive, isPrivate, isProtected, isPublic, isVisibleViaFeatureDescriptor, newInstance
-
Methods inherited from interface gw.lang.reflect.java.IJavaClassType
getActualType, getActualType, getConcreteType, getModule, getName, getNamespace, getSimpleName, isAssignableFrom
-
Methods inherited from interface gw.lang.reflect.java.ITypeInfoResolver
getModule, resolveImport, resolveType, resolveType
-
-
-
-
Method Detail
-
isAssignableFrom
public boolean isAssignableFrom(IJavaClassInfo that)
- Specified by:
isAssignableFromin interfaceIJavaClassInfo
-
equals
public boolean equals(Object that)
Description copied from interface:IJavaClassInfoTwo 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:
equalsin interfaceIJavaClassInfo- Overrides:
equalsin classObject- Parameters:
that- the other object- Returns:
- whether the two objects represent the same class.
-
hashCode
public int hashCode()
Description copied from interface:IJavaClassInfoIn order to maintain consistency withIJavaClassInfo.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:
hashCodein interfaceIJavaClassInfo- Overrides:
hashCodein classObject- 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)
-
-