You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2006/03/20 17:31:33 UTC

svn commit: r387239 [2/21] - in /incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math: ./ Harmony/ doc/ doc/images/ make/ src/ src/common/ src/common/javasrc/ src/common/javasrc/java/ src/common/javasrc/java/applet/ src/common/javasrc/jav...

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-beans.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-beans.xml?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-beans.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-beans.xml Mon Mar 20 08:31:09 2006
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Author:  Alexei Y. Zakharov
+Version: $Revision: 1.1.2.8 $
+-->
+<!--
+    Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="beans" basedir=".">
+
+    <!-- List of sources -->
+    <patternset id="src.list.beans">
+        <include name="java/beans/**/*.java"/>
+        <include name="org/apache/harmony/beans/**/*.java"/>
+        <include name="java/awt/**/*.java"/>
+        <include name="java/applet/**/*.java"/>
+    </patternset>
+    <!-- List of class files -->
+    <patternset id="classes.list.beans">
+        <include name="java/beans/**/*.class"/>
+        <include name="org/apache/harmony/beans/**/*.class"/>
+        <include name="java/awt/**/*.class"/>
+        <include name="java/applet/**/*.class"/>
+    </patternset>
+    
+    <!-- List of test sources -->
+    <patternset id="tst.src.list.beans">
+        <include name="java/beans/**/*.java"/>
+        <!--exclude name="java/beans/beancontext/BeanContextSupportTest.java"/-->
+    </patternset>
+    <patternset id="tst.classes.list.beans">
+        <include name="java/beans/**/*.class"/>
+    </patternset>
+
+    <!-- JAR files names -->
+    <property name="jar.name.beans" value="beans.jar"/>
+    <property name="tst.jar.name.beans" value="beans-tests.jar"/>
+
+
+    <!-- targets specific to BEANS module -->
+
+    <target name="compile.beans">
+        <antcall target="compile.common">
+            <reference refid="src.list.beans" torefid="src.list"/>
+        </antcall>
+    </target>
+    <target name="tst.compile.beans" depends="compile.beans">
+        <antcall target="tst.compile.common">
+            <reference refid="tst.src.list.beans" torefid="tst.src.list"/>
+        </antcall>
+        <copy todir="${tst.classes.dir}/java/beans/xml">
+            <fileset dir="${tst.src.dir}/java/beans/xml">
+                <include name="*.xml"/>
+            </fileset>
+        </copy>
+        <copy todir="${tst.classes.dir}/java/beans/auxiliary">
+            <fileset dir="${tst.src.dir}/java/beans/auxiliary">
+                <include name="*.ser"/>
+            </fileset>
+        </copy>
+        <copy todir="${tst.classes.dir}/java/beans/gif">
+            <fileset dir="${tst.src.dir}/java/beans/gif">
+                <include name="*.gif"/>
+            </fileset>
+        </copy>
+    </target>
+    <target name="jar.beans" depends="compile.beans">
+        <antcall target="jar.common">
+            <param name="jar.name" value="${jar.name.beans}"/>
+            <reference refid="classes.list.beans" torefid="classes.list"/>
+        </antcall>
+    </target>
+    <target name="tst.jar.beans" depends="tst.compile.beans">
+        <antcall target="tst.jar.common">
+            <param name="tst.jar.name" value="${tst.jar.name.beans}"/>
+            <reference refid="tst.classes.list.beans"
+                       torefid="tst.classes.list"/>
+        </antcall>
+    </target>
+
+    <target name="test.beans" description="run all java beans tests"
+            depends="jar.beans, tst.compile.beans">
+        <mkdir dir="${tst.reports.dir}"/>
+        <path id="bootclasspath.beans">
+            <pathelement location="${jar.dir}/${jar.name.beans}"/>
+            <pathelement location="${tst.classes.dir}"/>
+            <pathelement location="${junit.path}"/>
+            <pathelement location="${xerces.path}"/>
+            <pathelement location="${xml_apis.path}"/>
+        </path>
+        <pathconvert targetos="${os.family}" refId="bootclasspath.beans"
+                 property="bootclasspath.beans.str" setOnEmpty="true"/>
+        <junit printsummary="true" haltonfailure="no" fork="yes"
+               forkmode="once">
+          <jvmarg value="-Xbootclasspath/p:${bootclasspath.beans.str}"/>
+          <jvmarg value="-Xmx16m"/>
+          <formatter type="plain" usefile="true"/>
+
+          <batchtest todir="${tst.reports.dir}">
+              <fileset dir="${tst.classes.dir}" includes="java/beans/**/*Test.class"/>
+          </batchtest>
+        </junit>
+    </target>
+
+</project>
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-math.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-math.xml?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-math.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-math.xml Mon Mar 20 08:31:09 2006
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Author:  Alexei Y. Zakharov
+Version: $Revision: 1.1.2.5 $
+-->
+<!--
+    Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="math" basedir=".">
+
+    <!-- List of sources -->
+    <patternset id="src.list.math">
+        <include name="java/math/**/*.java"/>
+    </patternset>
+    <!-- List of class files -->
+    <patternset id="classes.list.math">
+        <include name="java/math/**/*.class"/>
+    </patternset>
+
+    <!-- List of test sources -->
+    <patternset id="tst.src.list.math">
+        <include name="java/math/**/*.java"/>
+    </patternset>
+    <!-- List of test class files -->
+    <patternset id="tst.classes.list.math">
+        <include name="java/math/**/*.class"/>
+    </patternset>
+    
+    <!-- JAR files names -->
+    <property name="jar.name.math" value="math.jar"/>
+    <property name="tst.jar.name.math" value="math-tests.jar"/>
+
+    <!-- targets specific to MATH module -->
+
+    <target name="compile.math">
+        <antcall target="compile.common">
+            <reference refid="src.list.math" torefid="src.list"/>
+        </antcall>
+    </target>
+    <target name="tst.compile.math" depends="compile.math">
+        <antcall target="tst.compile.common">
+            <reference refid="tst.src.list.math" torefid="tst.src.list"/>
+        </antcall>
+    </target>
+    <target name="jar.math" depends="compile.math">
+        <antcall target="jar.common">
+            <param name="jar.name" value="${jar.name.math}"/>
+            <reference refid="classes.list.math" torefid="classes.list"/>
+        </antcall>
+    </target>
+    <target name="tst.jar.math" depends="tst.compile.math">
+        <antcall target="tst.jar.common">
+            <param name="tst.jar.name" value="${tst.jar.name.math}"/>
+            <reference refid="tst.classes.list.math"
+                       torefid="tst.classes.list"/>
+        </antcall>
+    </target>
+    
+    <target name="test.math" description="run all java.math tests"
+            depends="jar.math, tst.compile.math">
+        <mkdir dir="${tst.reports.dir}"/>
+        <path id="bootclasspath.math">
+            <pathelement location="${jar.dir}/${jar.name.math}"/>
+            <pathelement location="${tst.classes.dir}"/>
+            <pathelement location="${junit.path}"/>
+        </path>
+        <pathconvert targetos="${os.family}" refId="bootclasspath.math"
+                 property="bootclasspath.math.str" setOnEmpty="true"/>
+        <junit printsummary="true" haltonfailure="no" fork="yes"
+               forkmode="once">
+          <jvmarg value="-Xbootclasspath/p:${bootclasspath.math.str}"/>
+          <formatter type="plain" usefile="true"/>
+
+          <batchtest todir="${tst.reports.dir}">
+              <fileset dir="${tst.classes.dir}" includes="java/math/**/*Test.class"/>
+          </batchtest>
+        </junit>
+    </target>
+
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-regex.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-regex.xml?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-regex.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build-regex.xml Mon Mar 20 08:31:09 2006
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Author:  Alexei Y. Zakharov
+Version: $Revision: 1.1.2.5 $
+-->
+<!--
+    Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="regex" basedir=".">
+
+    <!-- List of sources -->
+    <patternset id="src.list.regex">
+        <include name="java/util/regex/**/*.java"/>
+    </patternset>
+    <!-- List of class files -->
+    <patternset id="classes.list.regex">
+        <include name="java/util/regex/**/*.class"/>
+    </patternset>
+
+    <!-- List of test sources -->
+    <patternset id="tst.src.list.regex">
+        <include name="java/util/regex/**/*.java"/>
+    </patternset>
+    <!-- List of test class files -->
+    <patternset id="tst.classes.list.regex">
+        <include name="java/util/regex/**/*.class"/>
+    </patternset>
+
+    <!-- JAR files names -->
+    <property name="jar.name.regex" value="regex.jar"/>
+    <property name="tst.jar.name.regex" value="regex-tests.jar"/>
+
+    <!-- targets specific to REGEX module -->
+
+    <target name="compile.regex">
+        <antcall target="compile.common">
+            <reference refid="src.list.regex" torefid="src.list"/>
+        </antcall>
+    </target>
+    <target name="tst.compile.regex" depends="compile.regex">
+        <antcall target="tst.compile.common">
+            <reference refid="tst.src.list.regex" torefid="tst.src.list"/>
+        </antcall>
+    </target>
+    <target name="jar.regex" depends="compile.regex">
+        <antcall target="jar.common">
+            <param name="jar.name" value="${jar.name.regex}"/>
+            <reference refid="classes.list.regex" torefid="classes.list"/>
+        </antcall>
+    </target>
+    <target name="tst.jar.regex" depends="tst.compile.regex">
+        <antcall target="tst.jar.common">
+            <param name="tst.jar.name" value="${tst.jar.name.regex}"/>
+            <reference refid="tst.classes.list.regex"
+                       torefid="tst.classes.list"/>
+        </antcall>
+    </target>
+    
+    <target name="test.regex" description="run all java.util.regex tests"
+            depends="jar.regex, tst.compile.regex">
+        <mkdir dir="${tst.reports.dir}"/>
+        <path id="bootclasspath.regex">
+            <pathelement location="${jar.dir}/${jar.name.regex}"/>
+            <pathelement location="${tst.classes.dir}"/>
+            <pathelement location="${junit.path}"/>
+        </path>
+        <pathconvert targetos="${os.family}" refId="bootclasspath.regex"
+                 property="bootclasspath.regex.str" setOnEmpty="true"/>
+        <junit printsummary="true" haltonfailure="no" fork="yes"
+               forkmode="once">
+          <jvmarg value="-Xbootclasspath/p:${bootclasspath.regex.str}"/>
+          <formatter type="plain" usefile="true"/>
+
+          <batchtest todir="${tst.reports.dir}">
+              <fileset dir="${tst.classes.dir}"
+                       includes="java/util/regex/**/*Test.class"/>
+          </batchtest>
+        </junit>
+    </target>
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build.xml?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/build.xml Mon Mar 20 08:31:09 2006
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Author:  Alexei Y. Zakharov
+Version: $Revision: 1.122.2.10 $
+-->
+<!--
+    Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="classes" basedir="." default="jar">
+
+    <!-- determines the OS -->
+    <condition property="platform.name" value="win32">
+        <os family="Windows"/>
+    </condition>
+    <condition property="platform.name" value="linux">
+        <and>
+            <os name="linux"/>
+            <os family="unix"/>
+        </and>
+    </condition>
+
+    <!-- Needed by pathConvert tag -->
+    <condition property="os.family" value="windows">
+        <os family="Windows"/>
+    </condition>
+    <condition property="os.family" value="unix">
+        <os family="unix"/>
+    </condition>
+
+    <property environment="env"/>
+    <property file="external_tools.properties"/>
+
+    <!-- common properties -->
+    <property name="src.dir" value="../src/common/javasrc"/>
+
+    <!-- root dir for all build files -->
+    <property name="build.path" value="../build"/>
+
+    <!-- build compiler -->
+    <!--
+         In order to use Eclipse compiler you will need to add
+         the compiler's jars to the CLASSPATH and path to jni.h
+         to INCLUDE environment variables before build start.
+         For example:
+
+         set CLASSPATH=%ECLIPSE_HOME%/plugins/org.eclipse.jdt.core_3.0.1/jdtCompilerAdapter.jar; \
+                 %ECLIPSE_HOME%/plugins/org.eclipse.jdt.core_3.0.1/jdtcore.jar;%CLASSPATH%
+
+         set INCLUDE=%MY_JVM%/include
+     -->
+    <!--property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/-->
+    <property name="build.compiler" value="modern"/>
+
+    <property name="classes.dir" value="${build.path}/classes"/>
+    <property name="jar.dir" value="${build.path}/deploy/jre/lib/boot"/>
+    <property name="jar.name" value="classes.jar"/>
+    <path id="compile.classpath">
+        <pathelement path="${classes.dir}"/>
+    </path>
+
+    <property name="tst.src.dir" value="../test/common/unit"/>
+    <property name="tst.classes.dir" value="${build.path}/tests"/>
+    <property name="tst.jar.dir" value="${build.path}/jars"/>
+    <property name="tst.reports.dir" value="${build.path}/test-reports"/>
+    <path id="tst.classpath">
+        <!--pathelement location="${xerces.path}"/-->
+        <pathelement path="${classes.dir}"/>
+        <pathelement path="${tst.classes.dir}"/>
+        <pathelement location="${junit.path}"/>
+    </path>
+
+    <import file="build-beans.xml"/>
+    <import file="build-regex.xml"/>
+    <import file="build-math.xml"/>
+
+    <patternset id="src.list">
+        <patternset refid="src.list.beans"/>
+        <patternset refid="src.list.regex"/>
+        <patternset refid="src.list.math"/>
+    </patternset>
+
+    <patternset id="tst.src.list">
+        <patternset refid="tst.src.list.beans"/>
+        <patternset refid="tst.src.list.regex"/>
+        <patternset refid="tst.src.list.math"/>
+    </patternset>
+
+    <target name="taglet1" description="Build taglet1">
+        <mkdir dir="${classes.dir}"/>
+        <mkdir dir="${jar.dir}"/>
+        <javac srcdir="${taglet1.src}"
+               sourcepath=""
+               destdir="${classes.dir}"
+               source="1.4"
+               deprecation="on"
+               classpathref="compile.classpath"
+               debug="off">
+        </javac>
+
+        <jar destfile="${taglet1.jar}">
+             <fileset dir="${classes.dir}">
+                <patternset>
+                    <include name="com/intel/drl/tools/*"/>
+                </patternset>
+             </fileset>
+        </jar>
+    </target>
+
+
+    <!-- common targets -->
+
+    <target name="compile.common" description="Compile sources">
+        <mkdir dir="${classes.dir}"/>
+        <javac srcdir="${src.dir}"
+               sourcepath=""
+               destdir="${classes.dir}"
+               source="1.4"
+               deprecation="on"
+               classpathref="compile.classpath"
+               debug="on">
+               <patternset refid="src.list"/>
+        </javac>
+    </target>
+
+    <target name="tst.compile.common" description="Compile tests">
+        <mkdir dir="${tst.classes.dir}"/>
+        <javac srcdir="${tst.src.dir}"
+               sourcepath=""
+               destdir="${tst.classes.dir}"
+               source="1.4"
+               deprecation="on"
+               bootclasspath="${classes.dir};${env.JAVA_HOME}/jre/lib/rt.jar"
+               classpathref="tst.classpath"
+               debug="on">
+               <patternset refid="tst.src.list"/>
+
+        </javac>
+    </target>
+
+    <target name="jar.common" description="Build JAR archive">
+        <mkdir dir="${jar.dir}"/>
+        <jar destfile="${jar.dir}/${jar.name}">
+             <fileset dir="${classes.dir}">
+                <patternset refid="classes.list"/>
+             </fileset>
+        </jar>
+    </target>
+
+    <target name="tst.jar.common" description="Build JAR with tests">
+        <mkdir dir="${tst.jar.dir}"/>
+        <jar destfile="${tst.jar.dir}/${tst.jar.name}">
+             <fileset dir="${tst.classes.dir}">
+                <patternset refid="tst.classes.list"/>
+             </fileset>
+        </jar>
+    </target>
+
+
+    <!-- global targets -->
+
+    <target name="clean" description="Delete all generated files">
+        <delete dir="${classes.dir}" failonerror="false"/>
+        <delete dir="${jar.dir}" failonerror="false"/>
+        <delete dir="${build.path}/lib" failonerror="false"/>
+        <delete dir="${tst.classes.dir}" failonerror="false"/>
+        <delete dir="${tst.jar.dir}" failonerror="false"/>
+        <delete dir="${tst.reports.dir}" failonerror="false"/>
+        <delete file="${taglet1.jar}" failonerror="false"/>
+        <delete failonerror="false">
+            <fileset dir="${build.path}" includes="TEST*.*"/>
+        </delete>
+    </target>
+
+    <target name="compile" description="Compile sources">
+        <antcall target="compile.beans"/>
+        <antcall target="compile.regex"/>
+        <antcall target="compile.math"/>
+    </target>
+
+    <target name="tst.compile" description="Compile tests">
+        <antcall target="tst.compile.beans"/>
+        <antcall target="tst.compile.regex"/>
+        <antcall target="tst.compile.math"/>
+    </target>
+
+    <target name="jar" description="Build JAR archive">
+        <antcall target="jar.beans"/>
+        <antcall target="jar.math"/>
+        <antcall target="jar.regex"/>
+    </target>
+
+    <target name="tst.jar" description="Build JAR with tests">
+        <antcall target="tst.jar.beans"/>
+        <antcall target="tst.jar.math"/>
+        <antcall target="tst.jar.regex"/>
+    </target>
+
+    <target name="tests.run" description="run all tests">
+        <antcall target="test.beans"/>
+        <antcall target="test.regex"/>
+        <antcall target="test.math"/>
+    </target>
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/external_tools.properties
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/external_tools.properties?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/external_tools.properties (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/make/external_tools.properties Mon Mar 20 08:31:09 2006
@@ -0,0 +1,3 @@
+xerces.path=path/to/xercesImpl.jar
+xml_apis.path=path/to/xml-apis.jar
+junit.path=path/to/junit.jar

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/applet/Applet.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/applet/Applet.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/applet/Applet.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/applet/Applet.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,33 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.13.4.2 $
+ */
+package java.applet;
+
+/**
+ * This is an empty stub containing only empty methods for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.13.4.2 $
+ */
+public class Applet {
+
+    public void init() {
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Color.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Color.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Color.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Color.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,42 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.14.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub containing only empty methods for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.14.2.2 $
+ */
+public class Color {
+
+    public int getBlue() {
+        return 0;
+    }
+
+    public int getGreen() {
+        return 0;
+    }
+
+    public int getRed() {
+        return 0;
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Component.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Component.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Component.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Component.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,30 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.182.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.182.2.2 $
+ */
+public abstract class Component {
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Container.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Container.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Container.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Container.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,30 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.85.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.85.2.2 $
+ */
+public class Container extends Component {
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Font.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Font.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Font.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Font.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,42 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.22.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub containing only empty methods for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.22.2.2 $
+ */
+public class Font {
+
+    public int getSize() {
+        return 0;
+    }
+
+    public int getStyle() {
+        return 0;
+    }
+
+    public String getName() {
+        return null;
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Graphics.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Graphics.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Graphics.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Graphics.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,43 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision$
+ */
+package java.awt;
+
+/**
+ * This is an empty stub containing only empty methods for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision$
+ */
+public abstract class Graphics {
+
+    protected Graphics() {
+    }
+
+    public void drawBytes(byte[] a0, int a1, int a2, int a3, int a4) {
+    }
+
+    public void drawRect(int a0, int a1, int a2, int a3) {
+    }
+
+    public abstract void setFont(Font a0);
+
+    public abstract void setColor(Color a0);
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Image.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Image.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Image.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Image.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,30 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.5.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.5.2.2 $
+ */
+public abstract class Image {
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Rectangle.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Rectangle.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Rectangle.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Rectangle.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,38 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.11.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub containing only fields for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.11.2.2 $
+ */
+public class Rectangle {
+
+    public int x;
+
+    public int y;
+
+    public int width;
+
+    public int height;
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Toolkit.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Toolkit.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Toolkit.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/Toolkit.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,38 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.137.2.2 $
+ */
+package java.awt;
+
+/**
+ * This is an empty stub containing only empty methods for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.137.2.2 $
+ */
+public abstract class Toolkit {
+
+    public Image createImage(byte[] a0) {
+        return null;
+    }
+
+    public static synchronized Toolkit getDefaultToolkit() {
+        return null;
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionEvent.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionEvent.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionEvent.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionEvent.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,37 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.7.6.2 $
+ */
+package java.awt.event;
+
+/**
+ * This is an empty stub containing only empty methods for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.7.6.2 $
+ */
+public class ActionEvent {
+
+    public ActionEvent(Object a0, int a1, String a2) {
+    }
+    
+    public Object getSource() {
+        return null;
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionListener.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionListener.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionListener.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/awt/event/ActionListener.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,34 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.6.6.2 $
+ */
+package java.awt.event;
+
+import java.util.EventListener;
+
+/**
+ * This is an empty stub for compilation purposes.
+ * 
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.6.6.2 $
+ */
+public interface ActionListener extends EventListener {
+
+    public void actionPerformed(ActionEvent a0);
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/AppletInitializer.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/AppletInitializer.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/AppletInitializer.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/AppletInitializer.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,42 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.3.6.3 $
+ */
+package java.beans;
+
+import java.applet.Applet;
+import java.beans.beancontext.BeanContext;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.3.6.3 $
+ */
+
+public interface AppletInitializer {
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void initialize(Applet newAppletBean, BeanContext bCtxt);
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void activate(Applet newApplet);
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanDescriptor.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanDescriptor.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanDescriptor.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanDescriptor.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,79 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.4.6.3 $
+ */
+package java.beans;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.4.6.3 $
+ */
+
+public class BeanDescriptor extends FeatureDescriptor {
+	
+    private Class beanClass = null;
+    private Class customizerClass = null;
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public BeanDescriptor(Class beanClass, Class customizerClass) {
+        super();
+        setName(getShortClassName(beanClass));
+        this.beanClass = beanClass;
+        this.customizerClass = customizerClass;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public BeanDescriptor(Class beanClass) {
+        super();
+        setName(getShortClassName(beanClass));
+        this.beanClass = beanClass;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public Class getCustomizerClass() {
+        return customizerClass;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public Class getBeanClass() {
+        return beanClass;
+    }
+    
+    private String getShortClassName(Class beanClass) {
+        String result = null;
+        
+        if(beanClass != null) {
+            String beanClassName = beanClass.getName();
+            int idx = beanClassName.lastIndexOf(".");
+            result = (idx == -1) ? beanClassName : beanClassName.substring(idx
+                    + 1);
+        }
+        
+        return result;
+    }
+
+}
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanInfo.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanInfo.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanInfo.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/BeanInfo.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,79 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.2.6.3 $
+ */
+package java.beans;
+
+import java.awt.Image;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.2.6.3 $
+ */
+
+public interface BeanInfo {
+
+    public static final int ICON_COLOR_16x16 = 1;
+
+    public static final int ICON_COLOR_32x32 = 2;
+
+    public static final int ICON_MONO_16x16 = 3;
+
+    public static final int ICON_MONO_32x32 = 4;
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public PropertyDescriptor[] getPropertyDescriptors();
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public MethodDescriptor[] getMethodDescriptors();
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public EventSetDescriptor[] getEventSetDescriptors();
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public BeanInfo[] getAdditionalBeanInfo();
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public BeanDescriptor getBeanDescriptor();
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public Image getIcon(int iconKind);
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public int getDefaultPropertyIndex();
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public int getDefaultEventIndex();
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Beans.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Beans.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Beans.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Beans.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,260 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.6.6.3 $
+ */
+package java.beans;
+
+import java.applet.Applet;
+import java.beans.beancontext.BeanContext;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamClass;
+import java.lang.reflect.Array;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.6.6.3 $
+ */
+
+public class Beans {
+	
+	private static boolean designTime = false;
+	private static boolean guiAvailable = false;
+
+    /**
+     */
+    public Beans() {
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static Object instantiate(ClassLoader cls,
+                                     String beanName,
+                                     BeanContext beanContext,
+                                     AppletInitializer initializer)
+    	throws IOException, ClassNotFoundException
+    {
+        Object result = instantiate(cls, beanName, beanContext);
+        
+        if(result instanceof Applet) {
+            initializer.initialize((Applet) result, beanContext);
+        }
+        
+        return result;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static Object instantiate(ClassLoader cls,
+                                     String beanName,
+                                     BeanContext beanContext)
+        throws IOException, ClassNotFoundException
+    {
+        Object result = instantiate(cls, beanName);
+        
+        if(beanContext != null) {
+            beanContext.add(result);
+        }
+        
+        return result;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static Object instantiate(ClassLoader cls, String beanName)
+        throws IOException, ClassNotFoundException
+    {
+        Object result = null;
+
+        String beanResourceName = getBeanResourceName(beanName);
+        
+        InputStream is = (cls == null) ?
+            ClassLoader.getSystemResourceAsStream(beanResourceName) :
+            cls.getResourceAsStream(beanResourceName);
+            
+        if(is != null) {
+            try {
+                ObjectInputStream ois = (cls == null) ?
+                    new ObjectInputStream(is) :
+                    new CustomizedObjectInputStream(is, cls);
+                
+                try {
+                    result = ois.readObject();
+                } catch (ClassNotFoundException cnfe) {
+                    // skip exception
+                }
+            } catch (IOException ioe) {
+                // skip exception
+            }
+        }
+        
+        if(result == null) {
+            try {
+                Class c = Class.forName(beanName, true, cls);
+                
+                try {
+                    result = c.newInstance();
+                    
+                    if(result instanceof Applet) {
+                        Applet applet = (Applet) result;
+                        applet.init();
+                    }
+                } catch (IllegalAccessException iae) {
+                    throw new ClassNotFoundException(iae.getClass() + ": "
+                            + iae.getMessage());
+                }
+            } catch (InstantiationException ie) {
+                throw new ClassNotFoundException(ie.getClass() + ": "
+                        + ie.getMessage());
+            }
+        }
+        
+        return result;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static Object getInstanceOf(Object bean, Class targetType) {
+        return bean;            
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static boolean isInstanceOf(Object bean, Class targetType) {
+        return bean.getClass().isAssignableFrom(targetType);            
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static void setGuiAvailable(boolean isGuiAvailable)
+        throws SecurityException
+    {
+        checkPropertiesAccess();
+        guiAvailable = isGuiAvailable; 
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static void setDesignTime(boolean isDesignTime)
+        throws SecurityException
+    {
+        checkPropertiesAccess();
+        designTime = isDesignTime; 
+    }
+    
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static boolean isGuiAvailable() {
+        return guiAvailable;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public static boolean isDesignTime() {
+        return designTime;
+    }
+    
+    private static void checkPropertiesAccess() throws SecurityException {
+        SecurityManager sm = System.getSecurityManager();
+        
+        if (sm != null)    {
+            sm.checkPropertiesAccess();
+        }
+    }
+    
+    private static String getBeanResourceName(String beanName) {
+        return beanName.replace('.', '/') + ".ser";
+    }
+    
+}
+
+/*
+ Customized object input stream that allows
+ to read objects by specified class loader
+*/
+class CustomizedObjectInputStream extends ObjectInputStream {
+    
+    private ClassLoader cls;
+    
+    public CustomizedObjectInputStream(InputStream in, ClassLoader cls)
+            throws IOException {
+        super(in);
+        this.cls = cls;
+    }
+    
+    protected Class resolveClass(ObjectStreamClass desc)
+        throws IOException, ClassNotFoundException
+    {
+        String className = desc.getName();
+        
+        if(className.startsWith("[")) {
+            int idx = className.lastIndexOf("[");
+            
+            String prefix = className.substring(0, idx + 1);
+            
+            int[] dimensions = new int[prefix.length()];
+            for(int i = 0; i < dimensions.length; ++i) {
+                dimensions[i] = 0;
+            }
+            
+            String postfix = className.substring(idx + 1);
+            
+            Class componentType = null;
+            if(postfix.equals("Z")) {
+                componentType = boolean.class;
+            } else if(postfix.equals("B")) {
+                componentType = byte.class;
+            } else if(postfix.equals("C")) {
+                componentType = char.class;
+            } else if(postfix.equals("D")) {
+                componentType = double.class;
+            } else if(postfix.equals("F")) {
+                componentType = float.class;
+            } else if(postfix.equals("I")) {
+                componentType = int.class;
+            } else if(postfix.equals("L")) {
+                componentType = long.class;
+            } else if(postfix.equals("S")) {
+                componentType = short.class;
+            } else if(postfix.equals("V")) {
+                componentType = null;
+            } else if(postfix.startsWith("L")){
+                componentType = cls.loadClass(postfix.substring(1,
+                        postfix.length() - 1));
+            } else {
+                throw new IllegalArgumentException("Illegal class name: "
+                        + className);
+            }
+            
+            return Array.newInstance(componentType, dimensions).getClass();
+        } else {
+            return Class.forName(className, true, cls);
+        }
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Customizer.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Customizer.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Customizer.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Customizer.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,44 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.4.6.3 $
+ */
+package java.beans;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.4.6.3 $
+ */
+
+public interface Customizer {
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void setObject(Object bean);
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void removePropertyChangeListener(PropertyChangeListener listener);
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void addPropertyChangeListener(PropertyChangeListener listener);
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DefaultPersistenceDelegate.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DefaultPersistenceDelegate.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DefaultPersistenceDelegate.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DefaultPersistenceDelegate.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,174 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.7.6.3 $
+ */
+package java.beans;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.7.6.3 $
+ */
+
+public class DefaultPersistenceDelegate extends PersistenceDelegate {
+    
+    private String[] constructorPropertyNames;
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public DefaultPersistenceDelegate(String[] constructorPropertyNames) {
+        this.constructorPropertyNames = constructorPropertyNames;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public DefaultPersistenceDelegate() {
+        this.constructorPropertyNames = null;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    protected void initialize(Class type, Object oldInstance,
+            Object newInstance, Encoder out) {
+        try {
+            PropertyDescriptor[] pds =
+                    Introspector.getBeanInfo(type).getPropertyDescriptors();
+            
+            for(int i = 0; i < pds.length; ++i) {
+                PropertyDescriptor pd = pds[i];
+                
+                if(!isTransient(pd)) {
+                    Method getter = pd.getReadMethod();
+                    
+                    if(getter != null) {
+                           Method setter = pd.getWriteMethod();
+                           
+                           if(setter != null) {
+                               Object oldValue = getter.invoke(oldInstance,
+                                       null);
+                               Object newValue = getter.invoke(newInstance,
+                                       null);
+                               
+                               if(oldValue != null && !oldValue.equals(newValue)
+                                       || oldValue == null && newValue != null)
+                               {
+                                   String setterName = setter.getName();
+                                   Statement s = new Statement(oldInstance,
+                                           setterName,
+                                           new Object[] { oldValue } );
+                                   out.writeStatement(s);
+                               }
+                           } else {
+                               // commented since the process should be continued even if no setter is found
+                               // throw new Exception("no setter for " + pd.getName() + " property.");
+                               continue;
+                           }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            System.out.println("in DefaultPersistenceDelegate initialize() " +
+                    e.getClass() + " :" + e.getMessage());
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    protected Expression instantiate(Object oldInstance, Encoder out) {
+        Object[] args = null;
+        
+        if(constructorPropertyNames == null
+                || constructorPropertyNames.length == 0) {
+            args = new Object[] {};
+        } else {
+            args = new Object[constructorPropertyNames.length];
+            
+            try {
+                PropertyDescriptor[] pds = Introspector.getBeanInfo(
+                        oldInstance.getClass()).getPropertyDescriptors();
+                
+                for(int i = 0; i < constructorPropertyNames.length; ++i) {
+                    
+                    boolean found = false;
+                    
+                    for(int j = 0; j < pds.length; ++j) {
+                        
+                        if(constructorPropertyNames[i].equals(pds[j].getName())) {
+                            Method getter = pds[j].getReadMethod();
+                            
+                            if(getter != null) {
+                                args[i] = getter.invoke(oldInstance, null);
+                                found = true;
+                                break;
+                            } else {
+                                throw new Exception("no getter for " +
+                                    pds[j].getName() + " property");
+                            }
+                            
+                        }
+                    } // for j
+                    
+                    if(found == false) {
+                        throw new Exception("no property for name " +
+                            constructorPropertyNames[i] + " is found");
+                    }
+                    
+                } // for i
+            } catch (Exception e) {
+                System.out.println("in DefaultPersistenceDelegate instantiate() "
+                        + e.getClass() + " :" + e.getMessage());
+            }
+            
+        }
+        
+        return new Expression(oldInstance, oldInstance.getClass(), "new", args);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    protected boolean mutatesTo(Object oldInstance, Object newInstance) {
+        if(oldInstance != null) {
+            try {
+                Method equalsMethod = oldInstance.getClass().getMethod(
+                    "equals", new Class[] { Object.class });
+                if(equalsMethod != null) {
+                    Object result = equalsMethod.invoke(oldInstance,
+                            new Object[] { newInstance } );
+                       return ((Boolean) result).booleanValue();
+                }
+            } catch(Exception e) {
+                System.out.println("in DefaultPersistenceDelegate.mutatesTo() "
+                        + e.getClass() + " :" + e.getMessage());
+                return false;
+            }
+        }
+        return super.mutatesTo(oldInstance, newInstance);
+    }
+    
+    private static boolean isTransient(PropertyDescriptor pd) {
+        Boolean isTransient = (Boolean) pd.getValue("transient");
+        return (isTransient != null) && isTransient.equals(Boolean.TRUE);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DesignMode.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DesignMode.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DesignMode.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/DesignMode.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,41 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.3.6.3 $
+ */
+package java.beans;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.3.6.3 $
+ */
+
+public interface DesignMode {
+
+    public static final String PROPERTYNAME = "designTime";
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void setDesignTime(boolean designTime);
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public boolean isDesignTime();
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Encoder.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Encoder.java?rev=387239&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Encoder.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/beans/Encoder.java Mon Mar 20 08:31:09 2006
@@ -0,0 +1,308 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.14.6.4 $
+ */
+package java.beans;
+
+import java.util.HashMap;
+import java.util.Vector;
+
+import org.apache.harmony.beans.NullPersistenceDelegate;
+import org.apache.harmony.beans.ObjectNode;
+import org.apache.harmony.beans.DefaultPersistenceDelegatesFactory;
+
+/**
+ * @author Maxim V. Berkultsev
+ * @version $Revision: 1.14.6.4 $
+ */
+
+public class Encoder {
+    
+    private ExceptionListener exceptionListener = null;
+    private HashMap persistenceDelegates = new HashMap();
+    
+    Vector roots = new Vector();
+    HashMap nodes = new HashMap();
+    
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public Encoder() {}
+    
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public Object get(Object oldInstance) {
+        if(oldInstance == null) {
+            return null;
+        }
+        
+        ObjectNode node = (ObjectNode) nodes.get(oldInstance);
+        Object result = getValue(node);
+        return result;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public Object remove(Object oldInstance) {
+        //TODO - notify refernces on node deletion
+        if(oldInstance == null) {
+            return null;
+        }
+        
+        ObjectNode node = (ObjectNode) nodes.remove(oldInstance);
+        return getValue(node);
+    }
+    
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public PersistenceDelegate getPersistenceDelegate(Class type) {
+        PersistenceDelegate result =
+                (PersistenceDelegate) persistenceDelegates.get(type);
+        
+        if(result == null) {
+             result = DefaultPersistenceDelegatesFactory.getPersistenceDelegate(
+                     type);
+        }
+        
+        return result;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void setPersistenceDelegate(Class type,
+            PersistenceDelegate persistenceDelegate) {
+        persistenceDelegates.put(type, persistenceDelegate);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    protected void writeObject(Object object) {
+        roots.add(object);
+        doWriteObject(object);
+    }
+    
+    void doWriteObject(Object object) {
+           PersistenceDelegate pd = (object != null) ?
+               getPersistenceDelegate(object.getClass()) :
+                   new NullPersistenceDelegate();
+               
+           if(pd == null) {
+               pd = new DefaultPersistenceDelegate();
+           }
+           
+           pd.writeObject(object, this);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void writeStatement(Statement oldStm) {
+        ObjectNode node = (ObjectNode) nodes.get(oldStm.getTarget());
+        if(node != null) {
+            try {
+                Object[] oldArgs = oldStm.getArguments();
+                Object[] newArgs = write(oldArgs);
+                
+                Statement statement = new Statement(node.getObjectValue(),
+                        oldStm.getMethodName(), oldArgs);
+                node.addStatement(statement);
+            } catch (Exception e) {
+                getExceptionListener().exceptionThrown(e);
+            }
+        } else {
+            System.out.println("no node is found for statement with target = "
+                    + oldStm.getTarget());
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void writeExpression(Expression oldExp) {
+        try {
+            Object oldInstance = oldExp.getValue();
+            
+            ObjectNode node = null;
+            Class type = null;
+            
+            if(oldInstance != null) {
+                type = oldInstance.getClass();
+                node = (ObjectNode) nodes.get(oldInstance);
+            }
+            
+            if(node == null) {
+                if(isNull(type) || isPrimitive(type) || isString(type)
+                        || isClass(type)) {
+                    node = new ObjectNode(oldExp);
+                } else {
+                    write(oldExp.getArguments());
+                    node = new ObjectNode(oldExp, nodes);
+                }
+                
+                nodes.put(oldInstance, node);
+                
+                // if an expression is not a constructor
+                if(!(oldExp.getTarget() instanceof Class)) {
+                    ObjectNode parent = (ObjectNode) nodes.get(
+                            oldExp.getTarget());
+                    parent.addExpression(oldExp);
+                }
+            } else if(oldExp.getMethodName().equals("new")) {
+                node.addReference();
+            } else {
+                node.addReferencedExpression(oldExp);
+            }
+        } catch (Exception e) {
+            // TODO - remove written args
+            getExceptionListener().exceptionThrown(e);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public void setExceptionListener(ExceptionListener exceptionListener) {
+        this.exceptionListener = exceptionListener;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     */
+    public ExceptionListener getExceptionListener() {
+        if(exceptionListener == null) {
+            exceptionListener = new ExceptionListener() {
+                public void exceptionThrown(Exception e) {
+                    System.out.println(e.getClass() + ": " + e.getMessage());
+                }
+            };
+        }
+        
+        return exceptionListener;
+    }
+    
+    private Object write(Object oldInstance) throws Exception {
+        if(oldInstance == null) {
+            return null;
+        }
+
+        ObjectNode node = (ObjectNode) nodes.get(oldInstance);
+        if(node == null) {
+            Class type = oldInstance.getClass();
+            
+            if(isPrimitive(type) || isString(type) || isClass(type)) {
+                Expression expr = new Expression(type, "new",
+                        new Object[] { oldInstance });
+                nodes.put(oldInstance, new ObjectNode(expr));
+            } else {
+                doWriteObject(oldInstance);
+            }
+            
+            node = (ObjectNode) nodes.get(oldInstance);
+        } else {
+            node.addReference();
+        }
+        
+        return node.getObjectValue();
+    }
+    
+    private Object[] write(Object[] oldInstances) throws Exception {
+        if(oldInstances != null) {
+            Object[] newInstances = new Object[oldInstances.length];
+            
+            for(int i = 0; i < oldInstances.length; ++i) {
+                newInstances[i] = write(oldInstances[i]);
+            }
+            
+            return newInstances;
+        }
+        
+        return null;
+    }
+
+    private Object getValue(ObjectNode node) {
+        if(node != null) {
+            try {
+                Object result = node.getObjectValue();
+                return result;
+            } catch (Exception e) {
+                getExceptionListener().exceptionThrown(e);
+            }
+        }
+        
+        return null;
+    }
+    
+    static boolean isNull(Class type) {
+        return (type == null);
+    }
+    
+    static boolean isPrimitive(Class type) {
+        return (type == Boolean.class) || (type == Byte.class) ||
+            (type == Character.class) || (type == Double.class) ||
+            (type == Float.class) || (type == Integer.class) ||
+            (type == Long.class) || (type == Short.class);
+    }
+    
+    static boolean isString(Class type) {
+        return (type == String.class);
+        
+    }
+    
+    static boolean isClass(Class type) {
+        return (type == Class.class);
+    }
+    
+    
+    static boolean isArray(Class type) {
+        return type.isArray();
+    }
+    
+    static String getPrimitiveName(Class type) {
+        String result = null;
+        
+        if(type == Boolean.class) {
+            result = "boolean";
+        } else if(type == Byte.class) {
+            result = "byte";
+        } else if(type == Character.class) {
+            result = "char";
+        } else if(type == Double.class) {
+            result = "double";
+        } else if(type == Float.class) {
+            result = "float";
+        } else if(type == Integer.class) {
+            result = "int";
+        } else if(type == Long.class) {
+            result = "long";
+        } else if(type == Short.class) {
+            result = "short";
+        } else if(type == String.class) {
+            result = "string";
+        } else if(type == Class.class) {
+            result = "class";
+        }
+        
+        return result;
+    }
+}