org.jsmiparser.codegen
Class EnumBuilder

java.lang.Object
  extended by org.jsmiparser.codegen.EnumBuilder

public class EnumBuilder
extends java.lang.Object


Field Summary
protected  com.sun.codemodel.JCodeModel codeModel
           
protected  com.sun.codemodel.JDefinedClass definedClass
           
protected  com.sun.codemodel.JFieldVar nameField
           
protected  CodeBuilderSettings settings
           
protected  org.jsmiparser.smi.SmiType type
           
protected  java.lang.String typeName
           
protected  com.sun.codemodel.JFieldVar valueField
           
 
Constructor Summary
EnumBuilder(CodeBuilderSettings settings, org.jsmiparser.smi.SmiType type, com.sun.codemodel.JCodeModel codeModel)
           
EnumBuilder(CodeBuilderSettings settings, org.jsmiparser.smi.SmiType type, java.lang.String typeName, com.sun.codemodel.JCodeModel codeModel)
           
 
Method Summary
protected  void addConstructor()
           
protected  void addEnumConstants()
           
protected  void addFields()
           
protected  void addInterfaces()
           
protected  void addJavadocs()
           
protected  void addNameGetter()
           
protected  void addToString()
           
protected  void addValueGetter()
           
 com.sun.codemodel.JDefinedClass build()
           
protected  com.sun.codemodel.JPackage determinePackage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

protected final CodeBuilderSettings settings

type

protected final org.jsmiparser.smi.SmiType type

typeName

protected final java.lang.String typeName

codeModel

protected final com.sun.codemodel.JCodeModel codeModel

definedClass

protected com.sun.codemodel.JDefinedClass definedClass

nameField

protected com.sun.codemodel.JFieldVar nameField

valueField

protected com.sun.codemodel.JFieldVar valueField
Constructor Detail

EnumBuilder

public EnumBuilder(CodeBuilderSettings settings,
                   org.jsmiparser.smi.SmiType type,
                   com.sun.codemodel.JCodeModel codeModel)

EnumBuilder

public EnumBuilder(CodeBuilderSettings settings,
                   org.jsmiparser.smi.SmiType type,
                   java.lang.String typeName,
                   com.sun.codemodel.JCodeModel codeModel)
Method Detail

build

public com.sun.codemodel.JDefinedClass build()

determinePackage

protected com.sun.codemodel.JPackage determinePackage()

addJavadocs

protected void addJavadocs()

addInterfaces

protected void addInterfaces()

addEnumConstants

protected void addEnumConstants()

addFields

protected void addFields()

addConstructor

protected void addConstructor()

addNameGetter

protected void addNameGetter()

addValueGetter

protected void addValueGetter()

addToString

protected void addToString()