public abstract class TypeImplementationsManager
extends java.lang.Object
Constructor and Description |
---|
TypeImplementationsManager()
Creates the TypeImplementationsManager, and preloads the cache with the types named in the PRELOAD property of the class' properties file
|
Modifier and Type | Method and Description |
---|---|
long |
cacheSize()
Gets the size of the type cache
|
static AbstractTypeImplementation_V0105 |
findTypeImplementationInCP(NameIdentifier typeName,
java.util.List<java.lang.String> typeImplementationsSearchPath)
Attempts to load a TypeImplementation object for the given typeName from the JVM's classpath.
|
static TypeImplementationsManager |
getInstance()
Gets the instance of the TypeImplementationsManager service for this JVM
|
AbstractTypeImplementation_V0105 |
getTypeImplementation(NameIdentifier typeName)
Gets the TypeImplementation object corresponding to the given typeDeclaration
|
AbstractTypeImplementation_V0105 |
getTypeImplementationWithoutException(NameIdentifier typeName)
Gets the TypeImplementation object corresponding to the given typeDeclaration
|
static java.lang.String |
getUnqualifiedClassName(java.lang.String typeName)
Gets The unqualified classname for the given type's implementing class, if the type were java-backed.
|
void |
removeTypeImplementation(NameIdentifier typeName)
Removes the implementation for the named type
|
void |
reset()
Resets the TypeImplementationsManager by clearing the type implementations cache, except for those that are mentioned in the PRELOAD config property.
|
public TypeImplementationsManager()
public static AbstractTypeImplementation_V0105 findTypeImplementationInCP(NameIdentifier typeName, java.util.List<java.lang.String> typeImplementationsSearchPath) throws NotFoundException
typeName
- The name of the Type for which an implementation object is soughttypeImplementationsSearchPath
- A CSV list of fully-qualified package names.NotFoundException
- If no implementation could be returnedTypeImplementationsManagerRunTimeException
- if an impementing class could be found for the named type, but some problem prevented that class from being instantiatedpublic static TypeImplementationsManager getInstance()
public static java.lang.String getUnqualifiedClassName(java.lang.String typeName)
typeName
- the type's identifying namepublic final long cacheSize()
public final AbstractTypeImplementation_V0105 getTypeImplementation(NameIdentifier typeName) throws NotFoundException
typeName
- The type declaration object holding the name of a type, whose implementation object is to be fetchedNotFoundException
- If no implementation could be returnedpublic final AbstractTypeImplementation_V0105 getTypeImplementationWithoutException(NameIdentifier typeName)
typeName
- The type declaration object holding the name of a type, whose implementation object is to be fetchedpublic final void removeTypeImplementation(NameIdentifier typeName)
typeName
- The name of the type whose implementation is to be removedpublic final void reset()