public class SimpleLiteralFactory extends LiteralFactory
Constructor and Description |
---|
SimpleLiteralFactory() |
Modifier and Type | Method and Description |
---|---|
<T> T |
createObject(Class<T> type,
TypedLiteral literal)
Converts a literal to an instance of the specified class
|
TypedLiteral |
createTypedLiteral(Object value)
Create a typed literal for the specified object
|
getInstance, setInstance
public TypedLiteral createTypedLiteral(Object value) throws NoConvertorException
LiteralFactory
createTypedLiteral
in class LiteralFactory
value
- the value of the literal to be createdNoConvertorException
- thrown if value
is of an invalid typepublic <T> T createObject(Class<T> type, TypedLiteral literal) throws NoConvertorException, InvalidLiteralTypeException
LiteralFactory
createObject
in class LiteralFactory
type
- the Class
of the returned objectliteral
- the literal to be convertedNoConvertorException
- thrown if type
is unsupportedInvalidLiteralTypeException
- if the literal type doesn't match the requested java typeCopyright © 2014 The Apache Software Foundation. All Rights Reserved.