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

java.lang.Object
  extended by com.sun.tools.ws.processor.modeler.annotation.WebServiceAP
All Implemented Interfaces:
ModelBuilder, WebServiceConstants

public class WebServiceAP
extends java.lang.Object
implements ModelBuilder, WebServiceConstants

WebServiceAP is a APT AnnotationProcessor for processing javax.jws.* and javax.xml.ws.* annotations. This class is used either by the WsGen (CompileTool) tool or idirectly via the AnnotationProcessorFactoryImpl when invoked by APT.

Author:
WS Development Team

Field Summary
protected  AnnotationProcessorEnvironment apEnv
           
protected  AnnotationProcessorContext context
           
protected  Messager messager
           
 
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
WebServiceAP(WsgenOptions options, AnnotationProcessorContext context, ErrorReceiver receiver, java.io.PrintStream out)
           
 
Method Summary
 void addOperation(Operation operation)
           
 boolean canOverWriteClass(java.lang.String className)
           
 boolean checkAndSetProcessed(TypeDeclaration typeDecl)
           
 void clearProcessed()
           
protected  WebServiceVisitor createWrapperGenerator()
           
 AnnotationProcessorEnvironment getAPEnv()
           
 TypeMirror getHolderValueType(TypeMirror type)
           
static java.lang.String getMethodSig(MethodDeclaration method)
           
 java.lang.String getOperationName(java.lang.String messageName)
           
 WsgenOptions getOptions()
           
 java.lang.String getResponseName(java.lang.String operationName)
           
 java.io.File getSourceDir()
           
 java.lang.String getSourceVersion()
           
 TypeDeclaration getTypeDeclaration(java.lang.String typeName)
           
 java.lang.String getXMLName(java.lang.String javaName)
           
 void init(AnnotationProcessorEnvironment apEnv)
           
 boolean isException(TypeDeclaration typeDecl)
           
 boolean isRemote(TypeDeclaration typeDecl)
           
 boolean isRemoteException(TypeDeclaration typeDecl)
           
 boolean isServiceException(TypeDeclaration typeDecl)
          Checks if the TypeDeclaration is a service specific exception
static boolean isSubtype(AnnotationProcessorEnvironment env, TypeDeclaration d1, TypeDeclaration d2)
           
static boolean isSubtype(TypeDeclaration d1, TypeDeclaration d2)
           
 void log(java.lang.String msg)
           
 void onError(SourcePosition pos, com.sun.xml.ws.util.localization.Localizable msg)
           
 void onError(java.lang.String message)
           
 void onInfo(java.lang.String message)
           
 void onWarning(java.lang.String message)
           
protected  boolean parseArguments(java.lang.String[] args)
           
 void process()
           
protected  void report(java.lang.String msg)
           
 void run()
           
 void setPort(Port port)
           
 void setService(Service service)
           
 void setWrapperGenerated(boolean wrapperGenerated)
           
protected  boolean shouldProcessWebService(WebService webService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

apEnv

protected AnnotationProcessorEnvironment apEnv

context

protected AnnotationProcessorContext context

messager

protected Messager messager
Constructor Detail

WebServiceAP

public WebServiceAP(WsgenOptions options,
                    AnnotationProcessorContext context,
                    ErrorReceiver receiver,
                    java.io.PrintStream out)
Method Detail

run

public void run()

parseArguments

protected boolean parseArguments(java.lang.String[] args)

init

public void init(AnnotationProcessorEnvironment apEnv)

getAPEnv

public AnnotationProcessorEnvironment getAPEnv()
Specified by:
getAPEnv in interface ModelBuilder

getOptions

public WsgenOptions getOptions()
Specified by:
getOptions in interface ModelBuilder

getSourceDir

public java.io.File getSourceDir()
Specified by:
getSourceDir in interface ModelBuilder

onError

public void onError(java.lang.String message)
Specified by:
onError in interface ModelBuilder

onError

public void onError(SourcePosition pos,
                    com.sun.xml.ws.util.localization.Localizable msg)
             throws ModelerException
Specified by:
onError in interface ModelBuilder
Throws:
ModelerException

onWarning

public void onWarning(java.lang.String message)

onInfo

public void onInfo(java.lang.String message)

report

protected void report(java.lang.String msg)

process

public void process()

checkAndSetProcessed

public boolean checkAndSetProcessed(TypeDeclaration typeDecl)
Specified by:
checkAndSetProcessed in interface ModelBuilder

clearProcessed

public void clearProcessed()

setService

public void setService(Service service)
Specified by:
setService in interface ModelBuilder

setPort

public void setPort(Port port)
Specified by:
setPort in interface ModelBuilder

addOperation

public void addOperation(Operation operation)

setWrapperGenerated

public void setWrapperGenerated(boolean wrapperGenerated)
Specified by:
setWrapperGenerated in interface ModelBuilder

getTypeDeclaration

public TypeDeclaration getTypeDeclaration(java.lang.String typeName)
Specified by:
getTypeDeclaration in interface ModelBuilder

getSourceVersion

public java.lang.String getSourceVersion()
Specified by:
getSourceVersion in interface ModelBuilder

createWrapperGenerator

protected WebServiceVisitor createWrapperGenerator()

shouldProcessWebService

protected boolean shouldProcessWebService(WebService webService)

isException

public boolean isException(TypeDeclaration typeDecl)

isRemoteException

public boolean isRemoteException(TypeDeclaration typeDecl)
Specified by:
isRemoteException in interface ModelBuilder

isServiceException

public boolean isServiceException(TypeDeclaration typeDecl)
Description copied from interface: ModelBuilder
Checks if the TypeDeclaration is a service specific exception

Specified by:
isServiceException in interface ModelBuilder
Returns:
true if is not a service specifc excpetion as defined by JAX-WS specification

isRemote

public boolean isRemote(TypeDeclaration typeDecl)
Specified by:
isRemote in interface ModelBuilder

isSubtype

public static boolean isSubtype(AnnotationProcessorEnvironment env,
                                TypeDeclaration d1,
                                TypeDeclaration d2)

isSubtype

public static boolean isSubtype(TypeDeclaration d1,
                                TypeDeclaration d2)

getMethodSig

public static java.lang.String getMethodSig(MethodDeclaration method)

getOperationName

public java.lang.String getOperationName(java.lang.String messageName)
Specified by:
getOperationName in interface ModelBuilder

getResponseName

public java.lang.String getResponseName(java.lang.String operationName)
Specified by:
getResponseName in interface ModelBuilder

getHolderValueType

public TypeMirror getHolderValueType(TypeMirror type)
Specified by:
getHolderValueType in interface ModelBuilder

canOverWriteClass

public boolean canOverWriteClass(java.lang.String className)
Specified by:
canOverWriteClass in interface ModelBuilder

log

public void log(java.lang.String msg)
Specified by:
log in interface ModelBuilder

getXMLName

public java.lang.String getXMLName(java.lang.String javaName)
Specified by:
getXMLName in interface ModelBuilder


Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.