public class SimpleLiteralFactory extends LiteralFactory
| Constructor and Description |
|---|
SimpleLiteralFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
createObject(Class<T> type,
Literal literal)
Converts a literal to an instance of the specified class
|
Literal |
createTypedLiteral(Object value)
Create a typed literal for the specified object
|
getInstance, setInstancepublic Literal createTypedLiteral(Object value) throws NoConvertorException
LiteralFactorycreateTypedLiteral in class LiteralFactoryvalue - the value of the literal to be createdNoConvertorException - thrown if value is of an invalid typepublic <T> T createObject(Class<T> type, Literal literal) throws NoConvertorException, InvalidLiteralTypeException
LiteralFactorycreateObject in class LiteralFactorytype - 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 © 2015–2022 The Apache Software Foundation. All rights reserved.