gov.nih.nci.cagrid.data.cql.cacore
Class AttributeTypeDetector

java.lang.Object
  extended by gov.nih.nci.cagrid.data.cql.cacore.AttributeTypeDetector

public class AttributeTypeDetector
extends java.lang.Object

AttributeTypeDetector Determines types of attributes of objects

Version:
$Id: AttributeTypeDetector.java,v 1.1 2007/01/22 18:24:41 dervin Exp $
Author:
David W. Ervin *

Field Summary
static int BOOLEAN_TYPE
           
static int CHARACTER_TYPE
           
static int DATE_TYPE
           
static int INT_TYPE
           
static int LONG_TYPE
           
static int STRING_TYPE
           
static int UNKNOWN_TYPE
           
 
Constructor Summary
AttributeTypeDetector()
           
 
Method Summary
static int determineReturnType(java.lang.reflect.Method method)
          Determines the data type returned by a method
static int determineType(java.lang.reflect.Field field)
          Determines the data type of a field name in a class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING_TYPE

public static final int STRING_TYPE
See Also:
Constant Field Values

DATE_TYPE

public static final int DATE_TYPE
See Also:
Constant Field Values

INT_TYPE

public static final int INT_TYPE
See Also:
Constant Field Values

LONG_TYPE

public static final int LONG_TYPE
See Also:
Constant Field Values

CHARACTER_TYPE

public static final int CHARACTER_TYPE
See Also:
Constant Field Values

BOOLEAN_TYPE

public static final int BOOLEAN_TYPE
See Also:
Constant Field Values

UNKNOWN_TYPE

public static final int UNKNOWN_TYPE
See Also:
Constant Field Values
Constructor Detail

AttributeTypeDetector

public AttributeTypeDetector()
Method Detail

determineType

public static int determineType(java.lang.reflect.Field field)
Determines the data type of a field name in a class

Parameters:
field - The field to determine the type of
Returns:
A static code indicating the type of the field

determineReturnType

public static int determineReturnType(java.lang.reflect.Method method)
Determines the data type returned by a method

Parameters:
method - The method
Returns:
An integer code indicating the type of returned object