Package cruise.umple.compiler
Class UmpleElement
java.lang.Object
cruise.umple.compiler.UmpleElement
- Direct Known Subclasses:
UmpleClassifier
public class UmpleElement
extends java.lang.Object
An UmpleElement is one of the top-level items found in an Umple model
Currently it has one subclass, UmpleClassifier
-
Constructor Summary
Constructors Constructor Description UmpleElement(java.lang.String aName)
-
Method Summary
Modifier and Type Method Description boolean
addEndPosition(Position aEndPosition)
boolean
addEndPositionAt(Position aEndPosition, int index)
boolean
addNamespace(java.lang.String aNamespace)
boolean
addOrMoveEndPositionAt(Position aEndPosition, int index)
boolean
addOrMovePositionAt(Position aPosition, int index)
boolean
addPosition(Position aPosition)
boolean
addPositionAt(Position aPosition, int index)
void
appendExtraCode(boolean flag, CodeBlock cb)
void
appendExtraCode(java.lang.String newCode)
void
appendExtraCode(java.lang.String newCode, boolean addNewline)
void
delete()
Coordinate
getCoordinates()
Specifies the position of this Umple element (ex.java.lang.String
getDisplayColor()
Specifies the display color of this elementPosition
getEndPosition(int index)
java.util.List<Position>
getEndPositions()
Kept aligned with positionsjava.lang.String
getExtraCode()
boolean
getHasMainMethod()
boolean
getIsInternal()
Specifies whether or not the Umple element is internal.java.lang.String
getModifier()
The modifier associated with the Umple element.java.lang.String
getName()
The name of the Umple element.java.lang.String
getNamespace(int index)
NameSpace
getNameSpace()
java.lang.String[]
getNamespaces()
java.lang.String
getPackageName()
Position
getPosition(int index)
java.util.List<Position>
getPositions()
The position(s) of the element in the source code, used in debugging may have multiple positions in the case of mixinsboolean
hasEndPositions()
boolean
hasExtraCode()
boolean
hasNamespaces()
boolean
hasPositions()
int
indexOfEndPosition(Position aEndPosition)
int
indexOfNamespace(java.lang.String aNamespace)
int
indexOfPosition(Position aPosition)
boolean
isHasMainMethod()
boolean
isIsInternal()
boolean
isUmpleClass()
Methods to distinguish the subclass typesboolean
isUmpleInterface()
boolean
isUmpleTrait()
static int
minimumNumberOfEndPositions()
static int
minimumNumberOfPositions()
int
numberOfEndPositions()
int
numberOfNamespaces()
int
numberOfPositions()
boolean
removeEndPosition(Position aEndPosition)
boolean
removeNamespace(java.lang.String aNamespace)
boolean
removePosition(Position aPosition)
void
resetExtraCode()
boolean
setCoordinates(Coordinate aCoordinates)
boolean
setDisplayColor(java.lang.String aDisplayColor)
boolean
setHasMainMethod(boolean aHasMainMethod)
boolean
setIsInternal(boolean aIsInternal)
boolean
setModifier(java.lang.String aModifier)
boolean
setName(java.lang.String aName)
boolean
setNameSpace(NameSpace aNameSpace)
boolean
setPackageName(java.lang.String aPackageName)
java.lang.String
toString()
-
Constructor Details
-
UmpleElement
public UmpleElement(java.lang.String aName)
-
-
Method Details
-
setName
public boolean setName(java.lang.String aName) -
setModifier
public boolean setModifier(java.lang.String aModifier) -
setHasMainMethod
public boolean setHasMainMethod(boolean aHasMainMethod) -
addNamespace
public boolean addNamespace(java.lang.String aNamespace) -
removeNamespace
public boolean removeNamespace(java.lang.String aNamespace) -
setNameSpace
-
setPackageName
public boolean setPackageName(java.lang.String aPackageName) -
setIsInternal
public boolean setIsInternal(boolean aIsInternal) -
setCoordinates
-
setDisplayColor
public boolean setDisplayColor(java.lang.String aDisplayColor) -
getName
public java.lang.String getName()The name of the Umple element. -
getModifier
public java.lang.String getModifier()The modifier associated with the Umple element. -
getHasMainMethod
public boolean getHasMainMethod() -
getNamespace
public java.lang.String getNamespace(int index) -
getNamespaces
public java.lang.String[] getNamespaces() -
numberOfNamespaces
public int numberOfNamespaces() -
hasNamespaces
public boolean hasNamespaces() -
indexOfNamespace
public int indexOfNamespace(java.lang.String aNamespace) -
getNameSpace
-
getPackageName
public java.lang.String getPackageName() -
getIsInternal
public boolean getIsInternal()Specifies whether or not the Umple element is internal. -
getCoordinates
Specifies the position of this Umple element (ex. The UmpleOnline diagram). -
getDisplayColor
public java.lang.String getDisplayColor()Specifies the display color of this element -
isHasMainMethod
public boolean isHasMainMethod() -
isIsInternal
public boolean isIsInternal() -
getPosition
-
getPositions
The position(s) of the element in the source code, used in debugging may have multiple positions in the case of mixins -
numberOfPositions
public int numberOfPositions() -
hasPositions
public boolean hasPositions() -
indexOfPosition
-
getEndPosition
-
getEndPositions
Kept aligned with positions -
numberOfEndPositions
public int numberOfEndPositions() -
hasEndPositions
public boolean hasEndPositions() -
indexOfEndPosition
-
minimumNumberOfPositions
public static int minimumNumberOfPositions() -
addPosition
-
removePosition
-
addPositionAt
-
addOrMovePositionAt
-
minimumNumberOfEndPositions
public static int minimumNumberOfEndPositions() -
addEndPosition
-
removeEndPosition
-
addEndPositionAt
-
addOrMoveEndPositionAt
-
delete
public void delete() -
isUmpleClass
public boolean isUmpleClass()Methods to distinguish the subclass types -
isUmpleInterface
public boolean isUmpleInterface() -
isUmpleTrait
public boolean isUmpleTrait() -
appendExtraCode
public void appendExtraCode(java.lang.String newCode) -
resetExtraCode
public void resetExtraCode() -
appendExtraCode
public void appendExtraCode(java.lang.String newCode, boolean addNewline) -
appendExtraCode
-
hasExtraCode
public boolean hasExtraCode() -
getExtraCode
public java.lang.String getExtraCode() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-