@Beta public interface MutableEnumerationTypeDeclaration extends MutableTypeDeclaration, EnumerationTypeDeclaration
Modifier and Type | Method and Description |
---|---|
MutableEnumerationValueDeclaration |
addValue(java.lang.String name,
Procedures.Procedure1<MutableEnumerationValueDeclaration> initializer)
Adds a new value with the given name.
|
MutableEnumerationValueDeclaration |
findDeclaredValue(java.lang.String name) |
java.lang.Iterable<? extends MutableEnumerationValueDeclaration> |
getDeclaredValues() |
addConstructor, addField, addMethod, findDeclaredConstructor, findDeclaredField, findDeclaredMethod, findDeclaredType, getDeclaredAnnotationTypes, getDeclaredClasses, getDeclaredConstructors, getDeclaredEnumerationTypes, getDeclaredFields, getDeclaredInterfaces, getDeclaredMembers, getDeclaredMethods, getDeclaredTypes, remove, setSimpleName
getDeclaringType, setDeprecated, setDocComment, setVisibility
markAsRead
addAnnotation, removeAnnotation
getQualifiedName, isAssignableFrom
getDocComment, getModifiers, getVisibility, isDeprecated
findAnnotation, getAnnotations
java.lang.Iterable<? extends MutableEnumerationValueDeclaration> getDeclaredValues()
getDeclaredValues
in interface EnumerationTypeDeclaration
MutableEnumerationValueDeclaration findDeclaredValue(java.lang.String name)
findDeclaredValue
in interface EnumerationTypeDeclaration
name
- of the featurenull
of no such value exists.MutableEnumerationValueDeclaration addValue(java.lang.String name, Procedures.Procedure1<MutableEnumerationValueDeclaration> initializer)
name
- the name of the field to be added, must be not null
initializer
- a callback for further initialization of the created value, must be not null
java.lang.IllegalArgumentException
- if the name
is not a valid java identifier or the initializer
is null