Browse Source

Made attribute private

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270735 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
04a62a443e
2 changed files with 12 additions and 26 deletions
  1. +6
    -13
      proposal/myrmidon/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java
  2. +6
    -13
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/EnumeratedAttribute.java

+ 6
- 13
proposal/myrmidon/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java View File

@@ -19,11 +19,7 @@ import org.apache.myrmidon.api.TaskException;
*/
public abstract class EnumeratedAttribute
{
protected String value;

public EnumeratedAttribute()
{
}
private String m_value;

/**
* Invoked by {@link org.apache.tools.ant.IntrospectionHelper
@@ -32,14 +28,14 @@ public abstract class EnumeratedAttribute
* @param value The new Value value
* @exception TaskException Description of Exception
*/
public final void setValue( String value )
public final void setValue( final String value )
throws TaskException
{
if( !containsValue( value ) )
{
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()
{
return value;
return m_value;
}

/**
@@ -61,13 +57,10 @@ public abstract class EnumeratedAttribute

/**
* 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 )
{
return false;


+ 6
- 13
proposal/myrmidon/src/todo/org/apache/tools/ant/types/EnumeratedAttribute.java View File

@@ -19,11 +19,7 @@ import org.apache.myrmidon.api.TaskException;
*/
public abstract class EnumeratedAttribute
{
protected String value;

public EnumeratedAttribute()
{
}
private String m_value;

/**
* Invoked by {@link org.apache.tools.ant.IntrospectionHelper
@@ -32,14 +28,14 @@ public abstract class EnumeratedAttribute
* @param value The new Value value
* @exception TaskException Description of Exception
*/
public final void setValue( String value )
public final void setValue( final String value )
throws TaskException
{
if( !containsValue( value ) )
{
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()
{
return value;
return m_value;
}

/**
@@ -61,13 +57,10 @@ public abstract class EnumeratedAttribute

/**
* 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 )
{
return false;


Loading…
Cancel
Save