|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Mutable version of JClass.
Method Summary | |
---|---|
void |
addInterface(JClass interf)
Adds to the list of interfaces implemented by this class. |
void |
addInterface(java.lang.String className)
Adds to the list of interfaces implemented by this class. |
void |
addInterfaceUnqualified(java.lang.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(java.lang.String name,
JMethod getter,
JMethod setter)
|
MField |
addNewField()
Creates a new field, adds it to this class, and returns it. |
MClass |
addNewInnerClass(java.lang.String name)
|
MMethod |
addNewMethod()
Creates a new method, adds it to this class, and returns it. |
JProperty |
addNewProperty(java.lang.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(java.lang.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 |
setSourceAvailable(boolean b)
Sets whether this JClass was populated from Java source. |
void |
setSuperclass(JClass clazz)
Sets the class which this class extends. |
void |
setSuperclass(java.lang.String qualifiedClassName)
Sets the class which this class extends. |
void |
setSuperclassUnqualified(java.lang.String unqualifiedClassName)
Sets the name of this class that this class extends. |
Methods inherited from interface org.codehaus.jam.mutable.MMember |
---|
setModifiers |
Methods inherited from interface org.codehaus.jam.mutable.MAnnotatedElement |
---|
addLiteralAnnotation, createComment, findOrCreateAnnotation, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeComment |
Methods inherited from interface org.codehaus.jam.mutable.MElement |
---|
accept, createSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleName |
Methods inherited from interface org.codehaus.jam.JElement |
---|
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, isSourceAvailable, toString |
Methods inherited from interface org.codehaus.jam.JAnnotatedElement |
---|
getAllJavadocTags, getAnnotation, getAnnotation, getAnnotations, getAnnotationValue, getComment |
Methods inherited from interface org.codehaus.jam.JMember |
---|
getContainingClass, getModifiers, isPackagePrivate, isPrivate, isProtected, isPublic |
Method Detail |
public void setIsInterface(boolean b)
public void setIsAnnotationType(boolean b)
public void setIsEnumType(boolean b)
public void setSuperclass(java.lang.String qualifiedClassName)
java.lang.IllegalArgumentException
- if the name is not a valid class name.public void setSuperclassUnqualified(java.lang.String unqualifiedClassName)
java.lang.IllegalArgumentException
- if the name is not a valid class name.public void setSuperclass(JClass clazz)
java.lang.IllegalArgumentException
- if the given class cannot be extended
(i.e. final classes, interfaces, void, primitives, arrays).public void addInterface(java.lang.String className)
java.lang.IllegalArgumentException
- if the parameter is null or is not
a valid class name.public void addInterfaceUnqualified(java.lang.String unqualifiedClassName)
java.lang.IllegalArgumentException
- if the parameter is null or is not
a valid class name.public void addInterface(JClass interf)
java.lang.IllegalArgumentException
- if the given class cannot be implemented
(i.e. is not an interface).public void removeInterface(java.lang.String className)
java.lang.IllegalArgumentException
- if the parameter is null or is not
a valid class name.public void removeInterface(JClass interf)
java.lang.IllegalArgumentException
- if the parameter is null or is not
an interface.public MConstructor addNewConstructor()
public void removeConstructor(MConstructor constr)
public MConstructor[] getMutableConstructors()
public MField addNewField()
public void removeField(MField field)
public MField[] getMutableFields()
public MMethod addNewMethod()
public void removeMethod(MMethod method)
public MMethod[] getMutableMethods()
public JProperty addNewProperty(java.lang.String name, JMethod getter, JMethod setter)
public void removeProperty(JProperty prop)
public JProperty addNewDeclaredProperty(java.lang.String name, JMethod getter, JMethod setter)
public void removeDeclaredProperty(JProperty prop)
public MClass addNewInnerClass(java.lang.String name)
public void removeInnerClass(MClass clazz)
public void setSourceAvailable(boolean b)
Sets whether this JClass was populated from Java source. The default is false.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |