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
- Direct Known Subclasses:
JavaArrayClassInfo,JavaSourceType,JavaSourceUnresolvedClass
- See Also:
-
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
LOCKFields inherited from interface gw.lang.reflect.java.IJavaClassType
EMPTY_ARRAY, ERROR_TYPE, NULL_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanequals(IJavaClassInfo thisObj, Object that) booleanTwo 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) booleanstatic booleanisAssignableFrom(IJavaClassInfo thisObj, IJavaClassInfo that) Methods inherited from class gw.lang.reflect.java.JavaSourceElement
findInnerSourceType, getCompilationUnitTree, getDeclaringClass, getEnclosingClass, getEndPosition, getLocationInfo, getSourcePositions, getStartPosition, getTreeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getAnnotation, getDeclaredAnnotations, getEnclosingClass, getLocationInfo, isAnnotationPresentMethods 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, newInstanceMethods inherited from interface gw.lang.reflect.java.IJavaClassType
getActualType, getActualType, getConcreteType, getModule, getName, getNamespace, getSimpleName, isAssignableFromMethods inherited from interface gw.lang.reflect.java.ITypeInfoResolver
getModule, resolveImport, resolveType, resolveType
-
Constructor Details
-
AbstractJavaClassInfo
public AbstractJavaClassInfo()
-
-
Method Details
-
isAssignableFrom
- Specified by:
isAssignableFromin interfaceIJavaClassInfo
-
equals
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
-
equals
-
hashCode
-