public interface MClass extends MMember, JClass
Mutable version of JClass.
| Modifier and Type | Method and Description |
|---|---|
void |
addInterface(JClass interf)
Adds to the list of interfaces implemented by this class.
|
void |
addInterface(String className)
Adds to the list of interfaces implemented by this class.
|
void |
addInterfaceUnqualified(String unqualifiedClassName)
Adds to the list of interfaces implemented by this class.
|
MConstructor |
addNewConstructor()
Creates a new constructor, adds it to this class, and returns it.
|
JProperty |
addNewDeclaredProperty(String name,
JMethod getter,
JMethod setter) |
MField |
addNewField()
Creates a new field, adds it to this class, and returns it.
|
MClass |
addNewInnerClass(String name) |
MMethod |
addNewMethod()
Creates a new method, adds it to this class, and returns it.
|
JProperty |
addNewProperty(String name,
JMethod getter,
JMethod setter) |
MConstructor[] |
getMutableConstructors()
Returns the constructors declared on this class.
|
MField[] |
getMutableFields()
Returns the fields declared on this class.
|
MMethod[] |
getMutableMethods()
Returns the EditableMethods declared on this class.
|
void |
removeConstructor(MConstructor constr)
Removes a constructor from this class.
|
void |
removeDeclaredProperty(JProperty prop) |
void |
removeField(MField field)
Removes the given field from this class.
|
void |
removeInnerClass(MClass clazz) |
void |
removeInterface(JClass interf)
Removes an interface from the list of interfaces implemented by
this class.
|
void |
removeInterface(String className)
Removes a named interface from the list of interfaces implemented by
this class.
|
void |
removeMethod(MMethod method)
Removes the given method from this class.
|
void |
removeProperty(JProperty prop) |
void |
setIsAnnotationType(boolean b) |
void |
setIsEnumType(boolean b) |
void |
setIsInterface(boolean b) |
void |
setSuperclass(JClass clazz)
Sets the class which this class extends.
|
void |
setSuperclass(String qualifiedClassName)
Sets the class which this class extends.
|
void |
setSuperclassUnqualified(String unqualifiedClassName)
Sets the name of this class that this class extends.
|
setModifiersaddLiteralAnnotation, createComment, findOrCreateAnnotation, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeCommentaccept, createSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleNameequals, forName, getArrayComponentType, getArrayDimensions, getClasses, getClassLoader, getConstructors, getContainingClass, getContainingPackage, getDeclaredFields, getDeclaredMethods, getDeclaredProperties, getFieldDescriptor, getFields, getImportedClasses, getImportedPackages, getInterfaces, getMethods, getPrimitiveClass, getProperties, getSuperclass, isAbstract, isAnnotationType, isArrayType, isAssignableFrom, isBuiltinType, isEnumType, isFinal, isInterface, isObjectType, isPrimitiveType, isStatic, isUnresolvedType, isVoidTypegetModifiers, isPackagePrivate, isPrivate, isProtected, isPublicgetAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getCommentaccept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, toStringvoid setIsInterface(boolean b)
void setIsAnnotationType(boolean b)
void setIsEnumType(boolean b)
void setSuperclass(String qualifiedClassName)
IllegalArgumentException - if the name is not a valid class name.void setSuperclassUnqualified(String unqualifiedClassName)
IllegalArgumentException - if the name is not a valid class name.void setSuperclass(JClass clazz)
IllegalArgumentException - if the given class cannot be extended
(i.e. final classes, interfaces, void, primitives, arrays).void addInterface(String className)
IllegalArgumentException - if the parameter is null or is not
a valid class name.void addInterfaceUnqualified(String unqualifiedClassName)
IllegalArgumentException - if the parameter is null or is not
a valid class name.void addInterface(JClass interf)
IllegalArgumentException - if the given class cannot be implemented
(i.e. is not an interface).void removeInterface(String className)
IllegalArgumentException - if the parameter is null or is not
a valid class name.void removeInterface(JClass interf)
IllegalArgumentException - if the parameter is null or is not
an interface.MConstructor addNewConstructor()
void removeConstructor(MConstructor constr)
MConstructor[] getMutableConstructors()
MField addNewField()
void removeField(MField field)
MField[] getMutableFields()
MMethod addNewMethod()
void removeMethod(MMethod method)
MMethod[] getMutableMethods()
void removeProperty(JProperty prop)
JProperty addNewDeclaredProperty(String name, JMethod getter, JMethod setter)
void removeDeclaredProperty(JProperty prop)
void removeInnerClass(MClass clazz)
Copyright © 2010 - 2020 Adobe. All Rights Reserved