public class DeclarationBlock extends Declaration implements IDeclarationBlock
IDeclarationBlock.| Constructor and Description |
|---|
DeclarationBlock(Object declarationContext) |
DeclarationBlock(Object declarationContext,
IDeclarationElement[] declarations) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDeclarationElement(IDeclarationElement pDeclaration)
Add an
IDeclarationElement to this block; |
void |
clear()
Remove all
IDeclarationElement instances from this block; |
IDeclaration |
copy()
Create a copy of this.
|
IDeclarationElement |
getDeclarationElement(String name)
The
IDeclarationElement for the given name. |
IDeclarationElement[] |
getDeclarationElements()
The array of
IDeclarationElement instances in this block. |
boolean |
isBlock()
true if this declaration has child elements itself. |
void |
moveDown(IDeclarationElement declaration)
Move element to the position after its current position.
|
void |
moveUp(IDeclarationElement declaration)
Move element to the position before its current position.
|
boolean |
removeDeclarationElement(IDeclarationElement declaration)
Remove an
IDeclarationElement from this block; |
int |
size()
The number of declarations in this block.
|
String |
toString() |
getDeclarationContextequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDeclarationContextpublic DeclarationBlock(Object declarationContext)
public DeclarationBlock(Object declarationContext, IDeclarationElement[] declarations)
public void addDeclarationElement(IDeclarationElement pDeclaration)
IDeclarationBlockIDeclarationElement to this block;addDeclarationElement in interface IDeclarationBlockpublic void clear()
IDeclarationBlockIDeclarationElement instances from this block;clear in interface IDeclarationBlockpublic IDeclaration copy()
IDeclarationcopy in interface IDeclarationpublic IDeclarationElement getDeclarationElement(String name)
IDeclarationBlockIDeclarationElement for the given name.getDeclarationElement in interface IDeclarationBlockIDeclarationElement for the given name.public IDeclarationElement[] getDeclarationElements()
IDeclarationBlockIDeclarationElement instances in this block.getDeclarationElements in interface IDeclarationBlockIDeclarationElement instances in this block.public boolean isBlock()
IDeclarationtrue if this declaration has child elements itself.
A IDeclarationElement may be a IDeclarationBlock,
supporting nested declarations. You should not use "instanceof
IDeclarationBlock" to check this behavior but this method.
isBlock in interface IDeclarationisBlock in class Declarationtrue if this declaration has child elements itself.public void moveDown(IDeclarationElement declaration)
IDeclarationBlockIf the element is the last declaration or not contained in the block this method does nothing.
moveDown in interface IDeclarationBlockpublic void moveUp(IDeclarationElement declaration)
IDeclarationBlockIf the element is the first declaration or not contained in the block this method does nothing.
moveUp in interface IDeclarationBlockpublic boolean removeDeclarationElement(IDeclarationElement declaration)
IDeclarationBlockIDeclarationElement from this block;removeDeclarationElement in interface IDeclarationBlocktrue if declaration was removedpublic int size()
IDeclarationBlocksize in interface IDeclarationBlockCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.