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, waitregister, registergetDeclaredType, getDeclaredType, getService, getServicepublic void registerTypedef(@Nonnull String identifier, @Nonnull String programContext, @Nonnull String target)
WritableTypeRegistryregisterTypedef in interface WritableTypeRegistryidentifier - 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)
TypeRegistrygetProvider in interface TypeRegistryname - 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)
TypeRegistrygetServiceProvider in interface TypeRegistryserviceName - Name of the service.programContext - The program context of the reference.public void registerRecursively(@Nonnull PService service)
WritableTypeRegistryregisterRecursively in interface WritableTypeRegistryservice - the service to register.public <T> void registerRecursively(PDeclaredDescriptor<T> declaredType)
WritableTypeRegistryregisterRecursively in interface WritableTypeRegistryT - 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–2018 morimekta.net. All rights reserved.