public class ProgramRegistry extends Object implements TypeRegistry
path to the
thrift file that was parsed.| Constructor and Description |
|---|
ProgramRegistry()
Create an empty program registry.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsProgramPath(String path)
Gets the document for a given file path.
|
<T> T |
getConstantValue(String constReference,
String programContext) |
<T extends PDeclaredDescriptor<T>> |
getDeclaredType(String typeName,
String programContext) |
Collection<ProgramTypeRegistry> |
getLoadedRegistries() |
PDescriptorProvider |
getProvider(String typeName,
String programContext,
Map<String,String> annotations) |
PService |
getService(String serviceName,
String programContext) |
PServiceProvider |
getServiceProvider(String serviceName,
String programContext) |
void |
putProgram(String path,
CProgram program)
Put the given program into the registry at the given path.
|
void |
putProgramType(String path,
ProgramType program)
Put the given program into the registry at the given path.
|
ProgramTypeRegistry |
registryForPath(String path)
Get a program type registry for the file at given path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDeclaredType, getEnumType, getMessageType, getService@Nonnull public ProgramTypeRegistry registryForPath(String path)
path - The thrift file path.@Nonnull public Collection<ProgramTypeRegistry> getLoadedRegistries()
public boolean containsProgramPath(String path)
path - The file path.public void putProgram(String path, CProgram program)
path - The thrift file path.program - The contained program.public void putProgramType(String path, ProgramType program)
path - The thrift file path.program - The contained program.@Nonnull public <T extends PDeclaredDescriptor<T>> T getDeclaredType(@Nonnull String typeName, @Nonnull String programContext)
getDeclaredType in interface TypeRegistry@Nullable public <T> T getConstantValue(@Nonnull String constReference, @Nonnull String programContext)
getConstantValue in interface TypeRegistry@Nonnull public PService getService(String serviceName, String programContext)
getService in interface TypeRegistry@Nonnull public PDescriptorProvider getProvider(String typeName, String programContext, Map<String,String> annotations)
getProvider in interface TypeRegistry@Nonnull public PServiceProvider getServiceProvider(String serviceName, String programContext)
getServiceProvider in interface TypeRegistryCopyright © 2015–2018 morimekta.net. All rights reserved.