Package org.ptolemy.classloading
Interface ModelElementClassProvider
-
- All Known Implementing Classes:
DefaultModelElementClassProvider
,PackageBasedModelElementClassProvider
public interface ModelElementClassProvider
Get the classes for different types of model elements.Most important cases are actors and directors. But also dedicated port or parameter classes can be offered via implementations of this interface.
- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- ErwinDL
- Pt.AcceptedRating:
- Yellow (ErwinDL)
- Pt.ProposedRating:
- Yellow (ErwinDL)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<? extends NamedObj>
getClass(java.lang.String className, VersionSpecification versionSpec)
Return the requested class for the requested version (if specified).
-
-
-
Method Detail
-
getClass
java.lang.Class<? extends NamedObj> getClass(java.lang.String className, VersionSpecification versionSpec) throws java.lang.ClassNotFoundException
Return the requested class for the requested version (if specified). If this provider doesn't have this class available, it should throw aClassNotFoundException
. (Optionally, it could also just return null, for those dvp-ers who don't like exceptions. ;-) )- Parameters:
className
- typically a fully qualified Java class name. Mandatory non-null.versionSpec
- optional constraint on desired version for the class that must be provided. If null, no version constraint is imposed.- Returns:
- the concrete class of the
NamedObj
matching the given className. - Throws:
java.lang.ClassNotFoundException
- if this provider can not provide the requested class for the requested version (if specified)- See Also:
VersionSpecification
-
-