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 IJavaClassInfo
IJavaClassInfo.Util -
Field Summary
Fields inherited from interface IJavaClassInfo
LOCKFields inherited from interface 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 JavaSourceElement
findInnerSourceType, getCompilationUnitTree, getDeclaringClass, getEnclosingClass, getEndPosition, getLocationInfo, getSourcePositions, getStartPosition, getTreeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IJavaAnnotatedElement
getAnnotation, getDeclaredAnnotations, getEnclosingClass, getLocationInfo, isAnnotationPresentMethods inherited from interface 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 IJavaClassType
getActualType, getActualType, getConcreteType, getModule, getName, getNamespace, getSimpleName, isAssignableFromMethods inherited from interface 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
-