ch.akuhn.fame
Class MetaRepository
java.lang.Object
ch.akuhn.fame.Repository
ch.akuhn.fame.MetaRepository
public class MetaRepository
- extends Repository
A meta-model (ie elements conforming to FM3).
- Author:
- Adrian Kuhn, 2007-2008
| Methods inherited from class ch.akuhn.fame.Repository |
accept, add, addAll, all, descriptionOf, exportMSE, exportMSE, fullname, getElements, getMetamodel, importMSE, importMSE, importMSE, isEmpty, newInstance, read, size, write |
MetaRepository
public MetaRepository()
MetaRepository
public MetaRepository(MetaRepository metamodel)
createFM3
public static MetaRepository createFM3()
isValidElementName
public static boolean isValidElementName(String string)
isValidName
public static boolean isValidName(String string)
add
public void add(Object element)
- Overrides:
add in class Repository
addClassDescription
public void addClassDescription(Class<? extends Object> cls,
MetaDescription desc)
allClassDescriptions
public Collection<MetaDescription> allClassDescriptions()
allPackageDescriptions
public Collection<PackageDescription> allPackageDescriptions()
allPropertyDescriptions
public Collection<PropertyDescription> allPropertyDescriptions()
checkConstraints
public Warnings checkConstraints()
descriptionNamed
public MetaDescription descriptionNamed(String fullName)
getDescription
public MetaDescription getDescription(Class jclass)
- Returns the Fame-class to which the given Java-class is connected in this metammodel.
- Parameters:
jclass - a causally connected Java-class.
- Returns:
- a causally connected Fame-class.
- Throws:
AssertionError - if the Java-class is not connected to any Fame-class in this metammodel.- See Also:
with(Class)
initializePackageNamed
public PackageDescription initializePackageNamed(String name)
isSelfDescribed
public boolean isSelfDescribed()
setImmutable
public void setImmutable()
with
public void with(Class jclass)
- Processes the annotations of the given Java-class, creates an according
Fame-class and establishes a Scenario-II connection between both. If such
a connection is already present, nothing is done.
- Parameters:
jclass - an annotated Java-class
- Throws:
AssertionError - if the Java-class is not annotated.- See Also:
FameDescription,
FamePackage,
FameProperty
withAll
public void withAll(Class... jclasses)
- Processes all given Java-classes.
- Parameters:
jclasses - some annotated Java-classes.
- Throws:
AssertionError - if any o fthe Java-classes is not annotated.- See Also:
with(Class)