public final class UnresolvedClassImpl extends BuiltinClassImpl
This is the JClass that is returned when a java type cannot be resolved. It has only a name.
NO_ANNOTATION, NO_CLASS, NO_COMMENT, NO_CONSTRUCTOR, NO_FIELD, NO_METHOD, NO_NODE, NO_PACKAGE, NO_PARAMETER, NO_PROPERTY| Constructor and Description |
|---|
UnresolvedClassImpl(String packageName,
String simpleName,
ElementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
JPackage |
getContainingPackage()
Returns a JPackage which represents the package which contains
this JClass.
|
String |
getFieldDescriptor()
Returns the name of this member in the format described in
section 4.3.2 of the VM spec, 'Field Descriptors.' This is the
same nasty format returned by java.lang.Class.getName(), and is
the format you need to use in calls to Class.forName().
|
String |
getQualifiedName()
Returns a qualified name for this abstraction.
|
boolean |
isAssignableFrom(JClass c)
Determines if the class or interface represented by this Class
object is either the same as, or is a superclass or
superinterface of, the class or interface represented by the
specified Class parameter.
|
boolean |
isUnresolvedType()
Returns true if a backing entity for this class could not be
resolved.
|
accept, accept, addInterface, addInterface, addInterfaceUnqualified, addNewConstructor, addNewDeclaredProperty, addNewField, addNewInnerClass, addNewMethod, addNewProperty, equals, forName, getArrayComponentType, getArrayDimensions, getClasses, getConstructors, getContainingClass, getDeclaredFields, getDeclaredMethods, getDeclaredProperties, getFields, getImportedClasses, getImportedPackages, getInterfaces, getMethods, getModifiers, getMutableConstructors, getMutableFields, getMutableMethods, getPrimitiveClass, getProperties, getSourcePosition, getSuperclass, hashCode, isAbstract, isAnnotationType, isArrayType, isBuiltinType, isEnumType, isFinal, isInterface, isObjectType, isPackagePrivate, isPrimitiveType, isPrivate, isProtected, isPublic, isStatic, isVoidType, removeConstructor, removeDeclaredProperty, removeField, removeInnerClass, removeInterface, removeInterface, removeMethod, removeProperty, setIsAnnotationType, setIsEnumType, setIsInterface, setIsUnresolvedType, setModifiers, setSimpleName, setSuperclass, setSuperclass, setSuperclassUnqualifiedaddAnnotationForProxy, addLiteralAnnotation, createComment, findOrCreateAnnotation, getAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getComment, getEditableProxy, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeAnnotation, removeCommentcompareTo, createSourcePosition, defaultName, getArtifact, getClassLoader, getContext, getMutableSourcePosition, getParent, getSimpleName, removeSourcePosition, setArtifact, toStringaddLiteralAnnotation, createComment, findOrCreateAnnotation, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeCommentcreateSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifactgetClassLoadergetAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getCommentgetArtifact, getParent, getSimpleName, toStringpublic UnresolvedClassImpl(String packageName, String simpleName, ElementContext ctx)
public String getQualifiedName()
JElementReturns a qualified name for this abstraction. The exact format of this name depends on the particular abstraction. Please refer to the documentation for each JElement subclass for a detailed description of the qualified name formats.
getQualifiedName in interface JElementgetQualifiedName in class BuiltinClassImplpublic String getFieldDescriptor()
JClassReturns the name of this member in the format described in
section 4.3.2 of the VM spec, 'Field Descriptors.' This is the
same nasty format returned by java.lang.Class.getName(), and is
the format you need to use in calls to Class.forName(). For
example, the ClassfileName of the class of a two-dimensional
array of strings is [[Ljava.lang.String;. For
details, see
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
getFieldDescriptor in interface JClassgetFieldDescriptor in class BuiltinClassImplpublic JPackage getContainingPackage()
JClassReturns a JPackage which represents the package which contains this JClass.
getContainingPackage in interface JClassgetContainingPackage in class BuiltinClassImplpublic boolean isAssignableFrom(JClass c)
JClassDetermines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter. It returns true if so; otherwise it returns false. If this Class object represents a primitive type, this method returns true if the specified Class parameter is exactly this Class object; otherwise it returns false.
Specifically, this method tests whether the type represented by the specified Class parameter can be converted to the type represented by this Class object via an identity conversion or via a widening reference conversion. See The Java Language Specification, sections 5.1.1 and 5.1.4 , for details.
public boolean isUnresolvedType()
JClassReturns true if a backing entity for this class could not be resolved. This will be true, for example, of the JClass which you get when requesting a method's return type when no class for that type can be found. In this case, the JClass will be have only a name - all other properties will be null/empty.
isUnresolvedType in interface JClassisUnresolvedType in class BuiltinClassImplCopyright © 2010 - 2020 Adobe. All Rights Reserved