org.apache.commons.contract.descriptor
Class ParameterDescriptor

java.lang.Object
  extended by org.apache.commons.contract.descriptor.Descriptor
      extended by org.apache.commons.contract.descriptor.ParameterDescriptor
Direct Known Subclasses:
RequiredEnvironmentDescriptor

public class ParameterDescriptor
extends Descriptor


Field Summary
protected  Constraints constraints
           
protected  Object defaultValue
           
static ParameterDescriptor[] NO_PARAMETERS
           
protected  boolean required
           
 
Fields inherited from class org.apache.commons.contract.descriptor.Descriptor
description, name
 
Constructor Summary
ParameterDescriptor(String name, ParameterBundle description, Constraints valueDescriptor)
           
ParameterDescriptor(String name, ParameterBundle description, Constraints valueDescriptor, Object defaultValue)
           
 
Method Summary
 boolean equals(Object o)
           
 Constraints getConstraints()
           
 Object getDefaultValue()
           
 boolean isRequired()
           
 void setConstraints(Constraints valueDescriptor)
           
 void setDefaultValue(Object defaultValue)
           
 
Methods inherited from class org.apache.commons.contract.descriptor.Descriptor
getDescription, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_PARAMETERS

public static final ParameterDescriptor[] NO_PARAMETERS

constraints

protected Constraints constraints

defaultValue

protected Object defaultValue

required

protected boolean required
Constructor Detail

ParameterDescriptor

public ParameterDescriptor(String name,
                           ParameterBundle description,
                           Constraints valueDescriptor)

ParameterDescriptor

public ParameterDescriptor(String name,
                           ParameterBundle description,
                           Constraints valueDescriptor,
                           Object defaultValue)
Method Detail

isRequired

public boolean isRequired()

setConstraints

public void setConstraints(Constraints valueDescriptor)

getConstraints

public Constraints getConstraints()

setDefaultValue

public void setDefaultValue(Object defaultValue)

getDefaultValue

public Object getDefaultValue()

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.