Interface MutableEnumerationTypeDeclaration
-
- All Superinterfaces:
AnnotationTarget,Declaration,Element,EnumerationTypeDeclaration,MemberDeclaration,MutableAnnotationTarget,MutableDeclaration,MutableElement,MutableMemberDeclaration,MutableNamedElement,MutableTypeDeclaration,NamedElement,Type,TypeDeclaration
@Beta public interface MutableEnumerationTypeDeclaration extends MutableTypeDeclaration, EnumerationTypeDeclaration
- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MutableEnumerationValueDeclarationaddValue(java.lang.String name, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableEnumerationValueDeclaration> initializer)Adds a new value with the given name.MutableEnumerationValueDeclarationfindDeclaredValue(java.lang.String name)java.lang.Iterable<? extends MutableEnumerationValueDeclaration>getDeclaredValues()-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTarget
findAnnotation, getAnnotations
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MemberDeclaration
getDocComment, getModifiers, getVisibility, isDeprecated
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTarget
addAnnotation, removeAnnotation
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableDeclaration
markAsRead
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableMemberDeclaration
getDeclaringType, setDeprecated, setDocComment, setVisibility
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableTypeDeclaration
addConstructor, addField, addMethod, findDeclaredConstructor, findDeclaredField, findDeclaredMethod, findDeclaredType, getDeclaredAnnotationTypes, getDeclaredClasses, getDeclaredConstructors, getDeclaredEnumerationTypes, getDeclaredFields, getDeclaredInterfaces, getDeclaredMembers, getDeclaredMethods, getDeclaredTypes, remove, setSimpleName
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.NamedElement
getCompilationUnit, getSimpleName
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.Type
getQualifiedName, isAssignableFrom
-
-
-
-
Method Detail
-
getDeclaredValues
java.lang.Iterable<? extends MutableEnumerationValueDeclaration> getDeclaredValues()
- Specified by:
getDeclaredValuesin interfaceEnumerationTypeDeclaration- Returns:
- the values directly declared and contained in the enumeration type declaration
-
findDeclaredValue
MutableEnumerationValueDeclaration findDeclaredValue(java.lang.String name)
- Specified by:
findDeclaredValuein interfaceEnumerationTypeDeclaration- Parameters:
name- of the feature- Returns:
- the declared value with the given name or
nullof no such value exists.
-
addValue
MutableEnumerationValueDeclaration addValue(java.lang.String name, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableEnumerationValueDeclaration> initializer)
Adds a new value with the given name.- Parameters:
name- the name of the field to be added, must be notnullinitializer- a callback for further initialization of the created value, must be notnull- Returns:
- the created value declaration
- Throws:
java.lang.IllegalArgumentException- if thenameis not a valid java identifier or theinitializerisnull
-
-