@Beta public interface MutableTypeDeclaration extends MutableMemberDeclaration, TypeDeclaration
| Modifier and Type | Method and Description |
|---|---|
MutableConstructorDeclaration |
addConstructor(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableConstructorDeclaration> initializer)
Adds a new constructor to this type declaration.
|
MutableFieldDeclaration |
addField(java.lang.String name,
org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableFieldDeclaration> initializer)
Adds a new field with the given name.
|
MutableMethodDeclaration |
addMethod(java.lang.String name,
org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableMethodDeclaration> initializer)
Adds a new method with the given name to this type declaration.
|
MutableConstructorDeclaration |
findDeclaredConstructor(TypeReference... parameterTypes) |
MutableFieldDeclaration |
findDeclaredField(java.lang.String name) |
MutableMethodDeclaration |
findDeclaredMethod(java.lang.String name,
TypeReference... parameterTypes) |
MutableTypeDeclaration |
findDeclaredType(java.lang.String name) |
java.lang.Iterable<? extends MutableAnnotationTypeDeclaration> |
getDeclaredAnnotationTypes() |
java.lang.Iterable<? extends MutableClassDeclaration> |
getDeclaredClasses() |
java.lang.Iterable<? extends MutableConstructorDeclaration> |
getDeclaredConstructors() |
java.lang.Iterable<? extends MutableEnumerationTypeDeclaration> |
getDeclaredEnumerationTypes() |
java.lang.Iterable<? extends MutableFieldDeclaration> |
getDeclaredFields() |
java.lang.Iterable<? extends MutableInterfaceDeclaration> |
getDeclaredInterfaces() |
java.lang.Iterable<? extends MutableMemberDeclaration> |
getDeclaredMembers() |
java.lang.Iterable<? extends MutableMethodDeclaration> |
getDeclaredMethods() |
java.lang.Iterable<? extends MutableTypeDeclaration> |
getDeclaredTypes() |
void |
remove()
It is not possible to remove a type.
|
void |
setSimpleName(java.lang.String simpleName)
It is not possible to rename a type.
|
getDeclaringType, setDeprecated, setDocComment, setVisibilitymarkAsReadaddAnnotation, removeAnnotationgetQualifiedName, isAssignableFromgetDocComment, getModifiers, getVisibility, isDeprecatedfindAnnotation, getAnnotationsjava.lang.Iterable<? extends MutableMemberDeclaration> getDeclaredMembers()
getDeclaredMembers in interface TypeDeclarationjava.lang.Iterable<? extends MutableMethodDeclaration> getDeclaredMethods()
getDeclaredMethods in interface TypeDeclarationjava.lang.Iterable<? extends MutableFieldDeclaration> getDeclaredFields()
getDeclaredFields in interface TypeDeclarationjava.lang.Iterable<? extends MutableConstructorDeclaration> getDeclaredConstructors()
getDeclaredConstructors in interface TypeDeclarationjava.lang.Iterable<? extends MutableClassDeclaration> getDeclaredClasses()
getDeclaredClasses in interface TypeDeclarationjava.lang.Iterable<? extends MutableInterfaceDeclaration> getDeclaredInterfaces()
getDeclaredInterfaces in interface TypeDeclarationjava.lang.Iterable<? extends MutableEnumerationTypeDeclaration> getDeclaredEnumerationTypes()
getDeclaredEnumerationTypes in interface TypeDeclarationjava.lang.Iterable<? extends MutableAnnotationTypeDeclaration> getDeclaredAnnotationTypes()
getDeclaredAnnotationTypes in interface TypeDeclarationjava.lang.Iterable<? extends MutableTypeDeclaration> getDeclaredTypes()
getDeclaredTypes in interface TypeDeclarationMutableFieldDeclaration findDeclaredField(java.lang.String name)
findDeclaredField in interface TypeDeclarationname - of the featurenull of no such field exists.MutableTypeDeclaration findDeclaredType(java.lang.String name)
findDeclaredType in interface TypeDeclarationname - of the nested typenull of no such type exists.MutableMethodDeclaration findDeclaredMethod(java.lang.String name, TypeReference... parameterTypes)
findDeclaredMethod in interface TypeDeclarationname - of the methodparameterTypes - - the types of the methodnull if no such method exists.MutableConstructorDeclaration findDeclaredConstructor(TypeReference... parameterTypes)
findDeclaredConstructor in interface TypeDeclarationparameterTypes - - the parameter types of the constructornull if no such constructors exists.MutableFieldDeclaration addField(java.lang.String name, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableFieldDeclaration> initializer)
name - the name of the field to be added, must be not nullinitializer - a callback for further initialization of the created field, must be not nulljava.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 nullMutableMethodDeclaration addMethod(java.lang.String name, org.eclipse.xtext.xbase.lib.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 nullMutableConstructorDeclaration addConstructor(org.eclipse.xtext.xbase.lib.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 nullvoid setSimpleName(java.lang.String simpleName)
setSimpleName in interface MutableNamedElementsimpleName - the simple name of this element, must not be nulljava.lang.UnsupportedOperationException - alwaysvoid remove()
remove in interface MutableElementjava.lang.UnsupportedOperationException - always