public abstract class BaseTypeRegistry extends Object implements WritableTypeRegistry
Modifier | Constructor and Description |
---|---|
protected |
BaseTypeRegistry() |
Modifier and Type | Method and Description |
---|---|
protected String |
finalTypename(String typeName,
String programContext)
Get the final typename of the given identifier within the context.
|
PDescriptorProvider |
getProvider(String name,
String context,
Map<String,String> annotations)
Given a type name and a package context, fetches the type provider for
the given type.
|
PServiceProvider |
getServiceProvider(String serviceName,
String programContext)
Given a service name and program context, fetches the service provider
for the given service.
|
protected static String |
qualifiedNameFromIdAndContext(String name,
String context)
Make a qualified type name from a name identifier string and the program context.
|
<T> void |
registerRecursively(PDeclaredDescriptor<T> declaredType)
Register a declared type recursively.
|
void |
registerRecursively(PService service)
Register the service recursively.
|
void |
registerTypedef(String identifier,
String programContext,
String target)
Registers a typedef definition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
register, register
getDeclaredType, getDeclaredType, getService, getService
public void registerTypedef(@Nonnull String identifier, @Nonnull String programContext, @Nonnull String target)
WritableTypeRegistry
registerTypedef
in interface WritableTypeRegistry
identifier
- The typedef name (the alias) to put.programContext
- The package context of the typedef.target
- The qualified name that the name represents.@Nonnull public PDescriptorProvider getProvider(@Nonnull String name, @Nonnull String context, @Nullable Map<String,String> annotations)
TypeRegistry
getProvider
in interface TypeRegistry
name
- Name of type, without any spaces.context
- The program context of the reference.annotations
- Annotations affecting the type.@Nonnull public PServiceProvider getServiceProvider(String serviceName, String programContext)
TypeRegistry
getServiceProvider
in interface TypeRegistry
serviceName
- Name of the service.programContext
- The program context of the reference.public void registerRecursively(@Nonnull PService service)
WritableTypeRegistry
registerRecursively
in interface WritableTypeRegistry
service
- the service to register.public <T> void registerRecursively(PDeclaredDescriptor<T> declaredType)
WritableTypeRegistry
registerRecursively
in interface WritableTypeRegistry
T
- The declared java type.declaredType
- The descriptor for the type.protected String finalTypename(String typeName, String programContext)
typeName
- The identifier name.programContext
- The program context.protected static String qualifiedNameFromIdAndContext(String name, String context)
name
- The type name.context
- The program context.Copyright © 2015–2017 morimekta.net. All rights reserved.