org.kohsuke.args4j.spi
Class MethodSetter

java.lang.Object
  extended by org.kohsuke.args4j.spi.MethodSetter
All Implemented Interfaces:
Setter

public final class MethodSetter
extends Object
implements Setter

Setter that sets to a Method.

Author:
Kohsuke Kawaguchi

Constructor Summary
MethodSetter(CmdLineParser parser, Object bean, Method m)
           
 
Method Summary
 void addValue(Object value)
          Adds/sets a value to the property of the option bean.
 Class getType()
          Gets the type of the underlying method/field.
 boolean isMultiValued()
          Whether this setter is instrinsically multi-valued.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodSetter

public MethodSetter(CmdLineParser parser,
                    Object bean,
                    Method m)
Method Detail

getType

public Class getType()
Description copied from interface: Setter
Gets the type of the underlying method/field.

Specified by:
getType in interface Setter

isMultiValued

public boolean isMultiValued()
Description copied from interface: Setter
Whether this setter is instrinsically multi-valued.

Specified by:
isMultiValued in interface Setter

addValue

public void addValue(Object value)
              throws CmdLineException
Description copied from interface: Setter
Adds/sets a value to the property of the option bean.

A Setter object has an implicit knowledge about the property it's setting, and the instance of the option bean.

Specified by:
addValue in interface Setter
Throws:
CmdLineException


Copyright © 2003-2011 Kohsuke Kawaguchi. All Rights Reserved.