com.sun.tools.ws.processor.modeler.annotation
Class WebServiceVisitor

java.lang.Object
  extended by com.sun.mirror.util.SimpleDeclarationVisitor
      extended by com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor
All Implemented Interfaces:
DeclarationVisitor, WebServiceConstants
Direct Known Subclasses:
WebServiceWrapperGenerator

public abstract class WebServiceVisitor
extends SimpleDeclarationVisitor
implements WebServiceConstants


Nested Class Summary
protected static class WebServiceVisitor.MySOAPBinding
           
 
Field Summary
protected static String ANNOTATION_ELEMENT_ERROR
           
protected  ModelBuilder builder
           
protected  AnnotationProcessorContext context
           
protected  String endpointInterfaceName
           
protected  boolean endpointReferencesInterface
           
protected  boolean hasWebMethods
           
protected  javax.jws.HandlerChain hChain
           
protected  String packageName
           
protected  Port port
           
protected  String portName
           
protected  Set<String> processedMethods
           
protected  boolean processingSEI
           
protected  boolean pushedSOAPBinding
           
protected  AnnotationProcessorContext.SEIContext seiContext
           
protected  String serviceImplName
           
protected  String serviceName
           
protected  JavaSimpleTypeCreator simpleTypeCreator
           
protected  Stack<javax.jws.soap.SOAPBinding> soapBindingStack
           
protected  SOAPStyle soapStyle
           
protected  SOAPUse soapUse
           
protected  TypeDeclaration typeDecl
           
protected  javax.jws.soap.SOAPBinding typeDeclSOAPBinding
           
protected  String typeNamespace
           
protected  boolean wrapped
           
protected  String wsdlNamespace
           
 
Fields inherited from interface com.sun.tools.ws.processor.modeler.annotation.WebServiceConstants
BEAN, BINDING, COLLECTION_CLASSNAME, DOT, EMTPY_NAMESPACE_ID, EXCEPTION_CLASSNAME, FAULT_INFO, GET_FAULT_INFO, GET_PREFIX, HANDLER, HANDLER_CHAIN, HANDLER_CHAIN_NAME, HANDLER_CLASS, HANDLER_CONFIG, HANDLER_NAME, HOLDER_CLASSNAME, HTTP_PREFIX, INIT_PARAM, IS_PREFIX, JAVA_LANG_OBJECT, JAXWS, JAXWS_PACKAGE_PD, MAP_CLASSNAME, PARAM_NAME, PARAM_VALUE, PD, PD_JAXWS_PACKAGE_PD, PORT, REMOTE_CLASSNAME, REMOTE_EXCEPTION_CLASSNAME, RESPONSE, RETURN, RETURN_CAPPED, RETURN_VALUE, RUNTIME_EXCEPTION_CLASSNAME, SERIALIZABLE_CLASSNAME, SERVICE, SIGC_INNERCLASS, SIGC_UNDERSCORE, SOAP_HEADER, SOAP_ROLE, WEBSERVICE_NAMESPACE
 
Constructor Summary
WebServiceVisitor(ModelBuilder builder, AnnotationProcessorContext context)
           
 
Method Summary
protected  void annotationError(SourcePosition pos, Localizable message)
           
protected  void checkForInvalidImplAnnotation(Declaration d, Class annotationClass)
           
protected  void checkForInvalidSEIAnnotation(InterfaceDeclaration d, Class annotationClass)
           
protected  boolean classImplementsSEI(ClassDeclaration classDecl, InterfaceDeclaration intfDecl)
           
protected  int getModeParameterCount(MethodDeclaration method, javax.jws.WebParam.Mode mode)
           
protected  String getNamespace(PackageDeclaration packageDecl)
           
protected  ParameterDeclaration getOutParameter(MethodDeclaration method)
           
protected  boolean hasWebMethods(ClassDeclaration d)
           
protected  boolean isDocLitWrapped()
           
protected  boolean isEquivalentModes(javax.jws.WebParam.Mode mode1, javax.jws.WebParam.Mode mode2)
           
protected  boolean isHolder(ParameterDeclaration param)
           
protected  boolean isLegalImplementation(javax.jws.WebService webService, ClassDeclaration classDecl)
           
protected  boolean isLegalMethod(MethodDeclaration method, TypeDeclaration typeDecl)
           
protected  boolean isLegalParameter(ParameterDeclaration param, MethodDeclaration method, TypeDeclaration typeDecl, int paramIndex)
           
protected  boolean isLegalSEI(InterfaceDeclaration intf)
           
protected  boolean isLegalType(TypeMirror type)
           
protected  boolean isValidOnewayMethod(MethodDeclaration method, TypeDeclaration typeDecl)
           
protected  boolean methodsAreLegal(ClassDeclaration classDecl)
           
protected  boolean methodsAreLegal(InterfaceDeclaration intfDecl)
           
protected  javax.jws.soap.SOAPBinding popSOAPBinding()
           
protected  void postProcessWebService(javax.jws.WebService webService, ClassDeclaration d)
           
protected  void postProcessWebService(javax.jws.WebService webService, InterfaceDeclaration d)
           
protected  void preProcessWebService(javax.jws.WebService webService, TypeDeclaration d)
           
protected  boolean processedMethod(MethodDeclaration method)
           
protected abstract  void processMethod(MethodDeclaration method, javax.jws.WebMethod webMethod)
           
protected  void processMethods(ClassDeclaration d)
           
protected  void processMethods(InterfaceDeclaration d)
           
protected abstract  void processWebService(javax.jws.WebService webService, TypeDeclaration d)
           
protected  boolean pushSOAPBinding(javax.jws.soap.SOAPBinding soapBinding, Declaration bindingDecl, TypeDeclaration classDecl)
           
protected  boolean sameMethod(MethodDeclaration method1, MethodDeclaration method2)
           
static boolean sameStyle(javax.jws.soap.SOAPBinding.Style style, SOAPStyle soapStyle)
           
protected  boolean shouldProcessMethod(MethodDeclaration method, javax.jws.WebMethod webMethod)
           
protected  boolean shouldProcessWebService(javax.jws.WebService webService, ClassDeclaration classDecl)
           
protected  boolean shouldProcessWebService(javax.jws.WebService webService, InterfaceDeclaration intf)
           
protected  void verifyImplAnnotations(ClassDeclaration d)
           
protected  void verifySEIAnnotations(javax.jws.WebService webService, InterfaceDeclaration d)
           
 void visitClassDeclaration(ClassDeclaration d)
           
 void visitInterfaceDeclaration(InterfaceDeclaration d)
           
 void visitMethodDeclaration(MethodDeclaration method)
           
 
Methods inherited from class com.sun.mirror.util.SimpleDeclarationVisitor
visitAnnotationTypeDeclaration, visitAnnotationTypeElementDeclaration, visitConstructorDeclaration, visitDeclaration, visitEnumConstantDeclaration, visitEnumDeclaration, visitExecutableDeclaration, visitFieldDeclaration, visitMemberDeclaration, visitPackageDeclaration, visitParameterDeclaration, visitTypeDeclaration, visitTypeParameterDeclaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

builder

protected ModelBuilder builder

wsdlNamespace

protected String wsdlNamespace

typeNamespace

protected String typeNamespace

soapBindingStack

protected Stack<javax.jws.soap.SOAPBinding> soapBindingStack

typeDeclSOAPBinding

protected javax.jws.soap.SOAPBinding typeDeclSOAPBinding

soapUse

protected SOAPUse soapUse

soapStyle

protected SOAPStyle soapStyle

wrapped

protected boolean wrapped

hChain

protected javax.jws.HandlerChain hChain

port

protected Port port

serviceImplName

protected String serviceImplName

endpointInterfaceName

protected String endpointInterfaceName

context

protected AnnotationProcessorContext context

seiContext

protected AnnotationProcessorContext.SEIContext seiContext

processingSEI

protected boolean processingSEI

serviceName

protected String serviceName

packageName

protected String packageName

portName

protected String portName

endpointReferencesInterface

protected boolean endpointReferencesInterface

hasWebMethods

protected boolean hasWebMethods

simpleTypeCreator

protected JavaSimpleTypeCreator simpleTypeCreator

typeDecl

protected TypeDeclaration typeDecl

processedMethods

protected Set<String> processedMethods

pushedSOAPBinding

protected boolean pushedSOAPBinding

ANNOTATION_ELEMENT_ERROR

protected static final String ANNOTATION_ELEMENT_ERROR
See Also:
Constant Field Values
Constructor Detail

WebServiceVisitor

public WebServiceVisitor(ModelBuilder builder,
                         AnnotationProcessorContext context)
Method Detail

visitInterfaceDeclaration

public void visitInterfaceDeclaration(InterfaceDeclaration d)
Specified by:
visitInterfaceDeclaration in interface DeclarationVisitor
Overrides:
visitInterfaceDeclaration in class SimpleDeclarationVisitor

visitClassDeclaration

public void visitClassDeclaration(ClassDeclaration d)
Specified by:
visitClassDeclaration in interface DeclarationVisitor
Overrides:
visitClassDeclaration in class SimpleDeclarationVisitor

verifySEIAnnotations

protected void verifySEIAnnotations(javax.jws.WebService webService,
                                    InterfaceDeclaration d)

verifyImplAnnotations

protected void verifyImplAnnotations(ClassDeclaration d)

checkForInvalidSEIAnnotation

protected void checkForInvalidSEIAnnotation(InterfaceDeclaration d,
                                            Class annotationClass)

checkForInvalidImplAnnotation

protected void checkForInvalidImplAnnotation(Declaration d,
                                             Class annotationClass)

annotationError

protected void annotationError(SourcePosition pos,
                               Localizable message)

preProcessWebService

protected void preProcessWebService(javax.jws.WebService webService,
                                    TypeDeclaration d)

sameStyle

public static boolean sameStyle(javax.jws.soap.SOAPBinding.Style style,
                                SOAPStyle soapStyle)

pushSOAPBinding

protected boolean pushSOAPBinding(javax.jws.soap.SOAPBinding soapBinding,
                                  Declaration bindingDecl,
                                  TypeDeclaration classDecl)

popSOAPBinding

protected javax.jws.soap.SOAPBinding popSOAPBinding()

getNamespace

protected String getNamespace(PackageDeclaration packageDecl)

shouldProcessWebService

protected boolean shouldProcessWebService(javax.jws.WebService webService,
                                          InterfaceDeclaration intf)

shouldProcessWebService

protected boolean shouldProcessWebService(javax.jws.WebService webService,
                                          ClassDeclaration classDecl)

processWebService

protected abstract void processWebService(javax.jws.WebService webService,
                                          TypeDeclaration d)

postProcessWebService

protected void postProcessWebService(javax.jws.WebService webService,
                                     InterfaceDeclaration d)

postProcessWebService

protected void postProcessWebService(javax.jws.WebService webService,
                                     ClassDeclaration d)

hasWebMethods

protected boolean hasWebMethods(ClassDeclaration d)

processMethods

protected void processMethods(InterfaceDeclaration d)

processMethods

protected void processMethods(ClassDeclaration d)

visitMethodDeclaration

public void visitMethodDeclaration(MethodDeclaration method)
Specified by:
visitMethodDeclaration in interface DeclarationVisitor
Overrides:
visitMethodDeclaration in class SimpleDeclarationVisitor

processedMethod

protected boolean processedMethod(MethodDeclaration method)

shouldProcessMethod

protected boolean shouldProcessMethod(MethodDeclaration method,
                                      javax.jws.WebMethod webMethod)

processMethod

protected abstract void processMethod(MethodDeclaration method,
                                      javax.jws.WebMethod webMethod)

isLegalImplementation

protected boolean isLegalImplementation(javax.jws.WebService webService,
                                        ClassDeclaration classDecl)

classImplementsSEI

protected boolean classImplementsSEI(ClassDeclaration classDecl,
                                     InterfaceDeclaration intfDecl)

sameMethod

protected boolean sameMethod(MethodDeclaration method1,
                             MethodDeclaration method2)

isLegalSEI

protected boolean isLegalSEI(InterfaceDeclaration intf)

methodsAreLegal

protected boolean methodsAreLegal(InterfaceDeclaration intfDecl)

methodsAreLegal

protected boolean methodsAreLegal(ClassDeclaration classDecl)

isLegalMethod

protected boolean isLegalMethod(MethodDeclaration method,
                                TypeDeclaration typeDecl)

isLegalParameter

protected boolean isLegalParameter(ParameterDeclaration param,
                                   MethodDeclaration method,
                                   TypeDeclaration typeDecl,
                                   int paramIndex)

isDocLitWrapped

protected boolean isDocLitWrapped()

isValidOnewayMethod

protected boolean isValidOnewayMethod(MethodDeclaration method,
                                      TypeDeclaration typeDecl)

getModeParameterCount

protected int getModeParameterCount(MethodDeclaration method,
                                    javax.jws.WebParam.Mode mode)

isEquivalentModes

protected boolean isEquivalentModes(javax.jws.WebParam.Mode mode1,
                                    javax.jws.WebParam.Mode mode2)

isHolder

protected boolean isHolder(ParameterDeclaration param)

isLegalType

protected boolean isLegalType(TypeMirror type)

getOutParameter

protected ParameterDeclaration getOutParameter(MethodDeclaration method)