Skip to Content.
Sympa Menu

notify-dpml - r1030 - trunk/main/metro/tools/src/main/net/dpml/metro/tools

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1030 - trunk/main/metro/tools/src/main/net/dpml/metro/tools
  • Date: Sun, 5 Feb 2006 08:57:22 +0100

Author: mcconnell
Date: 2006-02-05 08:56:37 +0100 (Sun, 05 Feb 2006)
New Revision: 1030

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ArrayDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueBuilder.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
Log:
resolve issue with default class assignment on values within an array

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ArrayDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/ArrayDataType.java
2006-02-04 20:20:00 UTC (rev 1029)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/ArrayDataType.java
2006-02-05 07:56:37 UTC (rev 1030)
@@ -59,25 +59,24 @@
* Create, assign and return a new nested entry constructor parameter.
* @return the new context entry param
*/
- public ValueDataType createValue()
+ public void addConfiguredValue( ValueDataType param )
{
- final ValueDataType param = new ValueDataType();
+ System.out.println( "ADD CONFIGURED VALUE: " + param );
+ param.setClass( m_classname );
m_params.add( param );
- return param;
}
-
+
/**
- * Create, assign and return a new nested array.
- * @return the new array parameter
+ * Create, assign and return a new nested entry constructor parameter.
+ * @return the new context entry param
*/
- public ArrayDataType createArray()
+ public void addConfiguredArray( ArrayDataType param )
{
- System.out.println( "CREATE ARRAY" );
- final ArrayDataType param = new ArrayDataType();
+ System.out.println( "ADD CONFIGURED ARRAY: " + param );
+ param.setClass( m_classname );
m_params.add( param );
- return param;
}
-
+
/**
* Return the set of nested param directives.
* @return the params
@@ -89,31 +88,19 @@

/**
* Build a value datastructure.
- * @param classname the default classname
* @return the serializable value descriptor
*/
- public Value buildValue( String classname )
+ public Value buildValue()
{
- String name = getClassname( classname );
+ String classname = getClassname();
ValueBuilder[] params = getValueBuilders();
Value[] values = new Value[ params.length ];
for( int i=0; i<values.length; i++ )
{
ValueBuilder p = params[i];
- values[i] = p.buildValue( name );
+ values[i] = p.buildValue();
}
- return new Array( name, values );
+ return new Array( classname, values );
}

- String getClassname( String fallback )
- {
- if( null == m_classname )
- {
- return fallback;
- }
- else
- {
- return m_classname;
- }
- }
}

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
2006-02-04 20:20:00 UTC (rev 1029)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
2006-02-05 07:56:37 UTC (rev 1030)
@@ -268,7 +268,7 @@
for( int i=0; i<params.length; i++ )
{
ValueBuilder p = params[i];
- values[i] = p.buildValue( classname );
+ values[i] = p.buildValue();
}
return new ValueDirective( classname, method, values );
}

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueBuilder.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueBuilder.java
2006-02-04 20:20:00 UTC (rev 1029)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueBuilder.java
2006-02-05 07:56:37 UTC (rev 1030)
@@ -31,9 +31,8 @@
{
/**
* Build a value datastructure.
- * @param classname the default classname
* @return the serializable value descriptor
*/
- Value buildValue( String classname );
+ Value buildValue();

}

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
2006-02-04 20:20:00 UTC (rev 1029)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
2006-02-05 07:56:37 UTC (rev 1030)
@@ -126,12 +126,11 @@

/**
* Build a value datastructure.
- * @param name the default classname
* @return the serializable value descriptor
*/
- public Value buildValue( String name )
+ public Value buildValue()
{
- String classname = getClassname( name );
+ String classname = getClassname();
String method = getMethodName();
String value = getValue();
if( null != value )
@@ -145,21 +144,9 @@
for( int i=0; i<values.length; i++ )
{
ValueBuilder p = params[i];
- values[i] = p.buildValue( classname );
+ values[i] = p.buildValue();
}
return new ValueDirective( classname, method, values );
}
}
-
- String getClassname( String fallback )
- {
- if( null == m_classname )
- {
- return fallback;
- }
- else
- {
- return m_classname;
- }
- }
}




  • r1030 - trunk/main/metro/tools/src/main/net/dpml/metro/tools, mcconnell at BerliOS, 02/05/2006

Archive powered by MHonArc 2.6.24.

Top of Page