Package com.mchange.v1.lang
Class ClassUtils
- java.lang.Object
-
- com.mchange.v1.lang.ClassUtils
-
public final class ClassUtils extends java.lang.Object
See also com.mchange.v2.codegen.ClassUtils for related methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set
allAssignableFrom(java.lang.Class type)
static java.lang.Class
classForPrimitive(java.lang.String typeStr)
static java.lang.Class
classForSimpleName(java.lang.String simpleName, java.lang.String[] importPkgs, java.lang.String[] importClasses)
static boolean
containsMethodAsSubtype(java.lang.Class cl, java.lang.reflect.Method m)
static boolean
containsMethodAsSupertype(java.lang.Class cl, java.lang.reflect.Method m)
static java.lang.Class
forName(java.lang.String fqcnOrPrimitive)
static java.lang.Class
forName(java.lang.String fqOrSimple, java.lang.String[] importPkgs, java.lang.String[] importClasses)
static java.lang.String
fqcnLastElement(java.lang.String fqcn)
static boolean
hasAllMethodsAsSubtype(java.lang.Class cl, java.lang.reflect.Method[] methods)
static boolean
hasAllMethodsAsSupertype(java.lang.Class cl, java.lang.reflect.Method[] methods)
static boolean
isPrimitive(java.lang.String typeStr)
static boolean
isPublic(java.lang.Class cl)
static java.util.Set
publicSupertypesForMethods(java.lang.Class cl, java.lang.reflect.Method[] methods)
static java.lang.String
resolvableTypeName(java.lang.Class type, java.lang.String[] importPkgs, java.lang.String[] importClasses)
static java.lang.String
simpleClassName(java.lang.Class cl)
-
-
-
Method Detail
-
publicSupertypesForMethods
public static java.util.Set publicSupertypesForMethods(java.lang.Class cl, java.lang.reflect.Method[] methods)
-
isPublic
public static boolean isPublic(java.lang.Class cl)
-
hasAllMethodsAsSupertype
public static boolean hasAllMethodsAsSupertype(java.lang.Class cl, java.lang.reflect.Method[] methods)
-
hasAllMethodsAsSubtype
public static boolean hasAllMethodsAsSubtype(java.lang.Class cl, java.lang.reflect.Method[] methods)
-
containsMethodAsSupertype
public static boolean containsMethodAsSupertype(java.lang.Class cl, java.lang.reflect.Method m)
-
containsMethodAsSubtype
public static boolean containsMethodAsSubtype(java.lang.Class cl, java.lang.reflect.Method m)
-
allAssignableFrom
public static java.util.Set allAssignableFrom(java.lang.Class type)
-
simpleClassName
public static java.lang.String simpleClassName(java.lang.Class cl)
-
isPrimitive
public static boolean isPrimitive(java.lang.String typeStr)
-
classForPrimitive
public static java.lang.Class classForPrimitive(java.lang.String typeStr)
-
forName
public static java.lang.Class forName(java.lang.String fqcnOrPrimitive) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
forName
public static java.lang.Class forName(java.lang.String fqOrSimple, java.lang.String[] importPkgs, java.lang.String[] importClasses) throws AmbiguousClassNameException, java.lang.ClassNotFoundException
- Throws:
AmbiguousClassNameException
java.lang.ClassNotFoundException
-
classForSimpleName
public static java.lang.Class classForSimpleName(java.lang.String simpleName, java.lang.String[] importPkgs, java.lang.String[] importClasses) throws AmbiguousClassNameException, java.lang.ClassNotFoundException
- Throws:
AmbiguousClassNameException
java.lang.ClassNotFoundException
-
resolvableTypeName
public static java.lang.String resolvableTypeName(java.lang.Class type, java.lang.String[] importPkgs, java.lang.String[] importClasses) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
fqcnLastElement
public static java.lang.String fqcnLastElement(java.lang.String fqcn)
-
-