|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.app.reflect.IntrospectionUtil
public class IntrospectionUtil
Provides stateless utilities used for object introspection.
Constructor Summary | |
---|---|
IntrospectionUtil()
|
Method Summary | |
---|---|
static java.lang.String[] |
getTypeHierarchy(java.lang.String type,
java.lang.ClassLoader classLoader)
Returns a parent type hierarchy as an array containing the provided type and all of its parent types (excluding java.lang.Object ). |
static boolean |
isAssignableFrom(java.lang.String testType,
java.lang.String baseType,
java.lang.ClassLoader classLoader)
Determines if the type specified by testType can be assigned to objects of the type
specified by baseType . |
static boolean |
isEventObject(java.lang.Class type)
Determines if the provided Class is a
java.util.EventObject . |
static boolean |
isSuperType(java.lang.String testType,
java.lang.String superType,
java.lang.ClassLoader classLoader)
Determines if superClass is a superclass of
testClass . |
static java.lang.String |
removePackageFromType(java.lang.String type)
Removes the package name from a type name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntrospectionUtil()
Method Detail |
---|
public static java.lang.String[] getTypeHierarchy(java.lang.String type, java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException
java.lang.Object
). The highest-level types appear first,
with the provided type at the first index.
type
- the top-level typeclassLoader
- the ClassLoader
through which
introspection may be performed
java.lang.ClassNotFoundException
public static boolean isAssignableFrom(java.lang.String testType, java.lang.String baseType, java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException
testType
can be assigned to objects of the type
specified by baseType
.
This simply uses Class.isAssignableFrom after loading classes using the specified ClassLoader
.
baseType
- the base typetestType
- the test typeclassLoader
- the ClassLoader
to use to load the classes for testing
java.lang.ClassNotFoundException
public static boolean isEventObject(java.lang.Class type)
Class
is a
java.util.EventObject
.
type
- the Class
to analyze
type
type extends
java.util.EventObject
public static boolean isSuperType(java.lang.String testType, java.lang.String superType, java.lang.ClassLoader classLoader)
superClass
is a superclass of
testClass
.
testType
- the name class to testsuperType
- a class name which may/may not be a superclass of
testClass
classLoader
- a ClassLoader
to use for the analysis.
superClass
is a superclass of
testClass
public static java.lang.String removePackageFromType(java.lang.String type)
type
- a fully qualified type name
|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |