intarsys runtime library

de.intarsys.tools.functor
Class ArgumentDeclaration

java.lang.Object
  extended by de.intarsys.tools.functor.Declaration
      extended by de.intarsys.tools.functor.DeclarationElement
          extended by de.intarsys.tools.functor.ArgumentDeclaration
All Implemented Interfaces:
IArgumentDeclaration, IDeclaration, IDeclarationElement, IDeclarationSupport

public class ArgumentDeclaration
extends DeclarationElement
implements IArgumentDeclaration, IDeclarationSupport

An argument declaration supporting argument naming, default values and typing.


Field Summary
static Object VALUE_UNDEFINED
           
 
Fields inherited from interface de.intarsys.tools.functor.IDeclarationElement
MOD_TRANSIENT
 
Constructor Summary
ArgumentDeclaration(Object declarationContext, String name, String modifiers)
           
ArgumentDeclaration(Object declarationContext, String name, String modifiers, Object defaultValue, Class type)
           
ArgumentDeclaration(Object declarationContext, String name, String modifiers, Object defaultValue, Class type, String description)
           
ArgumentDeclaration(Object declarationContext, String name, String modifiers, String description)
           
 
Method Summary
 ArgumentDeclaration copy()
          Create a copy of this.
static ArgumentDeclaration declare(IDeclarationBlock declarationBlock, String pPath, String pModifiers, Object pDefaultValue, Class pType)
           
static ArgumentDeclaration declare(IDeclarationBlock declarationBlock, String pPath, String pModifiers, Object pDefaultValue, Class pType, String description)
           
 ArgumentDeclaration declare(String pName, String pModifiers, Object pDefaultValue, Class pType)
           
 IDeclarationBlock getDeclarationBlock()
          The block of declarations available so far for this.
 IFunctor getDefaultFunctor()
           
 String getDefaultLabel()
           
 Object getDefaultValue()
           
 Class getType()
           
 String getTypeLabel()
           
 boolean isDefaultDefined()
           
 void setDefaultFunctor(IFunctor defaultFunctor)
           
 void setDefaultValue(Object defaultValue)
           
 void setDefaultValueUndefined()
           
 void setType(Class pType)
           
 String toString()
           
 
Methods inherited from class de.intarsys.tools.functor.DeclarationElement
addModifier, getDescription, getModifiers, getModifierString, getName, hasModifier, setDescription, setModifierString, setName, validateName, validatePath
 
Methods inherited from class de.intarsys.tools.functor.Declaration
getDeclarationContext, isBlock
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.intarsys.tools.functor.IDeclarationElement
getModifierString, getName, hasModifier
 
Methods inherited from interface de.intarsys.tools.functor.IDeclaration
getDeclarationContext, isBlock
 

Field Detail

VALUE_UNDEFINED

public static final Object VALUE_UNDEFINED
Constructor Detail

ArgumentDeclaration

public ArgumentDeclaration(Object declarationContext,
                           String name,
                           String modifiers)

ArgumentDeclaration

public ArgumentDeclaration(Object declarationContext,
                           String name,
                           String modifiers,
                           Object defaultValue,
                           Class type)

ArgumentDeclaration

public ArgumentDeclaration(Object declarationContext,
                           String name,
                           String modifiers,
                           Object defaultValue,
                           Class type,
                           String description)

ArgumentDeclaration

public ArgumentDeclaration(Object declarationContext,
                           String name,
                           String modifiers,
                           String description)
Method Detail

declare

public static ArgumentDeclaration declare(IDeclarationBlock declarationBlock,
                                          String pPath,
                                          String pModifiers,
                                          Object pDefaultValue,
                                          Class pType)
                                   throws DeclarationException
Throws:
DeclarationException

declare

public static ArgumentDeclaration declare(IDeclarationBlock declarationBlock,
                                          String pPath,
                                          String pModifiers,
                                          Object pDefaultValue,
                                          Class pType,
                                          String description)
                                   throws DeclarationException
Throws:
DeclarationException

copy

public ArgumentDeclaration copy()
Description copied from interface: IDeclaration
Create a copy of this.

Specified by:
copy in interface IDeclaration
Returns:
A copy of this.

declare

public ArgumentDeclaration declare(String pName,
                                   String pModifiers,
                                   Object pDefaultValue,
                                   Class pType)

getDeclarationBlock

public IDeclarationBlock getDeclarationBlock()
Description copied from interface: IDeclarationSupport
The block of declarations available so far for this.

Specified by:
getDeclarationBlock in interface IDeclarationSupport
Returns:
The block of declarations available so far for this.

getDefaultFunctor

public IFunctor getDefaultFunctor()

getDefaultLabel

public String getDefaultLabel()

getDefaultValue

public Object getDefaultValue()
                       throws FunctorInvocationException
Specified by:
getDefaultValue in interface IArgumentDeclaration
Throws:
FunctorInvocationException

getType

public Class getType()
Specified by:
getType in interface IArgumentDeclaration

getTypeLabel

public String getTypeLabel()

isDefaultDefined

public boolean isDefaultDefined()
Specified by:
isDefaultDefined in interface IArgumentDeclaration

setDefaultFunctor

public void setDefaultFunctor(IFunctor defaultFunctor)

setDefaultValue

public void setDefaultValue(Object defaultValue)

setDefaultValueUndefined

public void setDefaultValueUndefined()

setType

public void setType(Class pType)

toString

public String toString()
Overrides:
toString in class DeclarationElement

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.