|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cuba.util.codegen.AbstractWSAdapterGenerator cuba.util.codegen.WSTAdapterGenerator
public class WSTAdapterGenerator
WSTAdapterGenerator.
Field Summary | |
---|---|
protected CUBAComponent |
component
|
protected java.lang.Class |
externalInterface
|
protected java.lang.String |
externalInterfacePackage
|
protected java.lang.Class |
implClass
|
protected java.lang.String |
implPackage
|
protected java.lang.Class |
internalInterface
|
protected java.lang.String |
internalInterfacePackage
|
static java.lang.String |
METHODPARAMNAME_PREFIX
|
static java.lang.String |
METHODRETURN
|
protected AdapterGeneratorOptions |
options
|
Constructor Summary | |
---|---|
WSTAdapterGenerator(CUBAComponent component,
java.lang.String internalInterfacePackage,
java.lang.String externalInterfacePackage,
java.lang.String implPackage,
AdapterGeneratorOptions options)
Constructor. |
Method Summary | |
---|---|
protected void |
checkSerializable(java.lang.Class type)
|
protected void |
checkSignature(java.lang.reflect.Method method,
boolean external)
|
protected void |
collectForeignType(java.lang.String homePackage,
java.util.HashSet types,
java.lang.Class type)
|
protected GeneratorResult |
generate(GeneratorResult result)
|
protected void |
generateClientAdaptorConstructor(GeneratedFile adapterFile,
java.lang.String className)
Generate the constructor for the client-adaptor class to use the service-locator. |
protected void |
generateClientAdaptorIdentifier(GeneratedFile adapterFile)
Generate the overriden identifier-method (getSymbolicName()) for the client-adaptor-class. |
protected void |
generateClientAdaptorImports(GeneratedFile wstClientFile)
Generate the import declaration |
protected void |
generateClientAdaptorMethod(GeneratedFile adapterFile,
java.lang.reflect.Method pMethod)
Generate method-implementation for client-adaptor. |
protected void |
generateComponentInjection(GeneratedFile adapter)
|
protected void |
generateCoreMethodCall(GeneratedFile adapter,
java.lang.String methodName,
java.lang.Class[] paramTypes)
|
protected void |
generateDependencyInjection(GeneratedFile adapter)
|
protected void |
generateEntityManagerInjection(GeneratedFile adapter)
|
protected void |
generateEnvironmentInjection(GeneratedFile adapter)
|
protected void |
generateFileHeader(GeneratedFile adapter,
java.lang.String info,
java.lang.Class interfaceType)
|
protected void |
generateInjectionStatement(GeneratedFile adapter,
Reference ref,
java.lang.String getter)
|
protected void |
generateLifecyleCall(GeneratedFile adapter,
java.lang.String callType)
|
protected void |
generatePostActivate(GeneratedFile adapter)
|
protected void |
generatePostConstruct(GeneratedFile adapter)
|
protected void |
generatePreDestroy(GeneratedFile adapter)
|
protected void |
generatePrePassivate(GeneratedFile adapter)
|
protected void |
generateResourceInjection(GeneratedFile adapter)
|
protected void |
generateServerAdaptorConstructor(GeneratedFile adapterFile,
java.lang.String className)
Generate the constructor for the client-adaptor class to use the service-locator. |
protected void |
generateServerAdaptorMethod(GeneratedFile adapterFile,
java.lang.reflect.Method pMethod)
Generate method-implementation for server-adaptor. |
protected void |
generateServerMethodDeclarator(GeneratedFile adapterFile,
java.lang.reflect.Method method)
Method-Declaration is changed for tunnel-adapter: All types are changed to string All exceptions are removed. |
protected void |
generateSoapClasses(java.lang.String pInfo,
java.lang.String pNameOfWSTI)
Generates SOAP-classes ... |
protected void |
generateWSTClientAdaptor(java.lang.String pInfo,
GeneratorResult result)
Create the class "*_WSTClient" for the webservice-tunnel based on the external interface of the component. |
protected void |
generateWSTInterface(java.lang.String pInfo,
GeneratorResult result)
Create the interface "*_WSTI" for the webservice-tunnel based on the external interface of the component. |
protected void |
generateWSTServerAdaptor(java.lang.String pInfo,
GeneratorResult result)
|
protected java.lang.String |
getAdaptorName(java.lang.String pSuffix)
|
protected java.lang.reflect.Method |
getMethod(java.lang.Class type,
java.lang.String methodName,
java.lang.Class[] paramTypes)
|
protected java.lang.reflect.Method |
getMethod(java.lang.String typeName,
java.lang.String methodName)
|
protected java.lang.reflect.Method |
getMethod(java.lang.String typeName,
java.lang.String methodName,
java.lang.Class[] paramTypes)
|
protected java.lang.String |
getPrimitiveWrapperClass(java.lang.String primitive)
Method to get the wrapperclassname of a primitive type |
protected java.lang.String |
getSimpleTypeName(java.lang.Class type)
Does the same as Class.getSimpleName() in Java 5. |
protected java.lang.String |
getWSTCompliantType(java.lang.Class pSourceClass)
Return primitives as they are and string for complex-types. |
protected java.lang.String |
getWSTInterfaceName()
|
protected boolean |
isVoid(java.lang.reflect.Method method)
|
protected boolean |
isWSTCompliantType(java.lang.Class pSourceClass)
|
protected java.lang.String |
methodMemberName(java.lang.reflect.Method method)
|
protected GeneratedFile |
open(java.lang.String basename)
|
protected GeneratedFile |
open(java.lang.String basename,
java.lang.String packageName)
|
Methods inherited from class cuba.util.codegen.AbstractWSAdapterGenerator |
---|
generateMethodDeclarator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String METHODPARAMNAME_PREFIX
public static final java.lang.String METHODRETURN
protected CUBAComponent component
protected java.lang.Class externalInterface
protected java.lang.Class internalInterface
protected java.lang.Class implClass
protected java.lang.String externalInterfacePackage
protected java.lang.String internalInterfacePackage
protected java.lang.String implPackage
protected AdapterGeneratorOptions options
Constructor Detail |
---|
public WSTAdapterGenerator(CUBAComponent component, java.lang.String internalInterfacePackage, java.lang.String externalInterfacePackage, java.lang.String implPackage, AdapterGeneratorOptions options) throws GeneratorException
GeneratorException
Method Detail |
---|
protected GeneratorResult generate(GeneratorResult result) throws GeneratorException
GeneratorException
cuba.util.codegen.AbstractAdapterGenerator#generate()
protected java.lang.String getAdaptorName(java.lang.String pSuffix)
protected java.lang.String getWSTInterfaceName()
protected void generateWSTInterface(java.lang.String pInfo, GeneratorResult result) throws GeneratorException
GeneratorException
#generateServerMethodDeclarator(PrintStream, Method, boolean)
protected void generateServerMethodDeclarator(GeneratedFile adapterFile, java.lang.reflect.Method method) throws GeneratorException
GeneratorException
protected java.lang.String getWSTCompliantType(java.lang.Class pSourceClass)
protected boolean isWSTCompliantType(java.lang.Class pSourceClass)
protected void generateWSTClientAdaptor(java.lang.String pInfo, GeneratorResult result) throws GeneratorException
GeneratorException
protected void generateClientAdaptorImports(GeneratedFile wstClientFile)
protected void generateClientAdaptorConstructor(GeneratedFile adapterFile, java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected void generateClientAdaptorIdentifier(GeneratedFile adapterFile) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected void generateClientAdaptorMethod(GeneratedFile adapterFile, java.lang.reflect.Method pMethod)
protected java.lang.String getPrimitiveWrapperClass(java.lang.String primitive)
primitive
- Name of the primitive
protected void generateWSTServerAdaptor(java.lang.String pInfo, GeneratorResult result) throws GeneratorException
GeneratorException
protected void generateServerAdaptorConstructor(GeneratedFile adapterFile, java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected void generateServerAdaptorMethod(GeneratedFile adapterFile, java.lang.reflect.Method pMethod) throws GeneratorException
GeneratorException
protected void generateSoapClasses(java.lang.String pInfo, java.lang.String pNameOfWSTI) throws GeneratorException
Therefore the axis-tools "java2wsdl" and "wsdl2java" are used.
(The WSDL is deleted after generation also any other unwanted class.)
GeneratorException
#generateWSTInterface(String)
,
AxisUtils#generateWSDL(CUBAComponent, String, String, String, String)
,
AxisUtils#generateWSDD(CUBAComponent, String)
protected GeneratedFile open(java.lang.String basename) throws GeneratorException
GeneratorException
protected GeneratedFile open(java.lang.String basename, java.lang.String packageName) throws GeneratorException
GeneratorException
protected void generateFileHeader(GeneratedFile adapter, java.lang.String info, java.lang.Class interfaceType)
protected void collectForeignType(java.lang.String homePackage, java.util.HashSet types, java.lang.Class type)
protected java.lang.String getSimpleTypeName(java.lang.Class type)
protected void checkSerializable(java.lang.Class type) throws GeneratorException
GeneratorException
protected void checkSignature(java.lang.reflect.Method method, boolean external) throws GeneratorException
GeneratorException
protected java.lang.reflect.Method getMethod(java.lang.Class type, java.lang.String methodName, java.lang.Class[] paramTypes) throws GeneratorException
GeneratorException
protected java.lang.reflect.Method getMethod(java.lang.String typeName, java.lang.String methodName, java.lang.Class[] paramTypes) throws GeneratorException
GeneratorException
protected java.lang.reflect.Method getMethod(java.lang.String typeName, java.lang.String methodName) throws GeneratorException
GeneratorException
protected java.lang.String methodMemberName(java.lang.reflect.Method method)
protected void generateCoreMethodCall(GeneratedFile adapter, java.lang.String methodName, java.lang.Class[] paramTypes)
protected void generateInjectionStatement(GeneratedFile adapter, Reference ref, java.lang.String getter)
protected void generateEnvironmentInjection(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generateResourceInjection(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generateComponentInjection(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generateEntityManagerInjection(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generateDependencyInjection(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generateLifecyleCall(GeneratedFile adapter, java.lang.String callType) throws GeneratorException
GeneratorException
protected void generatePreDestroy(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generatePostConstruct(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generatePrePassivate(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected void generatePostActivate(GeneratedFile adapter) throws GeneratorException
GeneratorException
protected boolean isVoid(java.lang.reflect.Method method)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |