public class TypeLocatorImpl extends Object implements TypeHelper, Serializable
TypeHelper
Constructor and Description |
---|
TypeLocatorImpl(TypeResolver typeResolver) |
Modifier and Type | Method and Description |
---|---|
Type |
any(Type metaType,
Type identifierType)
Retrieve the type representing an ANY mapping.
|
BasicType |
basic(Class javaType)
Convenience form of
TypeHelper.basic(String) . |
BasicType |
basic(String name)
Retrieve the basic type registered against the given name.
|
Type |
custom(Class userTypeClass)
Retrieve the type for the given user-type class (
UserType or
CompositeUserType ). |
Type |
custom(Class userTypeClass,
Properties parameters)
Retrieve the type for the given user-type class (
UserType or
CompositeUserType ). |
Type |
entity(Class entityClass)
Retrieve a type representing the given entity.
|
Type |
entity(String entityName)
Retrieve a type representing the given entity.
|
Type |
heuristicType(String name)
Uses heuristics to deduce the proper
Type given a string naming the type or Java class. |
public TypeLocatorImpl(TypeResolver typeResolver)
public BasicType basic(String name)
TypeHelper
basic
in interface TypeHelper
name
- The name of the basic type to retrievepublic BasicType basic(Class javaType)
TypeHelper
TypeHelper.basic(String)
. The intended use of this is something like
basic(Integer.class)
or basic(int.class)
basic
in interface TypeHelper
javaType
- The java type for which to retrieve the type instance.public Type heuristicType(String name)
TypeHelper
Type
given a string naming the type or Java class.
See TypeResolver.heuristicType(java.lang.String)
for a discussion of the
heuristic algorithm.heuristicType
in interface TypeHelper
name
- The name of the type or Java classTypeResolver.heuristicType(java.lang.String)
public Type entity(Class entityClass)
TypeHelper
entity
in interface TypeHelper
entityClass
- The entity Java type.public Type entity(String entityName)
TypeHelper
entity
in interface TypeHelper
entityName
- The entity name.public Type custom(Class userTypeClass)
TypeHelper
UserType
or
CompositeUserType
).custom
in interface TypeHelper
userTypeClass
- The user type classpublic Type custom(Class userTypeClass, Properties parameters)
TypeHelper
UserType
or
CompositeUserType
).custom
in interface TypeHelper
userTypeClass
- The user type classparameters
- Configuration properties.public Type any(Type metaType, Type identifierType)
TypeHelper
any
in interface TypeHelper
metaType
- The meta type for the ANYidentifierType
- The identifier type for the ANYCopyright © 2001-2017 Red Hat, Inc. All Rights Reserved.