public class Utils extends Utils
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log
Field log
|
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addPackageName(String className,
String newPkg)
Add package to name
|
static String |
addUnderscore(String name)
Prepend an underscore to the name
|
static String |
capitalizeFirstChar(String name)
Capitalize the first character of the name.
|
static boolean |
fileExists(String name,
String namespace,
Namespaces namespaces)
Does the given file already exist in the given namespace?
|
static String |
getConstructorForParam(Parameter param,
SymbolTable symbolTable,
BooleanHolder bThrow)
Return a constructor for the provided Parameter
This string will be suitable for assignment:
Foo var = string returned
Handles basic java types (int, float, etc), wrapper types (Integer, etc)
and certain java.math (BigDecimal, BigInteger) types.
|
static Vector |
getEnumerationBaseAndValues(Node node,
SymbolTable symbolTable)
If the specified node represents a supported JAX-RPC enumeration,
a Vector is returned which contains the base type and the enumeration values.
|
static QName |
getFaultDataType(javax.wsdl.Message faultMessage,
SymbolTable symbolTable)
Given a fault message, return the XML type of the exception data.
|
static String |
getFullExceptionName(javax.wsdl.Message faultMessage,
SymbolTable symbolTable)
Given a fault message, return the fully qualified Java class name
of the exception to be generated from this fault
|
static QName |
getItemQName(TypeEntry te) |
static QName |
getItemType(TypeEntry te) |
static String |
getJavaLocalName(String fullName)
Query Java Local Name
|
static String |
getJavaPackageName(String fullName)
Query Java Package Name
|
static String |
getNewQName(QName qname)
Common code for generating a QName in emitted code.
|
static String |
getNewQNameWithLastLocalPart(QName qname) |
static String |
getOperationSOAPAction(javax.wsdl.BindingOperation bindingOper)
Return the SOAPAction (if any) of this binding operation
|
static String |
getParameterTypeName(Parameter parm)
Get the parameter type name.
|
static String |
getResponseString(Parameter param,
String var)
Return the Object variable 'var' cast to the appropriate type
doing the right thing for the primitive types.
|
static String |
getWrapperType(TypeEntry type)
Returns a "wrapper" type for the given TypeEntry.
|
static String |
holder(Parameter p,
Emitter emitter)
Given a type, return the Java mapping of that type's holder.
|
static String |
holder(TypeEntry type,
Emitter emitter) |
static boolean |
isFaultComplex(javax.wsdl.Message faultMessage,
SymbolTable symbolTable)
Given a fault message, return TRUE if the fault is a complex type fault
|
static boolean |
isPrimitiveType(TypeEntry type)
Method isPrimitiveType
|
static String |
makePackageName(String namespace)
Method makePackageName
|
static boolean |
shouldEmit(TypeEntry type) |
static String |
wrapPrimitiveType(TypeEntry type,
String var)
Return a string with "var" wrapped as an Object type if needed
|
static String |
xmlNameToJava(String name)
Deprecated.
Use
JavaUtils.xmlNameToJava(String) instead. |
static String |
xmlNameToJavaClass(String name)
Map an XML name to a valid Java identifier w/ capitolized first letter
|
getAttribute, getAttributesWithLocalName, getDerivedTypes, getLastLocalPart, getMemberTypeQNames, getMIMETypeQName, getNestedTypes, getNodeNameQName, getNodeQName, getOperationQName, getQNameFromPrefixedName, getScopedAttribute, getTypeQName, getWrapperType, getXSIType, getXSIType, hasMIME, hasMIME, isXsNodepublic static String holder(TypeEntry type, Emitter emitter)
holder(Parameter, Emitter)public static String holder(Parameter p, Emitter emitter)
p - parameter whose holder class name we want to obtain.emitter - the only Emitter object embodying the running
instance of WSDL2Java.public static String addPackageName(String className, String newPkg)
className - full name of the class.newPkg - name of the package to appendpublic static String getFullExceptionName(javax.wsdl.Message faultMessage, SymbolTable symbolTable)
faultMessage - The WSDL fault messagesymbolTable - the current symbol tablepublic static QName getFaultDataType(javax.wsdl.Message faultMessage, SymbolTable symbolTable)
faultMessage - The WSDL fault message objectsymbolTable - the current symbol tablepublic static boolean isFaultComplex(javax.wsdl.Message faultMessage,
SymbolTable symbolTable)
faultMessage - The WSDL fault message objectsymbolTable - the current symbol tablepublic static Vector getEnumerationBaseAndValues(Node node, SymbolTable symbolTable)
node - symbolTable - public static String capitalizeFirstChar(String name)
name - public static String addUnderscore(String name)
name - public static String xmlNameToJava(String name)
JavaUtils.xmlNameToJava(String) instead.public static String xmlNameToJavaClass(String name)
name - public static String makePackageName(String namespace)
namespace - public static String getJavaLocalName(String fullName)
fullName - public static String getJavaPackageName(String fullName)
fullName - public static boolean fileExists(String name, String namespace, Namespaces namespaces) throws IOException
name - namespace - namespaces - IOExceptionpublic static String wrapPrimitiveType(TypeEntry type, String var)
type - var - public static String getResponseString(Parameter param, String var)
var - public static boolean isPrimitiveType(TypeEntry type)
type - public static String getWrapperType(TypeEntry type)
type - public static String getOperationSOAPAction(javax.wsdl.BindingOperation bindingOper)
bindingOper - the operation to look atpublic static String getNewQName(QName qname)
qname - public static String getParameterTypeName(Parameter parm)
parm - public static String getConstructorForParam(Parameter param, SymbolTable symbolTable, BooleanHolder bThrow)
param - info about the parameter we need a constructor forsymbolTable - used to lookup enumerationsbThrow - set to true if contructor needs try/catch blockpublic static boolean shouldEmit(TypeEntry type)
Copyright © The Apache Software Foundation. All Rights Reserved.