|
|||||||||
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(java.lang.Object declarationContext,
java.lang.String name,
java.lang.String modifiers)
|
|
DeclarationElement(java.lang.Object declarationContext,
java.lang.String name,
java.lang.String modifiers,
IDeclaration[] nestedDeclarations)
|
Method Summary | |
---|---|
IDeclaration[] |
getDeclarations()
The array of IDeclaration instances in this block. |
java.lang.String |
getName()
An optional name for the declaration element. |
boolean |
hasModifier(java.lang.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. |
java.lang.String |
toString()
|
Methods inherited from class de.intarsys.tools.functor.Declaration |
---|
getDeclarationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.intarsys.tools.functor.IDeclaration |
---|
accept, getDeclarationContext |
Constructor Detail |
---|
public DeclarationElement(java.lang.Object declarationContext, java.lang.String name, java.lang.String modifiers)
public DeclarationElement(java.lang.Object declarationContext, java.lang.String name, java.lang.String modifiers, IDeclaration[] nestedDeclarations)
Method Detail |
---|
public IDeclaration[] getDeclarations()
IDeclarationBlock
IDeclaration
instances in this block.
getDeclarations
in interface IDeclarationBlock
IDeclaration
instances in this block.public java.lang.String getName()
IDeclarationElement
getName
in interface IDeclarationElement
public boolean hasModifier(java.lang.String modifier)
IDeclarationElement
true
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 IDeclarationElement
modifier
- The modifier name.
true
if the declaration has the requested
modifier.public boolean isBlock()
IDeclaration
true
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 IDeclaration
isBlock
in class Declaration
true
if this declaration has child elements
itself.public int size()
IDeclarationBlock
size
in interface IDeclarationBlock
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |