org.jboss.shrinkwrap.descriptor.metadata.codegen
Class CodeGen

java.lang.Object
  extended by org.jboss.shrinkwrap.descriptor.metadata.codegen.CodeGen

public class CodeGen
extends Object

Experimental class which may replaced the current xslt based java code generation step.

Author:
Ralf Battenfeld

Constructor Summary
CodeGen(Metadata metadata)
           
 
Method Summary
 void generateEnums()
          Generates all enumeration classes.
 void generateInferfaces()
           
static String getEnumConstantName(String enumConstant)
           
 String getFqnClass(MetadataElement element)
           
static String getPascalizeCase(String str)
           
 boolean isEnum(String elementType)
          Returns true, if the given string argument represents a enumeration class.
 String[] splitElementType(String elementType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeGen

public CodeGen(Metadata metadata)
Method Detail

generateEnums

public void generateEnums()
                   throws com.sun.codemodel.JClassAlreadyExistsException,
                          IOException
Generates all enumeration classes.

Parameters:
metadata -
Throws:
com.sun.codemodel.JClassAlreadyExistsException
IOException

generateInferfaces

public void generateInferfaces()
                        throws com.sun.codemodel.JClassAlreadyExistsException,
                               IOException,
                               ClassNotFoundException
Throws:
com.sun.codemodel.JClassAlreadyExistsException
IOException
ClassNotFoundException

getPascalizeCase

public static String getPascalizeCase(String str)

getEnumConstantName

public static String getEnumConstantName(String enumConstant)

getFqnClass

public String getFqnClass(MetadataElement element)

splitElementType

public String[] splitElementType(String elementType)

isEnum

public boolean isEnum(String elementType)
Returns true, if the given string argument represents a enumeration class.

Parameters:
elementName -
Returns:
true, if the string represents a enumeration, otherwise false.


Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.