com.gridsystems.nextgrid.api.builder
Interface ReferenceFactory<T>

Type Parameters:
T - Data type

public interface ReferenceFactory<T>

Factory for Reference types.

Author:
Rodrigo Ruiz

Method Summary
 nextgrid.api.pom.Reference<?> createReference(T data)
          Creates a reference instance for the given data value.
 java.net.URI[] getSupportedTypes()
          Gets a list of supported types for this instance.
 boolean supports(java.lang.Class<?> c)
          Gets if this factory supports casting to the given class.
 java.lang.Class<?> toClass(java.net.URI type)
          Gets an appropriate Java Class for handling data of the specified type.
 

Method Detail

createReference

nextgrid.api.pom.Reference<?> createReference(T data)
Creates a reference instance for the given data value.

Parameters:
data - A data value
Returns:
A reference instance

getSupportedTypes

java.net.URI[] getSupportedTypes()
Gets a list of supported types for this instance.

Returns:
An array of type URIs

toClass

java.lang.Class<?> toClass(java.net.URI type)
Gets an appropriate Java Class for handling data of the specified type.

Parameters:
type - A type URI
Returns:
A Java class

supports

boolean supports(java.lang.Class<?> c)
Gets if this factory supports casting to the given class.

Parameters:
c - The class to test
Returns:
true/false


Copyright © 2006-2008 Grid Systems, S.A.. All Rights Reserved.