git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270735 13f79535-47bb-0310-9956-ffa450edef68remotes/1776816827838153613/tmp_25f451bd36ab3145e487fcb2cd5c62c571e5b602
| @@ -19,11 +19,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| */ | */ | ||||
| public abstract class EnumeratedAttribute | public abstract class EnumeratedAttribute | ||||
| { | { | ||||
| protected String value; | |||||
| public EnumeratedAttribute() | |||||
| { | |||||
| } | |||||
| private String m_value; | |||||
| /** | /** | ||||
| * Invoked by {@link org.apache.tools.ant.IntrospectionHelper | * Invoked by {@link org.apache.tools.ant.IntrospectionHelper | ||||
| @@ -32,14 +28,14 @@ public abstract class EnumeratedAttribute | |||||
| * @param value The new Value value | * @param value The new Value value | ||||
| * @exception TaskException Description of Exception | * @exception TaskException Description of Exception | ||||
| */ | */ | ||||
| public final void setValue( String value ) | |||||
| public final void setValue( final String value ) | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( !containsValue( value ) ) | if( !containsValue( value ) ) | ||||
| { | { | ||||
| throw new TaskException( value + " is not a legal value for this attribute" ); | throw new TaskException( value + " is not a legal value for this attribute" ); | ||||
| } | } | ||||
| this.value = value; | |||||
| this.m_value = value; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -49,7 +45,7 @@ public abstract class EnumeratedAttribute | |||||
| */ | */ | ||||
| public final String getValue() | public final String getValue() | ||||
| { | { | ||||
| return value; | |||||
| return m_value; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -61,13 +57,10 @@ public abstract class EnumeratedAttribute | |||||
| /** | /** | ||||
| * Is this value included in the enumeration? | * Is this value included in the enumeration? | ||||
| * | |||||
| * @param value Description of Parameter | |||||
| * @return Description of the Returned Value | |||||
| */ | */ | ||||
| public final boolean containsValue( String value ) | |||||
| public final boolean containsValue( final String value ) | |||||
| { | { | ||||
| String[] values = getValues(); | |||||
| final String[] values = getValues(); | |||||
| if( values == null || value == null ) | if( values == null || value == null ) | ||||
| { | { | ||||
| return false; | return false; | ||||
| @@ -19,11 +19,7 @@ import org.apache.myrmidon.api.TaskException; | |||||
| */ | */ | ||||
| public abstract class EnumeratedAttribute | public abstract class EnumeratedAttribute | ||||
| { | { | ||||
| protected String value; | |||||
| public EnumeratedAttribute() | |||||
| { | |||||
| } | |||||
| private String m_value; | |||||
| /** | /** | ||||
| * Invoked by {@link org.apache.tools.ant.IntrospectionHelper | * Invoked by {@link org.apache.tools.ant.IntrospectionHelper | ||||
| @@ -32,14 +28,14 @@ public abstract class EnumeratedAttribute | |||||
| * @param value The new Value value | * @param value The new Value value | ||||
| * @exception TaskException Description of Exception | * @exception TaskException Description of Exception | ||||
| */ | */ | ||||
| public final void setValue( String value ) | |||||
| public final void setValue( final String value ) | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( !containsValue( value ) ) | if( !containsValue( value ) ) | ||||
| { | { | ||||
| throw new TaskException( value + " is not a legal value for this attribute" ); | throw new TaskException( value + " is not a legal value for this attribute" ); | ||||
| } | } | ||||
| this.value = value; | |||||
| this.m_value = value; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -49,7 +45,7 @@ public abstract class EnumeratedAttribute | |||||
| */ | */ | ||||
| public final String getValue() | public final String getValue() | ||||
| { | { | ||||
| return value; | |||||
| return m_value; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -61,13 +57,10 @@ public abstract class EnumeratedAttribute | |||||
| /** | /** | ||||
| * Is this value included in the enumeration? | * Is this value included in the enumeration? | ||||
| * | |||||
| * @param value Description of Parameter | |||||
| * @return Description of the Returned Value | |||||
| */ | */ | ||||
| public final boolean containsValue( String value ) | |||||
| public final boolean containsValue( final String value ) | |||||
| { | { | ||||
| String[] values = getValues(); | |||||
| final String[] values = getValues(); | |||||
| if( values == null || value == null ) | if( values == null || value == null ) | ||||
| { | { | ||||
| return false; | return false; | ||||