Moved interp tag to private class (small and only used one place). Added final to fields in ProjectUri. Since this is only used by DefaultInterpolator, don't care if values are inlined during compile

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769945 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-04-29 21:30:16 +00:00
parent c0306a2ef4
commit 612db0a8af
4 changed files with 613 additions and 644 deletions

View File

@ -790,4 +790,10 @@ public class DefaultInterpolator
}
}
private static enum PomInterpolatorTag
{
PROJECT_PROPERTIES,
EXECUTION_PROPERTIES
}
}

View File

@ -99,20 +99,6 @@ final class InterpolatorProperty
{
this.tag = tag;
}
public static List<InterpolatorProperty> toInterpolatorProperties( Map<String, String> properties, String tag )
{
if( properties == null )
{
throw new IllegalArgumentException( "properties: null" );
}
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
for ( Map.Entry<String, String> e : properties.entrySet() )
{
interpolatorProperties.add( new InterpolatorProperty( "${" + e.getKey() +"}", e.getValue(), tag) );
}
return interpolatorProperties;
}
/**
* Returns true if key values match, otherwise returns false.
@ -156,20 +142,5 @@ final class InterpolatorProperty
return "Key = " + key + ", Value = " + value + ", Hash = " +
this.hashCode();
}
public static List<InterpolatorProperty> toInterpolatorProperties( Properties properties, String tag )
{
if( properties == null )
{
throw new IllegalArgumentException( "properties: null" );
}
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
for ( Map.Entry<Object, Object> e : properties.entrySet() )
{
interpolatorProperties.add( new InterpolatorProperty( "${" + e.getKey() +"}", (String) e.getValue(), tag) );
}
return interpolatorProperties;
}
}

View File

@ -1,8 +0,0 @@
package org.apache.maven.model.interpolator;
enum PomInterpolatorTag
{
PROJECT_PROPERTIES,
EXECUTION_PROPERTIES
}