intarsys runtime library

de.intarsys.tools.functor
Interface IDeclarationBlock

All Superinterfaces:
IDeclaration
All Known Implementing Classes:
DeclarationBlock

public interface IDeclarationBlock
extends IDeclaration

A group of IDeclarationElement instances.


Method Summary
 void addDeclarationElement(IDeclarationElement element)
          Add an IDeclarationElement to this block;
 void clear()
          Remove all IDeclarationElement instances from this block;
 IDeclarationElement getDeclarationElement(String name)
          The IDeclarationElement for the given name.
 IDeclarationElement[] getDeclarationElements()
          The array of IDeclarationElement instances in this block.
 void moveDown(IDeclarationElement element)
          Move element to the position after its current position.
 void moveUp(IDeclarationElement element)
          Move element to the position before its current position.
 boolean removeDeclarationElement(IDeclarationElement element)
          Remove an IDeclarationElement from this block;
 int size()
          The number of declarations in this block.
 
Methods inherited from interface de.intarsys.tools.functor.IDeclaration
copy, getDeclarationContext, isBlock
 

Method Detail

addDeclarationElement

void addDeclarationElement(IDeclarationElement element)
Add an IDeclarationElement to this block;

Parameters:
element -

clear

void clear()
Remove all IDeclarationElement instances from this block;


getDeclarationElement

IDeclarationElement getDeclarationElement(String name)
The IDeclarationElement for the given name.

Parameters:
name -
Returns:
The IDeclarationElement for the given name.

getDeclarationElements

IDeclarationElement[] getDeclarationElements()
The array of IDeclarationElement instances in this block.

Returns:
The array of IDeclarationElement instances in this block.

moveDown

void moveDown(IDeclarationElement element)
Move element to the position after its current position. This means that the element declaration will be performed later.

If the element is the last declaration or not contained in the block this method does nothing.

Parameters:
element -

moveUp

void moveUp(IDeclarationElement element)
Move element to the position before its current position. This means that the element declaration will be performed earlier.

If the element is the first declaration or not contained in the block this method does nothing.

Parameters:
element -

removeDeclarationElement

boolean removeDeclarationElement(IDeclarationElement element)
Remove an IDeclarationElement from this block;

Parameters:
element -
Returns:
true if declaration was removed

size

int size()
The number of declarations in this block.

Returns:
The number of declarations in this block.

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.