public class StringUtil
extends java.lang.Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
classString(java.lang.Class<?> type)
Produce a string representation of a class declaration.
|
static java.lang.String |
maxCommonPrefix(java.lang.String one,
java.lang.String two)
Count region matches.
|
static java.lang.String |
methodString(BshMethod method)
Produce a complete string representation of a bsh method.
|
static java.lang.String |
methodString(java.lang.reflect.Method method)
Produce a complete string representation of a reflect method.
|
static java.lang.String |
methodString(java.lang.String name,
java.lang.Class<?>[] types)
Produce a simple string representation of a method name with args.
|
static java.lang.String |
methodString(java.lang.String name,
java.lang.Class<?>[] types,
java.lang.String[] names)
Produce a simple string representation of a method name with args.
|
static java.lang.String |
methodString(java.lang.String name,
java.lang.Object[] args)
Produce a method string from supplied value args.
|
static java.lang.String |
methodString(java.lang.String name,
java.lang.String[] types)
Produce a simple string representation of a method name with args.
|
static java.lang.String |
typeString(java.lang.Class<?> clas)
Type from class to string.
|
static java.lang.String |
typeString(java.lang.Object value)
Type from value to string.
|
static java.lang.String |
typeValueString(java.lang.Object value)
Generate string of value and type.
|
static java.lang.String |
valueString(java.lang.Object value)
Format value string.
|
static java.lang.String |
variableString(java.lang.reflect.Field field)
Produce a string representation of a java field declaration.
|
static java.lang.String |
variableString(Variable var)
Produce a string representation of a bsh variable declaration.
|
public static java.lang.String typeString(java.lang.Object value)
value - for typepublic static java.lang.String typeString(java.lang.Class<?> clas)
clas - for typepublic static java.lang.String typeValueString(java.lang.Object value)
value - to inspectpublic static java.lang.String valueString(java.lang.Object value)
value - to formatpublic static java.lang.String maxCommonPrefix(java.lang.String one,
java.lang.String two)
one - string to comparetwo - string to compare withpublic static java.lang.String methodString(java.lang.String name,
java.lang.Object[] args)
name - method name.args - the value to process.public static java.lang.String methodString(java.lang.String name,
java.lang.String[] types)
name - the method nametypes - the parameter type namespublic static java.lang.String methodString(java.lang.String name,
java.lang.Class<?>[] types)
name - the method nametypes - the parameter type argspublic static java.lang.String methodString(java.lang.String name,
java.lang.Class<?>[] types,
java.lang.String[] names)
name - the method nametypes - the parameter type argsnames - the parameter namespublic static java.lang.String methodString(java.lang.reflect.Method method)
method - a java reflect methodpublic static java.lang.String methodString(BshMethod method)
method - a bsh methodpublic static java.lang.String classString(java.lang.Class<?> type)
type - the class to reflectpublic static java.lang.String variableString(Variable var)
var - the variable to reflectpublic static java.lang.String variableString(java.lang.reflect.Field field)
var - the field to reflect