站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

Util (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.xml.binding
Class Util

java.lang.Object
  extended byorg.jboss.xml.binding.Util

public final class Util
extends Object

Various utilities for XML binding.

Version:
$Revision: 1.1.2.2 $
Author:
Alexey Loubyansky

Field Summary
static char ARABIC_END_OF_AYAH
           
static char ARABIC_START_OF_RUB_EL_HIZB
           
static char COLLON
           
static char FULL_STOP
           
static char GREEK_ANO_TELEIA
           
static char HYPHEN_MINUS
          Characters that are considered to be word separators while convertinging XML names to Java identifiers according to JAXB 2.0 spec.
static char LOW_LINE
           
static char MIDDLE_DOT
           
 
Constructor Summary
Util()
           
 
Method Summary
static boolean isAttributeType(Class type)
           
static String xmlNamespaceToJavaPackage(String namespace)
          Converts XML namespace to Java package name.
static String xmlNameToClassName(String name, boolean ignoreLowLine)
          Converts XML name to Java class name according to Binding XML Names to Java Identifiers C.2.
static String xmlNameToClassName(String namespaceUri, String localName, boolean ignoreLowLine)
          Converts XML namespace URI and local name to fully qualified class name.
static String xmlNameToConstantName(String name)
          Converts XML name to Java constant name according to Binding XML Names to Java Identifiers C.2.
static String xmlNameToGetMethodName(String name, boolean ignoreLowLine)
          Converts XML name to Java getter method name according to Binding XML Names to Java Identifiers C.2.
static String xmlNameToSetMethodName(String name, boolean ignoreLowLine)
          Converts XML name to Java setter method name according to Binding XML Names to Java Identifiers C.2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HYPHEN_MINUS

public static final char HYPHEN_MINUS
Characters that are considered to be word separators while convertinging XML names to Java identifiers according to JAXB 2.0 spec.

See Also:
Constant Field Values

FULL_STOP

public static final char FULL_STOP
See Also:
Constant Field Values

COLLON

public static final char COLLON
See Also:
Constant Field Values

LOW_LINE

public static final char LOW_LINE
See Also:
Constant Field Values

MIDDLE_DOT

public static final char MIDDLE_DOT
See Also:
Constant Field Values

GREEK_ANO_TELEIA

public static final char GREEK_ANO_TELEIA
See Also:
Constant Field Values

ARABIC_END_OF_AYAH

public static final char ARABIC_END_OF_AYAH
See Also:
Constant Field Values

ARABIC_START_OF_RUB_EL_HIZB

public static final char ARABIC_START_OF_RUB_EL_HIZB
See Also:
Constant Field Values
Constructor Detail

Util

public Util()
Method Detail

xmlNameToClassName

public static String xmlNameToClassName(String name,
                                        boolean ignoreLowLine)
Converts XML name to Java class name according to Binding XML Names to Java Identifiers C.2. The Name to Identifier Mapping Algorithm jaxb-2_0-edr-spec-10_jun_2004.pdf

Parameters:
name - XML name
ignoreLowLine - whether low lines should not be parts of Java identifiers
Returns:
Java class name

xmlNameToGetMethodName

public static String xmlNameToGetMethodName(String name,
                                            boolean ignoreLowLine)
Converts XML name to Java getter method name according to Binding XML Names to Java Identifiers C.2. The Name to Identifier Mapping Algorithm jaxb-2_0-edr-spec-10_jun_2004.pdf

Parameters:
name - XML name
ignoreLowLine - whether low lines should not be parts of Java identifiers
Returns:
Java getter method name

xmlNameToSetMethodName

public static String xmlNameToSetMethodName(String name,
                                            boolean ignoreLowLine)
Converts XML name to Java setter method name according to Binding XML Names to Java Identifiers C.2. The Name to Identifier Mapping Algorithm jaxb-2_0-edr-spec-10_jun_2004.pdf

Parameters:
name - XML name
ignoreLowLine - whether low lines should not be parts of Java identifiers
Returns:
Java setter method name

xmlNameToConstantName

public static String xmlNameToConstantName(String name)
Converts XML name to Java constant name according to Binding XML Names to Java Identifiers C.2. The Name to Identifier Mapping Algorithm jaxb-2_0-edr-spec-10_jun_2004.pdf

Parameters:
name - XML name
Returns:
Java constant name

xmlNamespaceToJavaPackage

public static String xmlNamespaceToJavaPackage(String namespace)
Converts XML namespace to Java package name. The base algorithm is described in JAXB-2.0 spec in 'C.5 Generating a Java package name'.

Parameters:
namespace - XML namespace
Returns:
Java package name

xmlNameToClassName

public static String xmlNameToClassName(String namespaceUri,
                                        String localName,
                                        boolean ignoreLowLine)
Converts XML namespace URI and local name to fully qualified class name.

Parameters:
namespaceUri - namespace URI
localName - local name
ignoreLowLine - should low lines be ignored in the class name
Returns:
fully qualified class name

isAttributeType

public static boolean isAttributeType(Class type)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.