org.apache.felix.ipojo.parser
Class FieldMetadata

java.lang.Object
  extended by org.apache.felix.ipojo.parser.FieldMetadata

public class FieldMetadata
extends java.lang.Object

A Field Metadata represent a field of an implementation class. This class allow to avoid reflection to get the type and the name of a field.

Author:
Felix Project Team

Constructor Summary
FieldMetadata(java.lang.String field, java.lang.String type)
          Constructor.
 
Method Summary
 java.lang.String getFieldName()
           
 java.lang.String getFieldType()
           
static java.lang.String getInternalPrimitiveType(java.lang.String string)
          Get the internal notation for primitive type.
static java.lang.String getPrimitiveTypeByClass(java.lang.Class clazz)
          Get the iPOJO primitive type from the given primitive class.
static java.lang.String getReflectionType(java.lang.String type)
          Get the 'reflective' type of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldMetadata

public FieldMetadata(java.lang.String field,
                     java.lang.String type)
Constructor.

Parameters:
field - : field name.
type - : type of the field.
Method Detail

getFieldName

public java.lang.String getFieldName()

getFieldType

public java.lang.String getFieldType()

getReflectionType

public static java.lang.String getReflectionType(java.lang.String type)
Get the 'reflective' type of the given type. The reflective type is the type used by the Java Reflection API.

Parameters:
type - : the type to analyze to find the Java reflective type.
Returns:
: the reflective type corresponding to this field.

getInternalPrimitiveType

public static java.lang.String getInternalPrimitiveType(java.lang.String string)
Get the internal notation for primitive type.

Parameters:
string - : String form of the type
Returns:
the internal notation or null if not found

getPrimitiveTypeByClass

public static java.lang.String getPrimitiveTypeByClass(java.lang.Class clazz)
Get the iPOJO primitive type from the given primitive class.

Parameters:
clazz - : a primitive class
Returns:
the primitive type.