org.sonatype.gshell.util.setter
Class CollectionFieldSetter

java.lang.Object
  extended by org.sonatype.gshell.util.setter.SetterSupport
      extended by org.sonatype.gshell.util.setter.FieldSetter
          extended by org.sonatype.gshell.util.setter.CollectionFieldSetter
All Implemented Interfaces:
Setter

public class CollectionFieldSetter
extends FieldSetter

Setter for fields of collection types. Currently supports lists and sets.

Since:
2.0
Author:
Jason Dillon

Nested Class Summary
 
Nested classes/interfaces inherited from class org.sonatype.gshell.util.setter.SetterSupport
SetterSupport.Messages
 
Field Summary
 
Fields inherited from class org.sonatype.gshell.util.setter.FieldSetter
field
 
Fields inherited from class org.sonatype.gshell.util.setter.SetterSupport
log
 
Constructor Summary
CollectionFieldSetter(Object bean, Field field)
           
 
Method Summary
protected  void doSet(Object value)
           
 Class getType()
           
 boolean isMultiValued()
          Whether this setter is intrinsically multi-valued.
 
Methods inherited from class org.sonatype.gshell.util.setter.FieldSetter
getName
 
Methods inherited from class org.sonatype.gshell.util.setter.SetterSupport
getAccessible, getBean, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionFieldSetter

public CollectionFieldSetter(Object bean,
                             Field field)
Method Detail

isMultiValued

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

Specified by:
isMultiValued in interface Setter
Overrides:
isMultiValued in class FieldSetter

getType

public Class getType()
Specified by:
getType in interface Setter
Overrides:
getType in class FieldSetter

doSet

protected void doSet(Object value)
              throws IllegalAccessException
Overrides:
doSet in class FieldSetter
Throws:
IllegalAccessException


Copyright © 2008-2011 Sonatype. All Rights Reserved.