Apache CXF API

org.apache.cxf.jaxrs.ext.codegen
Class CodeGeneratorProvider

java.lang.Object
  extended by org.apache.cxf.jaxrs.ext.codegen.CodeGeneratorProvider
All Implemented Interfaces:
RequestHandler

public class CodeGeneratorProvider
extends Object
implements RequestHandler


Field Summary
static String CODE_QUERY
           
static String CODE_TYPE_GRAMMAR
           
static String CODE_TYPE_PROXY
           
static String CODE_TYPE_QUERY
           
static String CODE_TYPE_WEB
           
static String LANGUAGE_QUERY
           
static String OS_QUERY
           
static String SOURCE_QUERY
           
 
Constructor Summary
CodeGeneratorProvider()
           
 
Method Summary
protected  javax.ws.rs.core.Response doHandleRequest(Message m, ClassResourceInfo resourceClass)
           
protected  void generateEmptyMethodBody(StringBuilder sbCode, boolean responseTypeAvailable)
           
 void generateMainClass(Element resourcesEl, File src)
           
protected  void generateSource(String wadl, File srcDir, String codeType)
           
protected  String getPathSep()
           
protected  String getStem(ClassResourceInfo cri, String suffix)
           
protected  String getWadl(Message m, ClassResourceInfo resourceClass)
           
 javax.ws.rs.core.Response handleRequest(Message m, ClassResourceInfo resourceClass)
           
 void removeCode(ClassResourceInfo cri)
           
 void setGenerateInterfaces(boolean generateInterfaces)
           
 void setImportsComparator(Comparator<String> importsComparator)
           
 void setUriInfo(javax.ws.rs.core.UriInfo uriInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_QUERY

public static final String CODE_QUERY
See Also:
Constant Field Values

LANGUAGE_QUERY

public static final String LANGUAGE_QUERY
See Also:
Constant Field Values

OS_QUERY

public static final String OS_QUERY
See Also:
Constant Field Values

SOURCE_QUERY

public static final String SOURCE_QUERY
See Also:
Constant Field Values

CODE_TYPE_QUERY

public static final String CODE_TYPE_QUERY
See Also:
Constant Field Values

CODE_TYPE_GRAMMAR

public static final String CODE_TYPE_GRAMMAR
See Also:
Constant Field Values

CODE_TYPE_PROXY

public static final String CODE_TYPE_PROXY
See Also:
Constant Field Values

CODE_TYPE_WEB

public static final String CODE_TYPE_WEB
See Also:
Constant Field Values
Constructor Detail

CodeGeneratorProvider

public CodeGeneratorProvider()
Method Detail

setUriInfo

@Context
public void setUriInfo(javax.ws.rs.core.UriInfo uriInfo)

handleRequest

public javax.ws.rs.core.Response handleRequest(Message m,
                                               ClassResourceInfo resourceClass)
Specified by:
handleRequest in interface RequestHandler

doHandleRequest

protected javax.ws.rs.core.Response doHandleRequest(Message m,
                                                    ClassResourceInfo resourceClass)

getPathSep

protected String getPathSep()

removeCode

public void removeCode(ClassResourceInfo cri)

getStem

protected String getStem(ClassResourceInfo cri,
                         String suffix)

getWadl

protected String getWadl(Message m,
                         ClassResourceInfo resourceClass)

generateSource

protected void generateSource(String wadl,
                              File srcDir,
                              String codeType)

generateMainClass

public void generateMainClass(Element resourcesEl,
                              File src)

generateEmptyMethodBody

protected void generateEmptyMethodBody(StringBuilder sbCode,
                                       boolean responseTypeAvailable)

setImportsComparator

public void setImportsComparator(Comparator<String> importsComparator)

setGenerateInterfaces

public void setGenerateInterfaces(boolean generateInterfaces)

Apache CXF API

Apache CXF