Package eu.simuline.relana.model
Class SClass
- java.lang.Object
-
- eu.simuline.relana.model.SClass
-
public final class SClass extends Object
Describes classes of Effects ('services'). Like a java-class this has a namesName
, a packagepkg
and a superclasssuperClass
which is again anSClass
. Created: Thu Apr 14 19:35:08 2005- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Field Summary
Fields Modifier and Type Field Description static String
BOOL_S_CLASS_NAME
static SClass
BOOLEAN
private Map<Deficiency,DeficiencyNode>
deficiency2ordering
Maps declaredDeficiency
s (seegetDeclaredDeficiency2ordering()
) to their nodes which determine their predecessors and their successors.private DeficiencyMap
map
private Deficiency
maxDef
private Deficiency
minDef
private Map<Deficiency,SClass>
oldDef2innerClasses
private Package
pkg
The package of thisSClass
.private String
sName
The name of thisSClass
.private SClass
superClass
The superclass of thisSClass
.private Type
type
-
Constructor Summary
Constructors Modifier Constructor Description private
SClass()
private
SClass(String sName, Package pkg, SClass superClass, Map<Deficiency,SClass> oldDef2innerClasses, Map<Deficiency,DeficiencyNode> deficiency2ordering)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Package
asPackage()
private Type
createType()
boolean
equals(Object obj)
(package private) Map<Deficiency,DeficiencyNode>
getDeclaredDeficiency2ordering()
SClass
getDeclaredInnerClass(Deficiency def)
Map<Deficiency,SClass>
getDeclaredInnerClasses()
DeficiencyMap
getDeficiencyMap()
private static Map<Set<Deficiency>,Deficiency>
getMap(Map<Deficiency,SClass> oldDef2intCls)
Converts a map from the overwritten deficiencies to the overwriting classes, to a map from the set of deficiencies in the class back to the original deficiency.Deficiency
getMaxDefic()
Deficiency
getMinDefic()
(package private) Set<DeficiencyNode>
getMinDeficN()
String
getName()
Package
getPackage()
String
getPathName()
static SClass
getSClass(String sName, Package pkg, SClass superClass, Map<Deficiency,SClass> oldDef2innerClasses, Map<Deficiency,DeficiencyNode> def2ord)
SClass
getSuperClass()
Type
getType()
int
hashCode()
boolean
isInner()
String
toString()
(package private) void
verify()
void
verifyInner()
private void
verifyMMDefics()
private void
verifyNoShortcut()
Throws an exception if the transitive hull of the relation contains a cycle.
-
-
-
Field Detail
-
BOOL_S_CLASS_NAME
public static final String BOOL_S_CLASS_NAME
- See Also:
- Constant Field Values
-
BOOLEAN
public static final SClass BOOLEAN
-
sName
private final String sName
The name of thisSClass
.
-
pkg
private final Package pkg
The package of thisSClass
.
-
superClass
private final SClass superClass
-
oldDef2innerClasses
private final Map<Deficiency,SClass> oldDef2innerClasses
-
map
private final DeficiencyMap map
-
deficiency2ordering
private final Map<Deficiency,DeficiencyNode> deficiency2ordering
Maps declaredDeficiency
s (seegetDeclaredDeficiency2ordering()
) to their nodes which determine their predecessors and their successors. It is required that this relation extends that given bysuperClass
.
-
type
private final Type type
-
minDef
private Deficiency minDef
-
maxDef
private Deficiency maxDef
-
-
Constructor Detail
-
SClass
private SClass()
-
SClass
private SClass(String sName, Package pkg, SClass superClass, Map<Deficiency,SClass> oldDef2innerClasses, Map<Deficiency,DeficiencyNode> deficiency2ordering)
-
-
Method Detail
-
getMap
private static Map<Set<Deficiency>,Deficiency> getMap(Map<Deficiency,SClass> oldDef2intCls)
Converts a map from the overwritten deficiencies to the overwriting classes, to a map from the set of deficiencies in the class back to the original deficiency.- Parameters:
oldDef2intCls
- maps a deficiency in outer class to the inner class overwriting this deficiency.- Returns:
- a map from the set of deficiencies of a class back to the overwritten deficiency in the enclosing class.
-
getName
public String getName()
-
getPackage
public Package getPackage()
-
asPackage
public Package asPackage()
-
getPathName
public String getPathName()
-
isInner
public boolean isInner()
-
getType
public Type getType()
-
createType
private Type createType()
-
getSuperClass
public SClass getSuperClass()
-
getDeclaredInnerClasses
public Map<Deficiency,SClass> getDeclaredInnerClasses()
-
getDeclaredInnerClass
public SClass getDeclaredInnerClass(Deficiency def)
-
getDeficiencyMap
public DeficiencyMap getDeficiencyMap()
-
getDeclaredDeficiency2ordering
Map<Deficiency,DeficiencyNode> getDeclaredDeficiency2ordering()
-
verifyMMDefics
private void verifyMMDefics()
-
getMinDefic
public Deficiency getMinDefic()
-
getMaxDefic
public Deficiency getMaxDefic()
-
getMinDeficN
Set<DeficiencyNode> getMinDeficN()
-
getSClass
public static SClass getSClass(String sName, Package pkg, SClass superClass, Map<Deficiency,SClass> oldDef2innerClasses, Map<Deficiency,DeficiencyNode> def2ord)
-
verify
void verify() throws VerifyException
- Throws:
VerifyException
-
verifyNoShortcut
private void verifyNoShortcut() throws VerifyException
Throws an exception if the transitive hull of the relation contains a cycle.- Throws:
VerifyException
- if the transitive hull of the relation contains a cycle.
-
verifyInner
public void verifyInner() throws VerifyException
- Throws:
VerifyException
-
-