org.apache.felix.ipojo.parser

## Class FieldMetadata

- java.lang.Object
- - org.apache.felix.ipojo.parser.FieldMetadata

    public class FieldMetadata
    extends java.lang.Object

A Field Metadata represents a field of the implementation class. This class avoids using reflection to get the type and the name of a field.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`FieldMetadata(java.lang.String field, java.lang.String type)` Creates a field metadata.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.lang.String` `getFieldName()`
`java.lang.String` `getFieldType()`
`static java.lang.String` `getInternalPrimitiveType(java.lang.String string)` Gets the internal notation for primitive type.
`static java.lang.String` `getPrimitiveTypeByClass(java.lang.Class clazz)` Gets the iPOJO primitive type from the given primitive class.
`static java.lang.String` `getReflectionType(java.lang.String type)` Gets 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)

Creates a field metadata. This constructor can be used to avoid using `PojoMetadata`. Be care that creating such `FieldMetadata` does not assert its presence in the implementation class.

Parameters:
  `field` - the field name.
  `type` - the 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)

Gets the 'reflective' type of the given type. The reflective type is the type used by the Java Reflection API. More precisely this method handles the array cases

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)

Gets the internal notation for primitive type.

Parameters:
  `string` - the 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)

Gets the iPOJO primitive type from the given primitive class.

Parameters:
  `clazz` - the class of the primitive type
Returns:
  the iPOJO primitive type name or `null` if not found.