public class ClassUtil extends Object
Title: T1开发框架
Description: Class处理工具类。
Copyright: Copyright (c) 2012
Company: seeyon.com
构造器和说明 |
---|
ClassUtil() |
限定符和类型 | 方法和说明 |
---|---|
protected static Double |
BigDecimalToDouble(BigDecimal data) |
protected static Float |
BigDecimalToFloat(BigDecimal data) |
protected static Integer |
BigDecimalToInteger(BigDecimal data) |
protected static Long |
BigDecimalToLong(BigDecimal data) |
protected static Short |
BigDecimalToShort(BigDecimal data) |
protected static String |
BigDecimalToString(BigDecimal data) |
protected static Double |
BigIntegerToDouble(BigInteger data) |
protected static Float |
BigIntegerToFloat(BigInteger data) |
protected static Integer |
BigIntegerToInteger(BigInteger data) |
protected static Long |
BigIntegerToLong(BigInteger data) |
protected static String |
BigIntegerToString(BigInteger data) |
protected static String |
BooleanToString(Boolean data) |
protected static String |
byte_ToString(byte[] data) |
static Object |
byteClone(Object src)
以二进制方式深度CLONE
|
static Object |
CASE(Object orgData,
Class tagClass) |
static Object |
CASE(Object orgData,
Class tagClass,
Object[] fixParm)
简易类转换
|
static Object |
CASEwithEmpty(Object orgData,
Class tagClass) |
protected static String |
CharacterToString(Character data) |
static Class<?> |
converClassWithName(String clazz)
对应字符串简易取得对应的CLASS
|
protected static Date |
DateToDate(Date data) |
protected static Date |
DateToDate(Date data) |
protected static String |
DateToString(Date data) |
protected static String |
DateToString(Date data) |
protected static String |
DateToString(Date data,
String fix) |
protected static String |
DoubleToString(Double data) |
static Object |
findWithJndi(String path)
查找JNDI的对像
|
static Object |
findWithJndi(String path,
InitialContext initialContext)
查找JNDI的对像
|
protected static String |
FloatToString(Float data) |
static String |
getBeanPro(String methodName,
String fixStr,
boolean isForceUCase) |
static Method[] |
getFirstNameMethods(Class type,
String fixName,
int parmCount)
查找一个CLASS中fixName为前缀参数个数为parmCount的方法列表以数组形式返回。
|
static List<Method> |
getFirstNameMethodsL(Class type,
String fixName,
int parmCount)
查找一个CLASS中fixName为前缀参数个数为parmCount的方法列表以LIST为结果返回。
|
static String |
getGetProMethodName(String proName)
取得属性proName对应的GET方法名称
|
static InitialContext |
getInitialContext(Properties pop) |
static Method |
getMethodWithTypeNoException(Class type,
String pro,
Class[] valueTypes,
String nameFix) |
static Object |
getObjectPro(Object data,
String pro)
取得对像的属性
|
static Object |
getObjectProIgnoreCase(Object data,
String pro) |
static String |
getProMethodFix(String proName,
String fix) |
static String |
getSetProMethodName(String proName)
取得属性proName对应的SET方法名称
|
protected static int |
IntegerToInteger(Integer data) |
protected static Long |
IntegerToLong(Integer data) |
protected static String |
IntegerToString(Integer data) |
static boolean |
isBeanProMethod(Class beanClass,
Method method) |
static void |
logDebug(org.apache.log4j.Logger log,
Object msg) |
protected static Integer |
LongToInteger(Long data) |
protected static String |
LongToString(Long data) |
static String |
SerializableClobToString(org.hibernate.lob.SerializableClob data) |
static void |
setObjectPro(Object data,
String proName,
Object value)
以返射机制去SET值。
|
static void |
setObjectProWithCheck(Object data,
String proName,
Object value)
以返射机制去SET值。
|
protected static String |
ShortToString(Short data) |
protected static String |
StringBufferToString(StringBuffer data) |
protected static BigDecimal |
StringToBigDecimal(String data) |
protected static BigInteger |
StringToBigInteger(String data) |
protected static Boolean |
StringToBoolean(String data) |
protected static byte[] |
StringTobyte_(String data) |
protected static Character |
StringToCharacter(String data) |
protected static Date |
StringToDate(String data) |
protected static Double |
StringToDouble(String data) |
protected static Enum |
StringToEnum(String data,
Class cls) |
protected static Float |
StringToFloat(String data) |
protected static Integer |
StringToInteger(String data) |
protected static Long |
StringToLong(String data) |
protected static Short |
StringToShort(String data) |
protected static Timestamp |
StringToTimestamp(String data) |
protected static String |
TimestampToString(Timestamp data) |
static Double |
toDouble(Object orgData) |
static Double |
toDoublez(Object orgData)
如果数据为空则返回0D
|
static Integer |
toInteger(Object orgData) |
static Integer |
toIntegerz(Object orgData)
如果数据为空则返回0
|
static Long |
toLong(Object orgData) |
static Long |
toLongz(Object orgData)
如果数据为空则返回0L
|
static String |
toString(Object orgData) |
protected static String StringBufferToString(StringBuffer data)
protected static Long BigDecimalToLong(BigDecimal data)
protected static int IntegerToInteger(Integer data)
protected static BigDecimal StringToBigDecimal(String data)
protected static BigInteger StringToBigInteger(String data)
protected static Integer BigDecimalToInteger(BigDecimal data)
protected static String BigDecimalToString(BigDecimal data)
protected static byte[] StringTobyte_(String data)
protected static String byte_ToString(byte[] data)
protected static Long BigIntegerToLong(BigInteger data)
protected static Integer BigIntegerToInteger(BigInteger data)
protected static Double BigIntegerToDouble(BigInteger data)
protected static Float BigIntegerToFloat(BigInteger data)
protected static String BigIntegerToString(BigInteger data)
protected static Float BigDecimalToFloat(BigDecimal data)
protected static Double BigDecimalToDouble(BigDecimal data)
protected static Short BigDecimalToShort(BigDecimal data)
public static Object CASE(Object orgData, Class tagClass, Object[] fixParm)
orgData
- tagClass
- fixParm
- public static String getGetProMethodName(String proName)
proName
- public static String getSetProMethodName(String proName)
proName
- public static Method[] getFirstNameMethods(Class type, String fixName, int parmCount)
type
- fixName
- parmCount
- public static List<Method> getFirstNameMethodsL(Class type, String fixName, int parmCount)
type
- fixName
- parmCount
- public static Class<?> converClassWithName(String clazz)
clazz
- public static Object findWithJndi(String path)
path
- NamingException
public static InitialContext getInitialContext(Properties pop)
public static Object findWithJndi(String path, InitialContext initialContext)
path
- public static void setObjectPro(Object data, String proName, Object value)
data
- proName
- value
- public static void setObjectProWithCheck(Object data, String proName, Object value)
data
- proName
- value
- public static Object getObjectPro(Object data, String pro)
data
- pro
- public static Method getMethodWithTypeNoException(Class type, String pro, Class[] valueTypes, String nameFix)
public static String SerializableClobToString(org.hibernate.lob.SerializableClob data)
public static final void logDebug(org.apache.log4j.Logger log, Object msg)
Copyright © 2016–2018. All rights reserved.