public class Common extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ATTLIST |
static String |
CLASS_BOOLEAN |
static String |
CLASS_STRING |
static int |
COMMENT |
static String |
DTD_EMPTY |
static String |
DTD_STRING |
static int |
ELEMENT |
static String |
GENERATED_TAG |
static int |
MASK_INSTANCE |
static int |
MASK_PROP |
static int |
MASK_SEQUENCE |
static int |
MASK_TYPE |
static int |
MASK_USER |
static int |
NO_DEFAULT_VALUES |
static int |
NONE |
static int |
SEQUENCE_AND |
static int |
SEQUENCE_OR |
static int |
TYPE_0_1 |
static int |
TYPE_0_N |
static int |
TYPE_1 |
static int |
TYPE_1_N |
static int |
TYPE_BEAN |
static int |
TYPE_BOOLEAN |
static int |
TYPE_BYTE |
static int |
TYPE_CHAR |
static int |
TYPE_COMMENT |
static int |
TYPE_DOUBLE |
static int |
TYPE_FLOAT |
static int |
TYPE_INT |
static int |
TYPE_KEY |
static int |
TYPE_LONG |
static int |
TYPE_SHORT |
static int |
TYPE_SHOULD_NOT_BE_EMPTY |
static int |
TYPE_STRING |
static int |
TYPE_VETOABLE |
static int |
USE_DEFAULT_VALUES |
| Constructor and Description |
|---|
Common() |
| Modifier and Type | Method and Description |
|---|---|
static String |
constName(String name) |
static String |
convertName(String name)
Convert a DTD name into a bean name:
Any - or _ character is removed.
|
static String |
convertNameInstance(String name)
Same as convertName, except the name that comes out will
be suitable as an instance variable (first letter is lowercase).
|
static Object |
defaultScalarValue(int type) |
static String |
dumpHex(String v) |
static Object |
getComparableObject(Object obj)
Often, an object from the DOM graph will contain spaces or
LF characters, making String comparison impossible with values
specified by the user.
|
static String |
getMessage(String key) |
static String |
getMessage(String key,
int p1) |
static String |
getMessage(String key,
Object p1) |
static String |
getMessage(String key,
Object[] args) |
static String |
getMessage(String key,
Object p1,
Object p2) |
static String |
getMessage(String key,
Object p1,
Object p2,
Object p3) |
static String |
instanceToCommonString(int instance) |
static String |
instanceToString(int instance) |
static boolean |
isArray(int type) |
static boolean |
isBean(int type) |
static boolean |
isBoolean(int type) |
static boolean |
isKey(int type) |
static boolean |
isScalar(int type)
Is it a Java primitive or not?
|
static boolean |
isSequenceOr(int type) |
static boolean |
isString(int type) |
static boolean |
isVetoable(int type) |
static String |
scalarType(int type) |
static boolean |
shouldNotBeEmpty(int type) |
static String |
typeToString(int type) |
static int |
widestInstance(int instance1,
int instance2)
Return the widest instance set.
|
static String |
wrapperClass(int type) |
static String |
wrapperGetMethod(int type) |
static int |
wrapperToType(String wrapper) |
public static final int NONE
public static final int MASK_USER
public static final int USE_DEFAULT_VALUES
public static final int NO_DEFAULT_VALUES
public static final int MASK_SEQUENCE
public static final int SEQUENCE_AND
public static final int SEQUENCE_OR
public static final int MASK_INSTANCE
public static final int TYPE_0_1
public static final int TYPE_1
public static final int TYPE_0_N
public static final int TYPE_1_N
public static final int MASK_TYPE
public static final int TYPE_STRING
public static final int TYPE_BEAN
public static final int TYPE_BOOLEAN
public static final int TYPE_BYTE
public static final int TYPE_CHAR
public static final int TYPE_SHORT
public static final int TYPE_INT
public static final int TYPE_LONG
public static final int TYPE_FLOAT
public static final int TYPE_DOUBLE
public static final int TYPE_COMMENT
public static final int MASK_PROP
public static final int TYPE_KEY
public static final int TYPE_SHOULD_NOT_BE_EMPTY
public static final int TYPE_VETOABLE
public static final int COMMENT
public static final int ELEMENT
public static final int ATTLIST
public static final String DTD_STRING
public static final String DTD_EMPTY
public static final String CLASS_STRING
public static final String CLASS_BOOLEAN
public static final String GENERATED_TAG
public static boolean isSequenceOr(int type)
public static boolean isArray(int type)
public static boolean isBean(int type)
public static boolean isString(int type)
public static boolean isBoolean(int type)
public static boolean isKey(int type)
public static boolean shouldNotBeEmpty(int type)
public static boolean isVetoable(int type)
public static boolean isScalar(int type)
public static String wrapperGetMethod(int type)
public static String wrapperClass(int type)
public static int wrapperToType(String wrapper)
public static String scalarType(int type)
public static String typeToString(int type)
public static String convertName(String name)
public static String convertNameInstance(String name)
public static Object getComparableObject(Object obj)
public static Object defaultScalarValue(int type)
public static String instanceToString(int instance)
public static String instanceToCommonString(int instance)
public static int widestInstance(int instance1,
int instance2)
Copyright © 2017. All Rights Reserved.