org.ocleditor.parser.model
Interface IOclElement

All Known Subinterfaces:
IOclContext, IOclInvariant, IOclModel, IOclPackage, IOclPostCondition, IOclPreCondition
All Known Implementing Classes:
OclContext, OclElement, OclFile, OclInvariant, OclPackage, OclPostCondition, OclPreCondition

public interface IOclElement

Represents the base interface for all OCL elements.


Method Summary
 void accept(IOclModelVisitor visitor)
          Accepts the given visitor.
 void addChild(IOclElement elem)
          Adds an OCL element as a child.
 IOclElement[] getChildren()
          Returns the children that are also OCL elements.
 int getColumn()
           
 int getEndColumn()
           
 int getEndLine()
           
 int getLength()
           
 int getLine()
           
 java.lang.String getName()
           
 IOclElement getParent()
           
 boolean hasChildren()
          Returns whether the OCL element has children.
 void setColumn(int column)
           
 void setEndColumn(int endColumn)
           
 void setEndLine(int endLine)
           
 void setLine(int line)
           
 

Method Detail

getName

public java.lang.String getName()
Returns:
Returns the name of the OCL element.

setLine

public void setLine(int line)
Parameters:
line - The start line to set.

getLine

public int getLine()
Returns:
Returns the start line of the OCL element.

setColumn

public void setColumn(int column)
Parameters:
column - The start column to set.

getColumn

public int getColumn()
Returns:
Returns the start column of the OCL element.

setEndLine

public void setEndLine(int endLine)
Parameters:
endLine - The end line to set.

getEndLine

public int getEndLine()
Returns:
Returns the end line.

setEndColumn

public void setEndColumn(int endColumn)
Parameters:
endColumn - The end column to set.

getEndColumn

public int getEndColumn()
Returns:
Returns the end column of the OCL element.

getLength

public int getLength()
Returns:
Returns the length of the OCL element.

getParent

public IOclElement getParent()
Returns:
Returns the parent OCL element of the current OCL element.

addChild

public void addChild(IOclElement elem)
Adds an OCL element as a child.

(Composite design pattern)


hasChildren

public boolean hasChildren()
Returns whether the OCL element has children.

(Composite design pattern)


getChildren

public IOclElement[] getChildren()
Returns the children that are also OCL elements.

(Composite design pattern)


accept

public void accept(IOclModelVisitor visitor)
Accepts the given visitor. The visitor's visit method is called with this delta if applicable. If the visitor returns true, the children are also visited.

(Visitor design pattern)