|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SourceClass
A SourceClass is the syntactic (aka symbolic) representation of a java class: classes, enums, interfaces, and annotation types.
Field Summary | |
---|---|
static SourceClass[] |
EMPTY_ARRAY |
static int |
PRINT_DECLARATION "modifiers class name<type_parameters extends bounds, ...>" |
static int |
PRINT_NAME "name<type_parameters, ...>" |
Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement |
---|
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT |
Method Summary | |
---|---|
SourceInterfacesClause |
getInterfacesClause() Gets the extends/implements clause object. |
SourceMember |
getOwningMember() Gets the owning member declaration, null if none. |
java.lang.String |
getPackageName() Gets the owning package name, empty if none. |
SourceClassBody |
getSourceBody() Gets the class body object. |
SourceClass |
getSourceClass(java.lang.String name) Gets the matching declared member class, null if none. |
java.util.List<SourceClass> |
getSourceClasses() Gets the list of declared member class declarations. |
SourceMethod |
getSourceConstructor(JavaType[] targetTypes) Gets the matching declared constructor declaration, null if none. |
java.util.List<SourceMethod> |
getSourceConstructors() Gets the list of declared constructor declarations. |
java.util.List<SourceEnumConstant> |
getSourceEnumConstants() Gets the list of declared enum constants. |
java.util.List<SourceFieldDeclaration> |
getSourceFieldDeclarations() Gets the list of declared field declarations. |
SourceFieldVariable |
getSourceFieldVariable(java.lang.String name) Gets the matching declared field variable, null if none. |
java.util.Collection<SourceFieldVariable> |
getSourceFieldVariables() Gets the collection of declared field. |
java.util.List<SourceClassInitializer> |
getSourceInitializers() Gets the list of declared class initializers. |
java.util.List<SourceTypeReference> |
getSourceInterfaces() Gets the source superinterfaces. |
java.util.List<SourceMember> |
getSourceMembers() Gets the list of declared member declarations. |
SourceMemberVariable |
getSourceMemberVariable(java.lang.String name) Gets the matching declared member variable, null if none. |
java.util.Collection |
getSourceMemberVariables() Gets the list of all enum constants and field variables. |
SourceMethod |
getSourceMethod(java.lang.String name, JavaType[] targetTypes) Gets the matching method declaration, null if none. |
java.util.List<SourceMethod> |
getSourceMethods() Gets the list of declared method (but not constructor) declarations. |
java.util.Collection<SourceMethod> |
getSourceMethods(java.lang.String name) Gets the collection of matching method (but not constructor) declarations. |
SourcePackage |
getSourcePackage() Gets the owning package declaration. |
SourceTypeReference |
getSourceSuperclass() Gets the source superclass. |
java.util.List<SourceTypeParameter> |
getSourceTypeParameters() Gets the list of type parameters declared on this class. |
SourceSuperclassClause |
getSuperclassClause() Gets the extends/implements clause object. |
int |
getTypeKind() Identifies what kind of class declaration this is. |
boolean |
isAnnotation() True if this is an annotation type. |
boolean |
isAnonymous() True if this is an anonymous class declaration. |
boolean |
isClass() True if this is a class or an enum type. |
boolean |
isEnum() True if this is an enum type. |
boolean |
isExported() |
boolean |
isInnerClass() Deprecated. Use isMemberClass(). Change made to match reflection. |
boolean |
isInterface() True if this is an interface or an annotation type. |
void |
setSourceSuperclass(SourceTypeReference superclass) Attempts to set the declared base class of this class. |
void |
setTypeKind(int typeKind) Attempts to change the type of class this is. |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceMember |
---|
getDocComment, getEnclosingClass, hasDeprecatedTag, hasHiddenTag, setDocComment |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasModifiers |
---|
addModifiers, getModifiers, getSourceAnnotations, removeModifiers, setModifiers |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement |
---|
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, hasErrors, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf |
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasName |
---|
getName, getNameElement, setName, setNameElement |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaClass |
---|
clearCompiledInfo |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaType |
---|
equals, getArrayDimensions, getBaseComponentType, getClass, getClasses, getClinitMethod, getClosestClass, getComponentType, getDeclaredClass, getDeclaredClasses, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getDescriptor, getField, getFields, getHierarchy, getInterfaces, getMethod, getMethods, getMethods, getName, getPackage, getQualifiedName, getRawName, getSignature, getSuperclass, getThisValue, getTypeErasure, getTypeSignature, getUniqueIdentifier, getUnqualifiedName, getUnresolvedInterfaces, getUnresolvedSuperclass, getURL, getVMName, isArray, isAssignableFrom, isMemberClass, isPrimitive, isSubtypeOf |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaIsGeneric |
---|
getActualTypeArguments, getTypeParameter, getTypeParameters, hasActualTypeArguments, hasTypeParameters |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMember |
---|
getOwningClass, 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, getDeclaredAnnotations |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement |
---|
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo |
Field Detail |
---|
static final SourceClass[] EMPTY_ARRAY
static final int PRINT_NAME
static final int PRINT_DECLARATION
Method Detail |
---|
int getTypeKind()
TY_CLASS: "class". TY_ENUM: "enum". TY_INTERFACE: "interface". TY_ANNOTATE: "@interface".
void setTypeKind(int typeKind)
TY_CLASS: "class". TY_ENUM: "enum". TY_INTERFACE: "interface". TY_ANNOTATE: "@interface".
boolean isClass()
boolean isInterface()
isInterface
in interface JavaType
boolean isEnum()
isEnum
in interface JavaType
boolean isAnnotation()
isAnnotation
in interface JavaType
SourcePackage getSourcePackage()
java.lang.String getPackageName()
getPackageName
in interface JavaType
@Deprecated
boolean isInnerClass()
boolean isExported()
isExported
in interface JavaType
boolean isAnonymous()
SourceSuperclassClause getSuperclassClause()
getSourceSuperclass()
and setSourceSuperclass(SourceTypeReference)
.SourceInterfacesClause getInterfacesClause()
getSourceInterfaces()
.SourceClassBody getSourceBody()
java.util.List<SourceTypeParameter> getSourceTypeParameters()
SourceTypeReference getSourceSuperclass()
void setSourceSuperclass(SourceTypeReference superclass)
java.lang.UnsupportedOperationException
- if this class may not have a superclass.java.lang.IllegalStateException
- if the input element is already linked.java.util.List<SourceTypeReference> getSourceInterfaces()
java.util.List<SourceMember> getSourceMembers()
java.util.Collection getSourceMemberVariables()
SourceMemberVariable getSourceMemberVariable(java.lang.String name)
name
- Require non-null.java.util.List<SourceEnumConstant> getSourceEnumConstants()
java.util.List<SourceFieldDeclaration> getSourceFieldDeclarations()
java.util.Collection<SourceFieldVariable> getSourceFieldVariables()
SourceFieldVariable getSourceFieldVariable(java.lang.String name)
name
- Require non-null.java.util.List<SourceMethod> getSourceMethods()
java.util.Collection<SourceMethod> getSourceMethods(java.lang.String name)
name
- Require non-null.SourceMethod getSourceMethod(java.lang.String name, JavaType[] targetTypes)
name
- Require non-null.targetTypes
- Null indicates an empty parameter list.java.util.List<SourceMethod> getSourceConstructors()
SourceMethod getSourceConstructor(JavaType[] targetTypes)
targetTypes
- Null indicates an empty parameter list.java.util.List<SourceClass> getSourceClasses()
SourceClass getSourceClass(java.lang.String name)
name
- Require non-null.java.util.List<SourceClassInitializer> getSourceInitializers()
SourceMember getOwningMember()
The Java VM spec 3rd ed requires that local and anonymous classes have an attribute specifying the enclosing method. At a source level, we'll return the owning member.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |