|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.Inspector2
public class Inspector2
A temporary copy of Inspector while I refactor it to use the new MethodIndex stuff and check for behavior changes.
Field Summary | |
---|---|
protected MethodIndex |
index
Deprecated. Cache of previous method lookups. |
protected java.lang.Object |
object
Deprecated. The object upon which inspection is done. |
protected java.lang.Class |
type
Deprecated. The class of the object upon which inspection is done. |
Constructor Summary | |
---|---|
Inspector2()
Deprecated. Creates a new Inspector object with no internal object. |
|
Inspector2(java.lang.Object object)
Deprecated. Creates a new Inspector object with the specified internal object. |
Method Summary | |
---|---|
static boolean |
areTypesCompatible(java.lang.Class[] targets,
java.lang.Class[] sources)
Deprecated. Returns true if all classes in the sources list are assignment compatible with the targets list. |
java.lang.Object |
callMethod(java.lang.String name)
Deprecated. |
java.lang.Object |
callMethod(java.lang.String name,
java.lang.Object[] params)
Deprecated. |
java.lang.Object |
callMethod(java.lang.String name,
java.lang.String param)
Deprecated. |
static java.lang.Object |
constructFromString(java.lang.String value,
java.lang.Class type)
Deprecated. Attempts to create an object of the specified type using the specified String value. |
static java.lang.String |
encodeAsString(java.lang.Object value)
Deprecated. Attempts to encode an object as a string using the specified object value. |
protected static java.lang.reflect.Constructor |
findConstructor(java.lang.Class type,
java.lang.Class[] argTypes)
Deprecated. Searches for a compatible constructor for the specified arg types using a widening scope. |
java.lang.Object |
get(java.lang.String name)
Deprecated. Returns the value of the specified property. |
static java.lang.Class |
getClassForName(java.lang.String name)
Deprecated. Returns a Class for the specified class name or null if the specified class could not be found in the context class loader. |
static java.lang.Object |
getConstant(java.lang.String name,
java.lang.Class type)
Deprecated. Searches the specified type for a constant denoted by name. |
static java.lang.Object |
getDefaultPrimitiveValue(java.lang.Class primitive)
Deprecated. Returns the Object version of the Java initial value for the specified primitive type. |
java.lang.Class |
getDynamicType()
Deprecated. Returns the type for dynamic properties. |
java.lang.Class |
getMutableType(java.lang.String name)
Deprecated. Returns the type of the specified mutable property. |
java.lang.Object |
getObject()
Deprecated. Returns the object upon which inspection is done. |
java.lang.Class |
getType(java.lang.String name)
Deprecated. Returns the type of the specified property. |
boolean |
hasAccessor(java.lang.String name)
Deprecated. Returns true if the contained object has a get method for the specified field. |
static boolean |
hasConstructor(java.lang.Class type,
java.lang.Class[] argTypes)
Deprecated. |
boolean |
hasMethod(java.lang.String name)
Deprecated. |
boolean |
hasMethod(java.lang.String name,
java.lang.Class[] paramTypes)
Deprecated. |
boolean |
hasMutator(java.lang.String name)
Deprecated. Returns true if the contained object has a set method for the specified field that matches the return type for the associated accessor method ("get"). |
boolean |
hasMutator(java.lang.String name,
java.lang.Class type)
Deprecated. Returns true if the contained object has a set method for the specified field and type. |
static boolean |
hasOverloadedConstructor(java.lang.Class type,
java.lang.Class[] argTypes)
Deprecated. Returns true if the specified class has constructor matching the specified arg types using a widening scope. |
static java.lang.Object |
newInstance(java.lang.Class type)
Deprecated. Creates a new object of the specified class using the no-argument constructor. |
static java.lang.Object |
newInstance(java.lang.Class type,
java.lang.Object[] args)
Deprecated. Creates a new object of the specified class using the constructor that takes the specified parameters. |
static java.lang.Object |
newInstance(java.lang.Class type,
java.lang.Object[] args,
java.lang.Class[] argTypes)
Deprecated. Creates a new object of the specified class using the constructor that takes the specified parameters of the specified types. |
static java.lang.Object |
newInstance(java.lang.String type)
Deprecated. Creates a new object of the specified class name using the no-argument constructor. |
static java.lang.Object |
newInstance(java.lang.String className,
java.lang.Object[] args,
java.lang.Class[] argTypes)
Deprecated. Creates a new object of the specified class by converting the class name to a class object and using the constructor that takes the specified parameters of the specified types. |
void |
set(java.lang.String name,
java.lang.Object value)
Deprecated. Sets the value of the specified property. |
void |
set(java.lang.String name,
java.lang.Object value,
java.lang.Class type)
Deprecated. Sets the value of the specified property using a specifically overloaded mutator method. |
void |
setObject(java.lang.Object object)
Deprecated. Sets the object upon which inspection will be performed. |
static java.lang.Class |
translateFromPrimitive(java.lang.Class primitive)
Deprecated. If this specified class represents a primitive type (int, float, etc.) then it is translated into its wrapper type (Integer, Float, etc.). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object object
protected java.lang.Class type
protected MethodIndex index
Constructor Detail |
---|
public Inspector2()
public Inspector2(java.lang.Object object)
Method Detail |
---|
public static java.lang.Class translateFromPrimitive(java.lang.Class primitive)
public static java.lang.Object getDefaultPrimitiveValue(java.lang.Class primitive)
public static java.lang.Class getClassForName(java.lang.String name)
public static java.lang.Object newInstance(java.lang.Class type)
public static java.lang.Object newInstance(java.lang.String type)
public static java.lang.Object newInstance(java.lang.Class type, java.lang.Object[] args)
public static java.lang.Object newInstance(java.lang.Class type, java.lang.Object[] args, java.lang.Class[] argTypes)
public static java.lang.Object newInstance(java.lang.String className, java.lang.Object[] args, java.lang.Class[] argTypes)
public static boolean hasConstructor(java.lang.Class type, java.lang.Class[] argTypes)
public static boolean hasOverloadedConstructor(java.lang.Class type, java.lang.Class[] argTypes)
protected static java.lang.reflect.Constructor findConstructor(java.lang.Class type, java.lang.Class[] argTypes) throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
public static java.lang.Object constructFromString(java.lang.String value, java.lang.Class type)
public static java.lang.String encodeAsString(java.lang.Object value)
public static boolean areTypesCompatible(java.lang.Class[] targets, java.lang.Class[] sources)
public static java.lang.Object getConstant(java.lang.String name, java.lang.Class type)
public void setObject(java.lang.Object object)
public java.lang.Object getObject()
public void set(java.lang.String name, java.lang.Object value) throws InspectionException
InspectionException
- If the property is not found.public void set(java.lang.String name, java.lang.Object value, java.lang.Class type) throws InspectionException
InspectionException
- If the property is not found.public boolean hasMutator(java.lang.String name, java.lang.Class type)
public boolean hasMutator(java.lang.String name)
public boolean hasAccessor(java.lang.String name)
public java.lang.Object get(java.lang.String name)
public java.lang.Class getType(java.lang.String name)
public java.lang.Class getMutableType(java.lang.String name)
public java.lang.Class getDynamicType()
public java.lang.Object callMethod(java.lang.String name, java.lang.String param)
public java.lang.Object callMethod(java.lang.String name, java.lang.Object[] params)
public boolean hasMethod(java.lang.String name)
public boolean hasMethod(java.lang.String name, java.lang.Class[] paramTypes)
public java.lang.Object callMethod(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |