public class EnumTemplate extends BaseTemplate
Constructor and Description |
---|
EnumTemplate(org.opendaylight.mdsal.binding.java.api.generator.AbstractJavaGeneratedType javaType,
Enumeration enums)
Constructs instance of this class with concrete
enums . |
EnumTemplate(Enumeration enums)
Constructs instance of this class with concrete
enums . |
Modifier and Type | Method and Description |
---|---|
CharSequence |
body()
Template method which generates enumeration body (declaration + enumeration items).
|
CharSequence |
generateAsInnerClass()
Generates only JAVA enumeration source code.
|
CharSequence |
writeEnumeration(Enumeration enumeration) |
CharSequence |
writeEnumItem(String name,
String mappedName,
int value,
String description) |
asArguments, asArgumentsDeclaration, asCode, asJavadoc, asLink, checkArgument, emitConstant, encodeJavadocSymbols, fieldName, formatDataForJavaDoc, formatDataForJavaDoc, formatDataForJavaDoc, formatToParagraph, generate, generateCheckers, generateParameters, generateToString, getterMethod, getterMethodName, hashCodeResult, propertyNameFromGetter, setterMethod, wrapToDocumentation
public EnumTemplate(org.opendaylight.mdsal.binding.java.api.generator.AbstractJavaGeneratedType javaType, Enumeration enums)
enums
.enums
- enumeration which will be transformed to JAVA source codepublic EnumTemplate(Enumeration enums)
enums
.enums
- enumeration which will be transformed to JAVA source codepublic CharSequence generateAsInnerClass()
public CharSequence writeEnumItem(String name, String mappedName, int value, String description)
public CharSequence body()
body
in class BaseTemplate
public CharSequence writeEnumeration(Enumeration enumeration)
Copyright © 2019 OpenDaylight. All rights reserved.