org.codehaus.mojo.pomtools.wrapper
Class StringValueWrapper
java.lang.Object
org.codehaus.mojo.pomtools.wrapper.modify.AbstractModifiableObject
org.codehaus.mojo.pomtools.wrapper.ObjectWrapper
org.codehaus.mojo.pomtools.wrapper.StringValueWrapper
- All Implemented Interfaces:
- Modifiable
public class StringValueWrapper
- extends ObjectWrapper
- Version:
- $Id: StringValueWrapper.java 2166 2006-07-18 21:32:16Z carlos $
- Author:
- David Hawkins
Methods inherited from class org.codehaus.mojo.pomtools.wrapper.ObjectWrapper |
createDefaultInstance, getFields, getFieldValue, getFieldValue, getFieldValue, getFullName, getInternalWrappedObject, getName, getParent, getValueLabel, isFieldModified, isSameAsDefault, setFieldValue, setFieldValue, setModified, setModified |
StringValueWrapper
public StringValueWrapper(ObjectWrapper parent,
Object value,
String name,
Class implClass)
getWrappedObject
public Object getWrappedObject()
- Description copied from class:
ObjectWrapper
- Returns the original wrapped object with all modifications applied to it.
Note that this method will return null if the object is the same as the default constructor
for the object.
- Overrides:
getWrappedObject
in class ObjectWrapper
- Returns:
- the wrapped object or null is the object isEmpty()
isEmpty
public boolean isEmpty()
- Description copied from class:
ObjectWrapper
- Iterates through each
BeanField
and determines if the value is empty.
If the value is an instance of ObjectWrapper
, the isEmpty()
method is called on that object.
If the value is a String
, the StringUtils.isNotEmpty(java.lang.String)
method is used.
The object is considered to be NOT empty if any field (other than String or ObjectWrapper) is non null.
- Overrides:
isEmpty
in class ObjectWrapper
toString
public String toString()
- Overrides:
toString
in class ObjectWrapper
getStringValue
public String getStringValue()
Copyright © 2011 The Codehaus. All Rights Reserved.