public interface TypeResolver
MetadataType
from a given reference by delegating the resolution to the right
TypeLoader
, where if found a MetadataType
will be returned.
See resolveType(String)
Modifier and Type | Field and Description |
---|---|
static String |
CATALOG_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static TypeResolver |
create(ClassLoader classLoader)
Reads the entire file to properly load a
TypeResolver |
static TypeResolver |
createFrom(String data,
ClassLoader classLoader)
Reads the entire content to properly load a
TypeResolver |
static TypeResolver |
createFrom(URL url,
ClassLoader classLoader)
Reads the entire file to properly load a
TypeResolver |
Optional<MetadataType> |
resolveType(String reference)
Returns the
MetadataType of the specified type if found. |
static final String CATALOG_SEPARATOR
Optional<MetadataType> resolveType(String reference) throws TypeResolverException
MetadataType
of the specified type if found. The value of reference
must be a conjunction of
information where it could have the following pieces
TypeResolver
was instantiated by 3 catalogs:
reference
must have one of the following values:
TypeResolver
will held the responsibility of providing a fixed set of primitive
types, see PrimitiveTypesTypeLoader.PRIMITIVE_TYPES
. To reference them, the literal name will be enough:
StringType
BooleanType
reference
- The identifier name of the typeTypeResolverException
- if the reference
has a type loader's ID that is absent in the current manager.static TypeResolver create(ClassLoader classLoader)
TypeResolver
classLoader
- context class loader where the catalog is being createdTypeResolver
static TypeResolver createFrom(URL url, ClassLoader classLoader)
TypeResolver
url
- targeting the catalog's URLs locationclassLoader
- context class loader where the catalog is being createdTypeResolver
static TypeResolver createFrom(String data, ClassLoader classLoader)
TypeResolver
data
- content of an XML with the catalog's documentclassLoader
- context class loader where the catalog is being createdTypeResolver
Copyright © 2018. All rights reserved.