public interface SourceClass extends SourceMember, SourceHasName, SourceBlockElement, JavaClass
| Modifier and Type | Field and Description | 
|---|---|
static SourceClass[] | 
EMPTY_ARRAY  | 
static int | 
PRINT_DECLARATION
Constant that can be used as the format argument in calls to
 SourceClass.print(int) or SourceClass.print(PrintWriter, int). 
 | 
static int | 
PRINT_NAME
Constant that can be used as the format argument in calls to
 SourceClass.print(int) or SourceClass.print(PrintWriter, int). 
 | 
static int | 
PRINT_NAME_AND_PARAMETERS
Constant that can be used as the format argument in calls to
 SourceClass.print(int) or SourceClass.print(PrintWriter, int). 
 | 
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT| Modifier and Type | Method and Description | 
|---|---|
JavaClass | 
getCompiledObject()
Calls resolve() implicitly and return the resolved JavaClass. 
 | 
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. 
 | 
java.util.List<SourceClass> | 
getSourceAnonymousClasses()
Gets the list of anonymous class declarations, where
 the enclosing class of those anonymous classes is this
 SourceClass. 
 | 
SourceClassBody | 
getSourceBody()
Gets the class body object. 
 | 
SourceClass | 
getSourceClass(java.lang.String name)
Gets the member class with the incoming name. 
 | 
java.util.List<SourceClass> | 
getSourceClasses()
Gets the list of 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<SourceClass> | 
getSourceLocalClasses()
Gets the list of local class declarations, where
 the enclosing class of those local classes is this
 SourceClass. 
 | 
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<SourceMemberVariable> | 
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()
Deprecated. 
 
Use JavaType.isAnonymousClass() instead. 
 | 
boolean | 
isClass()
True if this is a class or an enum type. 
 | 
boolean | 
isEnum()
True if this is an enum type. 
 | 
boolean | 
isExported()  | 
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. 
 | 
getEnclosingClass, hasDeprecatedTag, hasHiddenTagaddModifiers, getModifiers, getSourceAnnotations, hasSourceAnnotation, isValidModifiers, removeModifiers, setModifiersgetDocComment, setDocCommentaddSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, createContext, getBinding, getChildren, getChildren, getContainedElements, getContext, getEndOffset, getFirstToken, getJdkVersion, getLastToken, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingAfter, getSiblingBefore, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, getTokens, getTokens, hasErrors, print, print, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelfgetName, getNameElement, setName, setNameElementclearCompiledInfo, getSourceElementgetAnonymousClassSuperType, getArrayDimensions, getBaseComponentType, getClass, getClasses, getClinitMethod, getClosestClass, getComponentType, getDeclaredAnonymousClasses, getDeclaredClass, getDeclaredClasses, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredLocalClasses, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getDescriptor, getField, getFields, getHierarchy, getInterfaces, getMethod, getMethods, getMethods, getName, getNonParameterizedType, getPackage, getProvider, getQualifiedName, getQualifyingType, getRawName, getSignature, getSuperclass, getThisValue, getTypeAnnotations, getTypeErasure, getTypeSignature, getUniqueIdentifier, getUnqualifiedName, getUnresolvedInterfaces, getUnresolvedSuperclass, getURL, getVMName, isAnonymousClass, isArray, isAssignableFrom, isErasedType, isLocalClass, isMemberClass, isPrimitive, isSubtypeOf, setQualifyingTypegetActualTypeArguments, getTypeParameter, getTypeParameters, hasActualTypeArguments, hasTypeParametersgetOwningClass, isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticgetResolvedType, getUnresolvedTypegetAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, hasAnnotation, hasDeclaredAnnotationgetElementKind, getFile, getModifiers, getOwner, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfostatic final SourceClass[] EMPTY_ARRAY
static final int PRINT_NAME
static final int PRINT_DECLARATION
static final int PRINT_NAME_AND_PARAMETERS
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 JavaTypeboolean isEnum()
boolean isAnnotation()
isAnnotation in interface JavaTypeSourcePackage getSourcePackage()
java.lang.String getPackageName()
getPackageName in interface JavaTypeboolean isExported()
isExported in interface JavaType@Deprecated 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<SourceMemberVariable> 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()
java.util.List<SourceClass> getSourceAnonymousClasses()
java.util.List<SourceClass> getSourceLocalClasses()
SourceClass getSourceClass(java.lang.String name)
name - Require non-null.java.util.List<SourceClassInitializer> getSourceInitializers()
JavaClass getCompiledObject()
getCompiledObject in interface SourceElementSourceMember getOwningMember()