org.geotoolkit.metadata
Enum TypeValuePolicy

Object
  extended by Enum<TypeValuePolicy>
      extended by TypeValuePolicy
All Implemented Interfaces:
Serializable, Comparable<TypeValuePolicy>

public enum TypeValuePolicy
extends Enum<TypeValuePolicy>

Whatever MetadataStandard.asTypeMap(...) should return values for the property types, the element types (same as property types except for collections) or the declaring classes.

Since:
3.03
Version:
3.03
Author:
Martin Desruisseaux (Geomatys)
See Also:
MetadataStandard.asTypeMap(Class, TypeValuePolicy, KeyNamePolicy)
Module:
metadata/geotk-metadata (download)    View source code for this class

Enum Constant Summary
DECLARING_CLASS
          The type of the class that declares the method.
DECLARING_INTERFACE
          The type of the interface that declares the method.
ELEMENT_TYPE
          The type of a property, or type of elements if the property is a collection.
PROPERTY_TYPE
          The type of a property, as inferred from the return type of the property method.
 
Method Summary
static TypeValuePolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TypeValuePolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PROPERTY_TYPE

public static final TypeValuePolicy PROPERTY_TYPE
The type of a property, as inferred from the return type of the property method. Collections are not handled in any special way; if the return type is a collection, then the value is Collection.class (or a subclass).


ELEMENT_TYPE

public static final TypeValuePolicy ELEMENT_TYPE
The type of a property, or type of elements if the property is a collection. This is the same than PROPERTY_TYPE except that collections are handled in a special way: if the property is a collection, then the value is the type of elements in that collection.
Note: Current implementation has an additional slight difference: if the getter method in the implementation class declares a more specific return value than the getter method in the interface, and if the setter method (if any) expects the same specialized type, then ELEMENT_TYPE will use that specialized type. This is different than PROPERTY_TYPE which always use the type declared in the interface.


DECLARING_CLASS

public static final TypeValuePolicy DECLARING_CLASS
The type of the class that declares the method. A metadata implementation may have different declaring classes for its properties if some of them are declared in parent classes.


DECLARING_INTERFACE

public static final TypeValuePolicy DECLARING_INTERFACE
The type of the interface that declares the method. This is the same than DECLARING_CLASS, except that the interface from the metadata standard is returned instead than the implementation class.

Method Detail

values

public static TypeValuePolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TypeValuePolicy c : TypeValuePolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TypeValuePolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.