|
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.DeclarationElement
public abstract class DeclarationElement
A common superclass for IDeclarationElement instances. This one has a
very simple implementation for modifiers. Only the presence of the modifier
string fragment in declared modifier string is checked.
| Constructor Summary | |
|---|---|
DeclarationElement(Object declarationContext,
String name,
String modifiers)
|
|
DeclarationElement(Object declarationContext,
String name,
String modifiers,
IDeclaration[] nestedDeclarations)
|
|
| Method Summary | |
|---|---|
IDeclaration[] |
getDeclarations()
The array of IDeclaration instances in this block. |
String |
getName()
An optional name for the declaration element. |
boolean |
hasModifier(String modifier)
true if the declaration has the requested modifier. |
boolean |
isBlock()
true if this declaration has child elements itself. |
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 |
|---|
accept, getDeclarationContext |
| Methods inherited from interface de.intarsys.tools.functor.IDeclaration |
|---|
accept, getDeclarationContext |
| Constructor Detail |
|---|
public DeclarationElement(Object declarationContext,
String name,
String modifiers)
public DeclarationElement(Object declarationContext,
String name,
String modifiers,
IDeclaration[] nestedDeclarations)
| Method Detail |
|---|
public IDeclaration[] getDeclarations()
IDeclarationBlockIDeclaration instances in this block.
getDeclarations in interface IDeclarationBlockIDeclaration instances in this block.public String getName()
IDeclarationElement
getName in interface IDeclarationElementpublic boolean hasModifier(String modifier)
IDeclarationElementtrue if the declaration has the requested modifier.
An implementation is free to support modifiers and define their respective semantics.
An example for a modifier may be "persistent" to indicate the implementation should store argument values to be able to present them again in a later call (in a wizard for example).
hasModifier in interface IDeclarationElementmodifier - The modifier name.
true if the declaration has the requested
modifier.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 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 | |||||||||