public class DefaultModelElementClassProvider extends java.lang.Object implements ModelElementClassProvider
Constructor and Description |
---|
DefaultModelElementClassProvider(java.lang.Class<? extends NamedObj>... knownClasses)
Create a provider that does not care about class versions,
i.e. it will only check on class names to check if it can provide
a requested class.
|
DefaultModelElementClassProvider(VersionSpecification version,
java.lang.Class<? extends NamedObj>... knownClasses)
Create a provider that cares about class versions, i.e. it will
check on class names and on the requested version to check if it
can provide a requested class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends NamedObj> |
getClass(java.lang.String className,
VersionSpecification versionSpec)
Get a class by name and version.
|
@SafeVarargs public DefaultModelElementClassProvider(java.lang.Class<? extends NamedObj>... knownClasses)
knownClasses
- The known classes@SafeVarargs public DefaultModelElementClassProvider(VersionSpecification version, java.lang.Class<? extends NamedObj>... knownClasses)
version
- if null, the provider will not care about versionsknownClasses
- The known classespublic java.lang.Class<? extends NamedObj> getClass(java.lang.String className, VersionSpecification versionSpec) throws java.lang.ClassNotFoundException
getClass
in interface ModelElementClassProvider
className
- The class nameversionSpec
- The versionjava.lang.ClassNotFoundException
- If the class is not found.VersionSpecification