[jboss-cvs] JBossAS SVN: r85896 - projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 16 07:35:12 EDT 2009


Author: stalep
Date: 2009-03-16 07:35:12 -0400 (Mon, 16 Mar 2009)
New Revision: 85896

Added:
   projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableFieldInfo.java
Modified:
   projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableClassInfo.java
Log:
[JBREFLECT-49]
Added MutableFieldInfo and support in MCI.

Modified: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableClassInfo.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableClassInfo.java	2009-03-16 11:35:01 UTC (rev 85895)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableClassInfo.java	2009-03-16 11:35:12 UTC (rev 85896)
@@ -61,7 +61,7 @@
     * @return
     */
    MutableMethodInfo createMutableMethod(ModifierInfo modifier, String name, 
-         MutableClassInfo[] parameters, MutableClassInfo[] exceptions);
+         ClassInfo[] parameters, ClassInfo[] exceptions);
    
    
    /**
@@ -91,7 +91,7 @@
     * @return
     */
    MutableMethodInfo createMutableMethod(ModifierInfo modifier, String name, Body body,
-         MutableClassInfo[] parameters, MutableClassInfo[] exceptions);
+         ClassInfo[] parameters, ClassInfo[] exceptions);
 
    
    /**
@@ -123,8 +123,8 @@
     * @param exceptions
     * @return
     */
-   MutableConstructorInfo createMutableConstructor(ModifierInfo modifier, MutableClassInfo[] parameters, 
-         MutableClassInfo[] exceptions);
+   MutableConstructorInfo createMutableConstructor(ModifierInfo modifier, ClassInfo[] parameters, 
+         ClassInfo[] exceptions);
    
    /**
     * Create a constructor with the params given.
@@ -150,9 +150,27 @@
     * @return
     */
    MutableConstructorInfo createMutableConstructor(ModifierInfo modifier, Body body,
-         MutableClassInfo[] parameters, MutableClassInfo[] exceptions);
+         ClassInfo[] parameters, ClassInfo[] exceptions);
    
    /**
+    * Create a field connected to this class with the params given.
+    * 
+    * @param modifier
+    * @param type
+    * @return
+    */
+   MutableFieldInfo createMutableField(ModifierInfo modifier, String type);
+   
+   /**
+    * Create a field connected to this class with the params given.
+    * 
+    * @param modifier
+    * @param type
+    * @return
+    */
+   MutableFieldInfo createMutableField(ModifierInfo modifier, ClassInfo type);
+   
+   /**
     * Add a method
     * 
     * @param mmi
@@ -181,6 +199,20 @@
    void removeConstructor(MutableConstructorInfo mci);
    
    /**
+    * Add a field
+    * 
+    * @param mfi
+    */
+   void addField(MutableFieldInfo mfi);
+   
+   /**
+    * Remove a field
+    * 
+    * @param mfi
+    */
+   void removeField(MutableFieldInfo mfi);
+   
+   /**
     * Converts the class to a Class file. 
     * After this method is called, no modifications to the class is allowed.
     * 

Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableFieldInfo.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableFieldInfo.java	                        (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/spi/MutableFieldInfo.java	2009-03-16 11:35:12 UTC (rev 85896)
@@ -0,0 +1,53 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.reflect.spi;
+
+/**
+ * A MutableFieldInfo.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MutableFieldInfo extends FieldInfo
+{
+   
+   /**
+    * Name of the field
+    * 
+    */
+   void setName();
+   
+   /**
+    * Field type
+    * 
+    * @param type
+    */
+   void setType(ClassInfo type);
+   
+   /**
+    * Field modifier
+    * 
+    * @param modifier
+    */
+   void setModifier(ModifierInfo modifier);
+
+}




More information about the jboss-cvs-commits mailing list