|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.asm.ClassAdapter it.imolinfo.jbi4corba.webservice.generator.bcm.WebServiceAnnotationAdapter
public class WebServiceAnnotationAdapter
This class is used to add the annotations for the WebService. Also collect the exceptions classes name thrown by the operation methods. FIXME with method overloading the behavior is undefined.
Nested Class Summary | |
---|---|
class |
WebServiceAnnotationAdapter.SignatureDescription
Wrapper class for the description and signature of the analized methods |
Field Summary | |
---|---|
protected Set<Class> |
allTypes
All types in idl |
protected org.objectweb.asm.ClassWriter |
classWriter
The class writer for this bytecode manipulation. |
Set<String> |
exceptionsThrown
|
static String |
JAVAX_XML_WS_HOLDER_TYPE
|
static String |
JAVAX_XML_WS_HOLDER_TYPE_CANONICAL_NAME
|
static String |
JAVAX_XML_WS_HOLDER_TYPE_NO_SEMICOLON
|
static String |
JAXB_XML_SEE_ALSO_ANNOTATOIN
|
static String |
JSR181_BARE
|
static String |
JSR181_LITERAL
|
static String |
JSR181_ONEWAY
Used to mark an asynchronous WebMethod. |
static String |
JSR181_SOAP_BINDING
|
static String |
JSR181_SOAP_BINDING_STYLE
|
static String |
JSR181_SOAP_BINDING_USE
|
static String |
JSR181_WEB_METHOD
A JSR181 annotation internal class name. |
static String |
JSR181_WEB_PARAM
========================================================================== member | mean | default ========================================================================== name | name of the parameter. |
static String |
JSR181_WEB_PARAM_MODE
|
static String |
JSR181_WEB_PARAM_MODE_INOUT
|
static String |
JSR181_WEB_RESULT
|
static String |
JSR181_WEB_SERVICE
A JSR181 annotation internal class name. |
static String |
JSR181_WRAPPED
|
protected List<MethodSignature> |
methodSignatureList
The list of method's signature. |
protected String |
nameSpace
The namespace |
protected static Set<String> |
noAnnotatedMethods
|
protected String |
portTypeName
The porttype wsdl name |
Fields inherited from class org.objectweb.asm.ClassAdapter |
---|
cv |
Constructor Summary | |
---|---|
WebServiceAnnotationAdapter(org.objectweb.asm.ClassVisitor cv,
org.objectweb.asm.ClassWriter cw,
List<MethodSignature> aMethodSignatureList,
String ns,
String ptn,
String workingDir,
Map<String,UnionType> unionTypes,
Map<String,InterfaceType> intfTypes,
Set<Class> allTypesIDL)
Constructor. |
Method Summary | |
---|---|
protected void |
addAnnotationOperationName(org.objectweb.asm.MethodVisitor methodVisitor,
String operationName)
This method is used to add an annotation to customize the operation name. |
protected void |
addAnnotationReturnName(org.objectweb.asm.MethodVisitor methodVisitor,
String returnName)
This method is used to add an annotation to customize the name of the return element. |
protected void |
addMethodSignatureAnnotation(org.objectweb.asm.MethodVisitor methodVisitor,
MethodSignature methodSignature,
String description,
String signature)
Add annotation: WebMethod, Oneway, WebResult, WebParam. |
protected void |
addParameterAnnotation(org.objectweb.asm.MethodVisitor methodVisitor,
MethodSignature sig)
This method is used to add the annotation to the method's parameters. |
protected WebServiceAnnotationAdapter.SignatureDescription |
changeHolderParameters(MethodSignature sig,
String methodDescription,
String methodSignature)
Changes the method description and signature to change the method interface. |
protected MethodSignature |
findFirstMethodSignature(String methodName)
Find a method. |
Set<String> |
getExceptionsThrown()
|
void |
visit(int version,
int access,
String name,
String signature,
String superName,
String[] interfaces)
Override. |
void |
visitEnd()
|
org.objectweb.asm.MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
Override. |
Methods inherited from class org.objectweb.asm.ClassAdapter |
---|
visitAnnotation, visitAttribute, visitField, visitInnerClass, visitOuterClass, visitSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JSR181_WEB_SERVICE
========================================================================== member | mean | default ========================================================================== name | the name of the WS. | Simple name of the | Used as the name of | java class or | the wsdl:portType | interface. -------------------------------------------------------------------------- targetNamespace | used for wsdl:portType | see JaxWs 2.0 | or wsdl:service or both | -------------------------------------------------------------------------- serviceName | wsdl:service (not allowed | simple name of the | on endpoint interface) | java class | | + Service -------------------------------------------------------------------------- portName | wsdl:port (not allowed on | WS name + Port | endpoint interface) | -------------------------------------------------------------------------- wsdlLocation | | none -------------------------------------------------------------------------- endpointInterface | (not allowed on | none | endpoint interface) | ==========================================================================
public static final String JSR181_WEB_METHOD
========================================================================== member | mean | default ========================================================================== operationName | wsdl:operation name | name of the java | | method -------------------------------------------------------------------------- action | the soap action | "" -------------------------------------------------------------------------- exclude | a method not exposed (not allowed | false | on endpoint interface) | ==========================================================================
public static final String JSR181_WEB_PARAM
========================================================================== member | mean | default ========================================================================== name | name of the parameter. | WebMethod.operation | | name if the | If RPC and WebParam.partName has | operation is | not been specified, this is the | DOCUMENT style and | name of the wsdl:part | the parameter style | | is BARE. | If DOCUMENT or the parameter maps | | to a header, this is the local | Otherwise: | name of the XML element | arg0,arg1,... | representing the parameter. | | | | A name MUST be specified if the | | operation is DOCUMENT style, the | | parameter style is BARE, and the | | mode is OUT or INOUT. | -------------------------------------------------------------------------- partName | the wsdl:part name. | WebParam.name | Used only if the operation is RPC | | or the operation is DOCUMENT and | | parameter style is BARE | -------------------------------------------------------------------------- mode | the direction of the parameter | INOUT if Holder | on endpoint interface) | type otherwise IN | | (see JaxWs 2.0) -------------------------------------------------------------------------- header | If true the parameter is pulled | false | from a message header rather then | | the message body | ==========================================================================
public static final String JSR181_WEB_PARAM_MODE
public static final String JSR181_WEB_PARAM_MODE_INOUT
public static final String JSR181_WEB_RESULT
public static final String JAVAX_XML_WS_HOLDER_TYPE
public static final String JAVAX_XML_WS_HOLDER_TYPE_CANONICAL_NAME
public static final String JAVAX_XML_WS_HOLDER_TYPE_NO_SEMICOLON
public static final String JSR181_SOAP_BINDING
public static final String JAXB_XML_SEE_ALSO_ANNOTATOIN
public static final String JSR181_SOAP_BINDING_USE
public static final String JSR181_SOAP_BINDING_STYLE
public static final String JSR181_LITERAL
public static final String JSR181_WRAPPED
public static final String JSR181_BARE
public Set<String> exceptionsThrown
public static final String JSR181_ONEWAY
protected static Set<String> noAnnotatedMethods
protected org.objectweb.asm.ClassWriter classWriter
protected List<MethodSignature> methodSignatureList
protected String nameSpace
protected String portTypeName
protected Set<Class> allTypes
Constructor Detail |
---|
public WebServiceAnnotationAdapter(org.objectweb.asm.ClassVisitor cv, org.objectweb.asm.ClassWriter cw, List<MethodSignature> aMethodSignatureList, String ns, String ptn, String workingDir, Map<String,UnionType> unionTypes, Map<String,InterfaceType> intfTypes, Set<Class> allTypesIDL)
cv
- The class visitor.cw
- The class writer.aMethodSignatureList
- The list of method to manipulate.ns
- portTypeName
- if not null, the port type nameMethod Detail |
---|
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
visit
in interface org.objectweb.asm.ClassVisitor
visit
in class org.objectweb.asm.ClassAdapter
version
- The versionaccess
- The accessname
- The namesignature
- The signaturesuperName
- The super nameinterfaces
- The interfacespublic void visitEnd()
visitEnd
in interface org.objectweb.asm.ClassVisitor
visitEnd
in class org.objectweb.asm.ClassAdapter
public org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
visitMethod
in interface org.objectweb.asm.ClassVisitor
visitMethod
in class org.objectweb.asm.ClassAdapter
access
- The accessname
- The namedesc
- The descsignature
- The signatureexceptions
- The exceptions
protected void addMethodSignatureAnnotation(org.objectweb.asm.MethodVisitor methodVisitor, MethodSignature methodSignature, String description, String signature)
methodVisitor
- The method visitorsig
- the Method SignaturemethodDescription
- the bytecode method descriptionprotected void addParameterAnnotation(org.objectweb.asm.MethodVisitor methodVisitor, MethodSignature sig)
methodVisitor
- The method visitor.
If null the annotation is not added.sig
- The method's signature.
If null the annotation is not added.protected void addAnnotationReturnName(org.objectweb.asm.MethodVisitor methodVisitor, String returnName)
methodVisitor
- A method visitor.
If null the annotation is not added.returnName
- The new name.
If null or empty the annotation is not added.protected void addAnnotationOperationName(org.objectweb.asm.MethodVisitor methodVisitor, String operationName)
methodVisitor
- A method visitor.
If null the annotation is not added.operationName
- The new operation name.
If null or empty the annotation is not added.protected MethodSignature findFirstMethodSignature(String methodName)
methodName
- The finding key.
public Set<String> getExceptionsThrown()
protected WebServiceAnnotationAdapter.SignatureDescription changeHolderParameters(MethodSignature sig, String methodDescription, String methodSignature)
methodVisitor
- sig
- methodDescription
- methodSignature
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |