@Beta public interface MutableTypeDeclaration extends MutableMemberDeclaration, TypeDeclaration
getDeclaringType, setDeprecated, setDocComment, setVisibility
markAsRead
addAnnotation, removeAnnotation
getQualifiedName, isAssignableFrom
getDocComment, getModifiers, getVisibility, isDeprecated
findAnnotation, getAnnotations
java.lang.Iterable<? extends MutableMemberDeclaration> getDeclaredMembers()
getDeclaredMembers
in interface TypeDeclaration
java.lang.Iterable<? extends MutableMethodDeclaration> getDeclaredMethods()
getDeclaredMethods
in interface TypeDeclaration
java.lang.Iterable<? extends MutableFieldDeclaration> getDeclaredFields()
getDeclaredFields
in interface TypeDeclaration
java.lang.Iterable<? extends MutableConstructorDeclaration> getDeclaredConstructors()
getDeclaredConstructors
in interface TypeDeclaration
java.lang.Iterable<? extends MutableClassDeclaration> getDeclaredClasses()
getDeclaredClasses
in interface TypeDeclaration
java.lang.Iterable<? extends MutableInterfaceDeclaration> getDeclaredInterfaces()
getDeclaredInterfaces
in interface TypeDeclaration
java.lang.Iterable<? extends MutableEnumerationTypeDeclaration> getDeclaredEnumerationTypes()
getDeclaredEnumerationTypes
in interface TypeDeclaration
java.lang.Iterable<? extends MutableAnnotationTypeDeclaration> getDeclaredAnnotationTypes()
getDeclaredAnnotationTypes
in interface TypeDeclaration
java.lang.Iterable<? extends MutableTypeDeclaration> getDeclaredTypes()
getDeclaredTypes
in interface TypeDeclaration
MutableFieldDeclaration findDeclaredField(java.lang.String name)
findDeclaredField
in interface TypeDeclaration
name
- of the featurenull
of no such field exists.MutableTypeDeclaration findDeclaredType(java.lang.String name)
findDeclaredType
in interface TypeDeclaration
name
- of the nested typenull
of no such type exists.MutableMethodDeclaration findDeclaredMethod(java.lang.String name, TypeReference... parameterTypes)
findDeclaredMethod
in interface TypeDeclaration
name
- of the methodparameterTypes
- - the types of the methodnull
if no such method exists.MutableConstructorDeclaration findDeclaredConstructor(TypeReference... parameterTypes)
findDeclaredConstructor
in interface TypeDeclaration
parameterTypes
- - the parameter types of the constructornull
if no such constructors exists.MutableFieldDeclaration addField(java.lang.String name, Procedures.Procedure1<MutableFieldDeclaration> initializer)
name
- the name of the field to be added, must be not null
initializer
- a callback for further initialization of the created field, must be not null
java.lang.UnsupportedOperationException
- if the underlying type declaration is not capable of containing methods.java.lang.IllegalArgumentException
- if the name
is not a valid java identifier or the initializer
is null
MutableMethodDeclaration addMethod(java.lang.String name, Procedures.Procedure1<MutableMethodDeclaration> initializer)
name
- the name of the methodinitializer
- a call back for further initialization of the methodjava.lang.UnsupportedOperationException
- if the underlying type declaration is not capable of containing methods.java.lang.IllegalArgumentException
- if the name
is not a valid java identifier or the initializer
is null
MutableConstructorDeclaration addConstructor(Procedures.Procedure1<MutableConstructorDeclaration> initializer)
initializer
- a call back for further initialization of the constructorjava.lang.UnsupportedOperationException
- if the underlying type declaration is not capable of containing constructors.java.lang.IllegalArgumentException
- if the initializer
is null
void setSimpleName(java.lang.String simpleName)
setSimpleName
in interface MutableNamedElement
simpleName
- the simple name of this element, must not be null
java.lang.UnsupportedOperationException
- alwaysvoid remove()
remove
in interface MutableElement
java.lang.UnsupportedOperationException
- always