|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.functor.Declaration
de.intarsys.tools.functor.DeclarationBlock
public class DeclarationBlock
A generic implementation for IDeclarationBlock.
| Constructor Summary | |
|---|---|
DeclarationBlock(Object declarationContext)
|
|
DeclarationBlock(Object declarationContext,
IDeclarationElement[] declarations)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class de.intarsys.tools.functor.Declaration |
|---|
getDeclarationContext |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.intarsys.tools.functor.IDeclaration |
|---|
getDeclarationContext |
| Constructor Detail |
|---|
public DeclarationBlock(Object declarationContext)
public DeclarationBlock(Object declarationContext,
IDeclarationElement[] declarations)
| Method Detail |
|---|
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()
IDeclaration
copy 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()
IDeclarationBlock
size in interface IDeclarationBlockpublic String toString()
toString in class Object
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||