Class Compound
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.common.Compound
-
-
Field Summary
Fields Modifier and Type Field Description private CompoundTypeDescriptortype
-
Constructor Summary
Constructors Constructor Description Compound(CompoundTypeDescriptor type)Creates a compound.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IVisitor visitor)Accepts the visitor for visiting.java.lang.StringgetName()Returns the name of the compound.CompoundTypeDescriptorgetRefines()Returns the refined compound.CompoundTypeDescriptor.SlotDescriptorgetSlot(int index)Returns the specified slot.intgetSlotsCount()Returns the number of slots.TypeDescriptor<?>getType()Returns the defined type.booleanisAbstract()Returns whether the compound is abstract.
-
-
-
Field Detail
-
type
private CompoundTypeDescriptor type
-
-
Constructor Detail
-
Compound
public Compound(CompoundTypeDescriptor type)
Creates a compound.- Parameters:
type- the type of the compound
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the compound.- Returns:
- the name of the compound
-
getRefines
public CompoundTypeDescriptor getRefines()
Returns the refined compound.- Returns:
- the refined compound (null for none)
-
isAbstract
public boolean isAbstract()
Returns whether the compound is abstract.- Returns:
truefor abstract,falseelse
-
getSlotsCount
public int getSlotsCount()
Returns the number of slots.- Returns:
- the number of slots
-
getSlot
public CompoundTypeDescriptor.SlotDescriptor getSlot(int index)
Returns the specified slot.- Parameters:
index- the 0-based index- Returns:
- the slot
- Throws:
java.lang.IndexOutOfBoundsException- ifindex < 0 || index >=getSlotsCount()
-
getType
public TypeDescriptor<?> getType()
Returns the defined type.- Returns:
- the defined type
-
accept
public java.lang.Object accept(IVisitor visitor) throws VilException
Accepts the visitor for visiting.- Parameters:
visitor- the visitor to be used- Returns:
- the result of visiting this instance (may be null)
- Throws:
VilException- in case that visiting fails (e.g., execution)
-
-