gov.lanl.Utility
Class ReflectionInformation

java.lang.Object
  |
  +--gov.lanl.Utility.ReflectionInformation

public class ReflectionInformation
extends java.lang.Object

Class declaration

 

Constructor Summary
ReflectionInformation()
           
 
Method Summary
static java.lang.reflect.Field getObjectAttributeField(java.lang.Object obj, java.lang.String attribute_name)
          Given an object and an attribute name for that object, get the attribute Field from the object
static java.lang.String[] getObjectAttributeNames(java.lang.Object obj)
          Given an object, get the attribute names from the object
static java.lang.String getObjectAttributeType(java.lang.Object obj, java.lang.String attribute_name)
          Given an object and an attribute name for that object, get the attribute type from the object
static boolean isObjectAttributeTypeArray(java.lang.Object obj, java.lang.String attribute_name)
          Given an object and an attribute name for that object, tell if that attribute is an array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionInformation

public ReflectionInformation()
Method Detail

getObjectAttributeNames

public static java.lang.String[] getObjectAttributeNames(java.lang.Object obj)
Given an object, get the attribute names from the object

Parameters:
obj - Object containing the attributes
Returns:
String array containing attribute names

getObjectAttributeField

public static java.lang.reflect.Field getObjectAttributeField(java.lang.Object obj,
                                                              java.lang.String attribute_name)
Given an object and an attribute name for that object, get the attribute Field from the object

Parameters:
obj - Object containing the attribute
attribute_name - Name of attribute to be retrieved
Returns:
The Field object for that attribute

getObjectAttributeType

public static java.lang.String getObjectAttributeType(java.lang.Object obj,
                                                      java.lang.String attribute_name)
Given an object and an attribute name for that object, get the attribute type from the object

Parameters:
obj - Object containing the attribute
attribute_name - Name of attribute whose type is to be returned
Returns:
The type for this attribute

isObjectAttributeTypeArray

public static boolean isObjectAttributeTypeArray(java.lang.Object obj,
                                                 java.lang.String attribute_name)
Given an object and an attribute name for that object, tell if that attribute is an array

Parameters:
obj - Object containing the attribute
attribute_name - Name of attribute to be tested
Returns:
True if attribute is an array