Package de.obqo.decycle.model
Class SliceType
- java.lang.Object
-
- de.obqo.decycle.model.SliceType
-
- All Implemented Interfaces:
Comparable<SliceType>
public final class SliceType extends Object implements Comparable<SliceType>
Instances ofSliceTypedefine thetypeof aNode. There is aclassType()for nodes representing a single Java class, there is apackageType()for nodes representing a package, and there iscustomType(String)for nodes representing custom slices, e.g. groups of packages. Each slice type has a name that represents the name of the slicing. For example, we might define a custom slicing "Quarter" that maps each package to one of 4 slices. That will result in 4 nodes in which each is a custom slice and all have the typesliceType("Quarter").
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SliceTypeclassType()intcompareTo(SliceType other)static SliceTypecustomType(String name)StringdisplayString()booleanequals(Object o)de.obqo.decycle.model.SliceType.KindgetKind()StringgetName()inthashCode()booleanisClassType()booleanisSliceType()static SliceTypepackageType()StringtoString()
-
-
-
Method Detail
-
classType
public static SliceType classType()
- Returns:
- the singleton class type
-
packageType
public static SliceType packageType()
- Returns:
- the singleton package type
-
customType
public static SliceType customType(String name)
- Parameters:
name- the name of the slicing- Returns:
- a new slice type with the given
name
-
isClassType
public boolean isClassType()
-
isSliceType
public boolean isSliceType()
-
displayString
public String displayString()
-
compareTo
public int compareTo(SliceType other)
- Specified by:
compareToin interfaceComparable<SliceType>
-
getKind
public de.obqo.decycle.model.SliceType.Kind getKind()
-
getName
public String getName()
-
-