|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.parser.java.v2.common.AbstractElement
oracle.javatools.parser.java.v2.common.AbstractType
oracle.javatools.parser.java.v2.common.AbstractClass
oracle.javatools.parser.java.v2.common.WrapperClass
public abstract class WrapperClass
Skeleton implementation of an object wrapping a class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface oracle.javatools.parser.java.v2.JavaPreferences |
---|
JavaPreferences.MemberOrder |
Field Summary | |
---|---|
protected JavaClass |
thing The underlying thing. |
Fields inherited from interface oracle.javatools.parser.java.v2.model.JavaClass |
---|
EMPTY_ARRAY |
Fields inherited from interface oracle.javatools.parser.java.v2.JavaOperators |
---|
OPT_ADD, OPT_ADDASG, OPT_AND, OPT_ANNOTATION, OPT_ARRAYCONST, OPT_ASG, OPT_base, OPT_BITAND, OPT_BITANDASG, OPT_BITNOT, OPT_BITOR, OPT_BITORASG, OPT_BITXOR, OPT_BITXORASG, OPT_CLASS_LITERAL, OPT_COND, OPT_DEREF, OPT_DIV, OPT_DIVASG, OPT_DOT, OPT_EQ, OPT_GE, OPT_GT, OPT_INSTANCEOF, OPT_invalid, OPT_INVOKE, OPT_LE, OPT_LIST, OPT_LITERAL, OPT_LSH, OPT_LSHASG, OPT_LT, OPT_max, OPT_MINUS, OPT_MINUSASG, OPT_MOD, OPT_MODASG, OPT_MUL, OPT_MULASG, OPT_NEGATIVE, OPT_NESTEXP, OPT_NEWARRAY, OPT_NEWOBJECT, OPT_NOT, OPT_NOTEQ, OPT_OR, OPT_POSITIVE, OPT_POSTDEC, OPT_POSTINC, OPT_precedence, OPT_PREDEC, OPT_PREINC, OPT_QUALIFIED_SUPER, OPT_QUALIFIED_THIS, OPT_RSH, OPT_RSHASG, OPT_SIMPLE_NAME, OPT_tokens, OPT_TYPE, OPT_TYPECAST, OPT_URSH, OPT_URSHASG, OPT_words |
Constructor Summary | |
---|---|
protected |
WrapperClass(JavaClass thing) |
Method Summary | |
---|---|
void |
clearCompiledInfo() Overrides should chain. |
java.util.Collection |
getActualTypeArguments() Get the type arguments, if any |
int |
getArrayDimensions() |
JavaType |
getBaseComponentType() |
JavaMethod |
getClinitMethod() |
JavaType |
getComponentType() |
java.util.Collection |
getDeclaredAnnotations() Retrieves all the annotations declared on this element. |
java.util.Collection |
getDeclaredClasses() In order to get all inner classes, clients must recurse through direct inner classes. |
java.util.Collection |
getDeclaredConstructors() |
java.util.Collection |
getDeclaredFields() |
java.util.Collection |
getDeclaredMethods() |
int |
getElementKind() |
JavaFile |
getFile() |
java.util.Collection |
getInterfaces() The name "getInterfaces" was chosen to be consistent with java/lang/Class. |
int |
getModifiers() |
java.lang.String |
getName() Gets the simplest name of this type with "[]"s if present. |
JavaElement |
getOwner() TODO: Document me! |
JavaClass |
getOwningClass() |
JavaPackage |
getPackage() Gets the owning package, null if N/A. |
java.lang.String |
getPackageName() Gets the qualified name of the owning package. |
java.lang.String |
getQualifiedName() Gets the fully qualified name of this type in source format. |
java.lang.String |
getRawName() Gets the raw name of this type. |
SourceElement |
getSourceElement() |
JavaType |
getSuperclass() The name "getSuperclass" was chosen to be consistent with java/lang/Class. |
JavaClass |
getTypeErasure() Gets the type erasure of this type, as defined by the JLS3. |
java.util.Collection |
getTypeParameters() |
java.util.Collection<UnresolvedType> |
getUnresolvedInterfaces() When reverse engineering byecode, some types cannot be resolved if the correct owning project is not associated to the JavaProvider. |
java.net.URL |
getURL() If the input for this type is a *.class file, the returned URL will be for the *.class file. |
java.lang.String |
getVMName() Gets the VM name for this type. |
boolean |
isAnnotation() |
boolean |
isArray() |
boolean |
isDeprecated() |
boolean |
isEnum() |
boolean |
isExported() |
boolean |
isHidden() |
boolean |
isInterface() |
boolean |
isMemberClass() True if this is a member type. |
boolean |
isPrimitive() |
boolean |
isSourceElement() |
Methods inherited from class oracle.javatools.parser.java.v2.common.AbstractClass |
---|
getDescriptor, getSignature, getTypeSignature, getUniqueIdentifier |
Methods inherited from class oracle.javatools.parser.java.v2.common.AbstractType |
---|
equals, getAnnotation, getAnnotations, getClass, getClasses, getClosestClass, getDeclaredClass, getDeclaredConstructor, getDeclaredField, getDeclaredMethod, getDeclaredMethods, getField, getFields, getHierarchy, getMethod, getMethods, getMethods, getOwningMethod, getResolvedType, getSourceName, getThisValue, getTypeParameter, getUnqualifiedName, getUnresolvedType, hashCode, isAssignableFrom, isSubtypeOf, printCompiledInfo |
Methods inherited from class oracle.javatools.parser.java.v2.common.AbstractElement |
---|
getDeclaredAnnotation, getSourceSymbol, hasActualTypeArguments, hasTypeParameters, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic, isTransient, isVarargs |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaType |
---|
equals, getClass, getClasses, getClosestClass, getDeclaredClass, getDeclaredConstructor, getDeclaredField, getDeclaredMethod, getDeclaredMethods, getField, getFields, getHierarchy, getMethod, getMethods, getMethods, getThisValue, getUnqualifiedName, isAssignableFrom, isSubtypeOf |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaIsGeneric |
---|
getTypeParameter, hasActualTypeArguments, hasTypeParameters |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMember |
---|
isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType |
---|
getResolvedType, getUnresolvedType |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasAnnotations |
---|
getAnnotation, getAnnotations, getDeclaredAnnotation |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement |
---|
isFinal, isSynthetic, printCompiledInfo |
Field Detail |
---|
protected final JavaClass thing
Constructor Detail |
---|
protected WrapperClass(JavaClass thing)
Method Detail |
---|
public int getModifiers()
getModifiers
in interface JavaElement
getModifiers
in class AbstractType
public int getElementKind()
getElementKind
in interface JavaElement
getElementKind
in class AbstractClass
public java.lang.String getName()
JavaType
The name of a non-parametrized top-level type of the form "pkg.Cls" is "Cls".
The name of a non-parametrized member type of the form "pkg.Cls.InnerClass" is "InnerClass".
The name of an array type T[] is the name of T suffixed by the appropriate number of "[]"s.
The name of a parametrized type is the same as the name of its raw type. That is, the name of "pkg.Cls<String>" is simply "Cls".
The name of a wildcard type is always "?".
The name of a type parameter should be pretty obvious.
The name of a primitive type should be pretty obvious.
The name of a local inner class is just its name.
An anonymous inner classes does not have a name and will return the empty string.
getName
in interface JavaHasName
getName
in interface JavaType
getName
in class AbstractType
public boolean isSourceElement()
isSourceElement
in interface JavaElement
isSourceElement
in class AbstractElement
public SourceElement getSourceElement()
getSourceElement
in interface JavaElement
getSourceElement
in class AbstractElement
public java.util.Collection getDeclaredAnnotations()
JavaHasAnnotations
getDeclaredAnnotations
in interface JavaHasAnnotations
getDeclaredAnnotations
in class AbstractElement
public void clearCompiledInfo()
AbstractElement
clearCompiledInfo
in interface JavaClass
clearCompiledInfo
in class AbstractType
public JavaFile getFile()
If a SourceFile is returned, then this element is declared in or otherwise comes in a SourceFile.
A non-null JavaFile may be returned that is not a SourceFile. For example, a JavaClass that came from a .class file definition will return such a JavaFile instance.
If null, then this element was created on-the-fly.
public JavaClass getOwningClass()
getOwningClass
in interface JavaMember
getOwningClass
in class AbstractType
class C<E>
{
E field;
{
C generic = new C();
generic.field = null;
C<String> specific = new C<String>();
specific.field = null;
}
}
If this instance represents the member field accessed by "generic.field", then getOwningClass will return the type for "C".
If this instance represents the member field accessed by "specific.field", then getOwningClass will return the type for "C<String>".
Further, the expressions "generic.field" and "specific.field" do not refer to the same JavaField instance.
public JavaElement getOwner()
JavaElement
getOwner
in interface JavaElement
getOwner
in class AbstractType
public java.util.Collection getTypeParameters()
getTypeParameters
in interface JavaIsGeneric
getTypeParameters
in class AbstractElement
public java.util.Collection getActualTypeArguments()
JavaIsGeneric
getActualTypeArguments
in interface JavaIsGeneric
getActualTypeArguments
in class AbstractElement
public boolean isExported()
isExported
in interface JavaType
isExported
in class AbstractClass
public boolean isInterface()
isInterface
in interface JavaType
isInterface
in class AbstractClass
public boolean isAnnotation()
isAnnotation
in interface JavaType
isAnnotation
in class AbstractClass
public boolean isEnum()
isEnum
in interface JavaType
isEnum
in class AbstractClass
public boolean isMemberClass()
JavaType
isMemberClass
in interface JavaType
isMemberClass
in class AbstractClass
public boolean isDeprecated()
isDeprecated
in interface JavaElement
isDeprecated
in class AbstractElement
public boolean isHidden()
isHidden
in interface JavaElement
isHidden
in class AbstractElement
public boolean isPrimitive()
isPrimitive
in interface JavaType
isPrimitive
in class AbstractType
public boolean isArray()
isArray
in interface JavaType
isArray
in class AbstractType
public int getArrayDimensions()
getArrayDimensions
in interface JavaType
getArrayDimensions
in class AbstractType
public JavaType getComponentType()
getComponentType
in interface JavaType
getComponentType
in class AbstractType
public JavaType getBaseComponentType()
getBaseComponentType
in interface JavaType
getBaseComponentType
in class AbstractType
public java.lang.String getQualifiedName()
JavaType
The source name of a non-parametrized top-level type of the form "pkg.Cls" is "pkg.Cls".
The source name of a non-parametrized member type of the form T.InnerClass (that is, a member type InnerClass that is a member of type T) is the source name of T suffixed with by ".InnerClass", e.g. "java.util.Map.Entry", "pkg.Cls<?>.InnerClass".
The source name of a parametrized type starts with the source name of the raw type and lists the source name of all of its actual type argumenths, e.g. "java.util.List<java.lang.String>". The source name of an array type T[] is the source name of T suffixed by the appropriate number of "[]"s.
The source name of a wildcard type is the string with which it would appear in a source file. The three possible forms this can take are: "?", "? extends T", "? super T".
The source name of a type parameter is just its name.
The source name of a primitive type should be pretty obvious.
The source name of a local inner class is just its name because a local inner class is referenced, in a source file, by its name.
An anonymous inner classes does not have a source name. It will return the empty string for its source name.
Open for discussion: What should be returned by an anonymous class? Technically, the concept of a source name is irrelevant because anonymous classes may not be referred to in a source compilation unit.
getQualifiedName
in interface JavaType
getQualifiedName
in class AbstractType
java.lang.Object
java.util.Map<String,String>
java.lang.String[][]
public java.lang.String getRawName()
JavaType
The raw name of a parametrized top-level or member or local inner type is the source name of its type erasure, as defined by the JLS3. Think of the raw name as the source name with all parametrization stripped out.
The raw name of an array type T[] is the raw name of T suffixed by the appropriate number of "[]"s.
The raw name for any other type is the same as its source name.
getRawName
in interface JavaType
getRawName
in class AbstractType
public java.lang.String getVMName()
JavaType
The VM name of a non-parametrized top-level type of the form "pkg.Cls" is "pkg/Cls".
The VM name of a non-parametrized member-level type of the form "pkg.Cls.InnerClass" is "pkg/Cls$InnerClass".
The VM name of a parametrized type is the VM name of the raw type. Because parametrization is stripped at run-time, we will omit it from the VM name.
The VM name of an array type T[] is the VM name of T suffixed by the appropriate number of "[]"s.
The VM name of a local inner class or anonymous inner class is a string that uniquely identifies it from all other types and is usually prefixed with the VM name of its directly enclosing class. For example, an anonymous inner class belonging to the type "pkg.Cls" may return "pkg/Cls$1".
The VM name of any other type is the same as its source name.
getVMName
in interface JavaType
getVMName
in class AbstractType
public java.net.URL getURL()
JavaType
getURL
in interface JavaType
getURL
in class AbstractType
public JavaClass getTypeErasure()
JavaType
getTypeErasure
in interface JavaType
getTypeErasure
in class AbstractClass
public JavaPackage getPackage()
JavaType
getPackage
in interface JavaType
getPackage
in class AbstractType
public java.lang.String getPackageName()
JavaType
getPackageName
in interface JavaType
getPackageName
in class AbstractType
public JavaType getSuperclass()
JavaType
getSuperclass
in interface JavaType
getSuperclass
in class AbstractType
If this is a JavaClass: Null for java/lang/Object and primitive types, non-null otherwise. Where no base class was declared, java/lang/Object is returned, even for interfaces.
If this is a JavaType: Null if no superclass was declared AND an interface was declared.
If this is a JavaWildcardType: Always null.
public java.util.Collection getInterfaces()
JavaType
getInterfaces
in interface JavaType
getInterfaces
in class AbstractType
public java.util.Collection<UnresolvedType> getUnresolvedInterfaces()
JavaType
getUnresolvedInterfaces
in interface JavaType
getUnresolvedInterfaces
in class AbstractType
public java.util.Collection getDeclaredFields()
getDeclaredFields
in interface JavaType
getDeclaredFields
in class AbstractType
public java.util.Collection getDeclaredMethods()
getDeclaredMethods
in interface JavaType
getDeclaredMethods
in class AbstractType
public java.util.Collection getDeclaredConstructors()
getDeclaredConstructors
in interface JavaType
getDeclaredConstructors
in class AbstractType
public JavaMethod getClinitMethod()
getClinitMethod
in interface JavaType
getClinitMethod
in class AbstractType
public java.util.Collection getDeclaredClasses()
JavaType
getDeclaredClasses
in interface JavaType
getDeclaredClasses
in class AbstractType
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |