|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.legstar.coxb.util.BindingUtil
public final class BindingUtil
Helper methods useful when manipulating bindings and transformers directly.
| Field Summary | |
|---|---|
static String |
BIND_SUFFIX
Suffix for binding class name. |
static String |
COXB_PACKAGENAME_SUFFIX
Binding classes go to a package which name ends with this. |
static String |
JAXB_OBJECTFACTORY_NAME
The JAXB object factory name. |
static String |
WRAPPER_SUFFIX
Suffix for array wrappers class names. |
| Method Summary | |
|---|---|
static String |
getCoxbTypeName(ICobolBinding binding)
Builds a binding type name using the associated jaxb type name. |
static String |
getFieldName(ICobolBinding binding)
Returns a name that can be used as a field name. |
static Class<?> |
getJavaClass(Field hostField)
This method determines the relevant java type to be stored in a binding element. |
static String |
getJavaClassName(String jaxbPackage,
String jaxbTypeName)
Since JAXB classes may hide a POJO, this method gets a special javaClassName annotation from the JAXB class. |
static String |
getJaxbTypeName(ICobolBinding binding)
Returns the binding associated jaxb type name. |
static String |
getXmlNamespace(String jaxbPackageName,
String jaxbTypeName)
Retrieves the XML namespace associated with a JAXB element. |
static ICobolBinding |
lookupBinding(ICobolBinding rootBinding,
String bindingName)
Search for a binding with a specific name. |
static Object |
newJaxbObject(Object jaxbObjectFactory,
String jaxbClassName)
Loads a JAXB object using a JAXB Object factory. |
static Object |
newJaxbObjectFactory(String packageName)
Loads a JAXB object factory class using a combination of current and thread class loader. |
static IHostTransformers |
newTransformers(String jaxbQualifiedClassName)
Create an instance of Transformers for a given JAXB root class name. |
static IHostTransformers |
newTransformers(String jaxbPackageName,
String jaxbClassName)
Create an instance of Transformers for a given JAXB root class name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BIND_SUFFIX
public static final String WRAPPER_SUFFIX
public static final String JAXB_OBJECTFACTORY_NAME
public static final String COXB_PACKAGENAME_SUFFIX
| Method Detail |
|---|
public static ICobolBinding lookupBinding(ICobolBinding rootBinding,
String bindingName)
throws HostException
rootBinding - the starting point for the searchbindingName - the
HostException - if no binding exist
public static Object newJaxbObjectFactory(String packageName)
throws CobolBindingException
packageName - the package containing a JAXB Object Factory
CobolBindingException - if JAXB classes are not found
public static Object newJaxbObject(Object jaxbObjectFactory,
String jaxbClassName)
throws CobolBindingException
jaxbObjectFactory - the JAXB Object factoryjaxbClassName - the JAXB class name
CobolBindingException - if instantiation failed
public static IHostTransformers newTransformers(String jaxbPackageName,
String jaxbClassName)
throws CobolBindingException
jaxbPackageName - the JAXB package namejaxbClassName - the JAXB root class name
CobolBindingException - if transformers cannot be created
public static IHostTransformers newTransformers(String jaxbQualifiedClassName)
throws CobolBindingException
jaxbQualifiedClassName - the JAXB class name
CobolBindingException - if transformers cannot be created
public static String getJavaClassName(String jaxbPackage,
String jaxbTypeName)
throws CobolBindingException
jaxbPackage - the JAXB package namejaxbTypeName - the JAXB type name
CobolBindingException - if getting annotation fails
public static Class<?> getJavaClass(Field hostField)
throws CobolBindingException
hostField - field from which java type is extracted
CobolBindingException - if class cannot be determinedpublic static String getJaxbTypeName(ICobolBinding binding)
binding - the binding for which the jaxb type is to be returned
public static String getCoxbTypeName(ICobolBinding binding)
binding - the binding for which the binding type is to be returned
public static String getFieldName(ICobolBinding binding)
binding - the binding for which the field name is to be returned
public static String getXmlNamespace(String jaxbPackageName,
String jaxbTypeName)
throws HostException
jaxbPackageName - a JAXB element package namejaxbTypeName - a JAXB element type name
HostException - if retrieving XML element name fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||