[jboss-cvs] JBossAS SVN: r85918 - projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 16 07:40:42 EDT 2009
Author: stalep
Date: 2009-03-16 07:40:42 -0400 (Mon, 16 Mar 2009)
New Revision: 85918
Added:
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Cast.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ConstructorCall.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Expression.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ExpressionEditor.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/FieldAccess.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Handler.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Instanceof.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/MethodCall.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewArray.java
projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewExpression.java
Log:
Revert "[JBREFLECT-49]"
This reverts commit 257078e782b9eaf1b3d829c95febe73756e9d2d8.
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Cast.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Cast.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Cast.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,25 @@
+package org.jboss.reflect.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableClassInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+public interface Cast extends Expression
+{
+
+ /**
+ * Returns the <code>CtClass</code> object representing
+ * the type specified by the cast.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableClassInfo getType() throws NotFoundException;
+
+ /**
+ * Replaces the explicit cast operator with the bytecode derived from
+ * the given source text.
+ */
+ public void replace(String statement) throws CannotCompileException;
+
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ConstructorCall.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ConstructorCall.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ConstructorCall.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,16 @@
+package org.jboss.reflect.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.MutableConstructorInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+public interface ConstructorCall extends MethodCall
+{
+
+ /**
+ * Returns the called constructor.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableConstructorInfo getConstructor() throws NotFoundException;
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Expression.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Expression.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Expression.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,87 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableClassInfo;
+import org.jboss.reflect.spi.MutableConstructorInfo;
+import org.jboss.reflect.spi.MutableMethodInfo;
+
+/**
+ * A Expression.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface Expression
+{
+ /**
+ * Returns the method containing the <tt>new</tt>
+ * expression represented by this object.
+ *
+ * @return
+ */
+ public MutableMethodInfo whereMethod();
+
+ /**
+ * Returns the constructor containing the <tt>new</tt>
+ * expression represented by this object.
+ *
+ * @return
+ */
+ public MutableConstructorInfo whereConstructor();
+
+ /**
+ * FIXME Comment this
+ *
+ * @return
+ */
+ public MutableClassInfo[] mayThrow();
+
+ /**
+ * FIXME Comment this
+ *
+ * @return
+ */
+ public int indexOfBytecode();
+
+ /**
+ * Returns the line number of the source line containing the
+ * <tt>new</tt> expression.
+ *
+ * @return
+ */
+ public int getLineNumber();
+
+ /**
+ * Returns the source file containing the <tt>new</tt> expression.
+ *
+ * @return
+ */
+ public String getFileName();
+
+ public abstract void replace(String statement) throws CannotCompileException;
+
+ public void replace(String statement, ExpressionEditor recursive) throws CannotCompileException;
+
+
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ExpressionEditor.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ExpressionEditor.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/ExpressionEditor.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+
+/**
+ * A ExpressionEditor, a translator of method bodies.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ExpressionEditor
+{
+
+ /**
+ * Edits a <tt>new</tt> expression (overridable).
+ * The default implementation performs nothing.
+ *
+ * @param e
+ * @throws CannotCompileException
+ */
+ public void edit(NewExpression e) throws CannotCompileException;
+
+ /**
+ * Edits an expression for array creation (overridable).
+ * The default implementation performs nothing.
+ *
+ * @param a
+ * @throws CannotCompileException
+ */
+ public void edit(NewArray a) throws CannotCompileException;
+
+ /**
+ * Edits a method call (overridable).
+ *
+ * @param m
+ * @throws CannotCompileException
+ */
+ public void edit(MethodCall m) throws CannotCompileException;
+
+ /**
+ * Edits a constructor call (overridable).
+ * The constructor call is either
+ * <code>super()</code> or <code>this()</code>
+ * included in a constructor body.
+ *
+ * @param c
+ * @throws CannotCompileException
+ */
+ public void edit(ConstructorCall c) throws CannotCompileException;
+
+ /**
+ * Edits a field-access expression (overridable).
+ * Field access means both read and write.
+ *
+ * @param f
+ * @throws CannotCompileException
+ */
+ public void edit(FieldAccess f) throws CannotCompileException;
+
+ /**
+ * Edits an instanceof expression (overridable).
+ *
+ * @param i
+ * @throws CannotCompileException
+ */
+ public void edit(Instanceof i) throws CannotCompileException;
+
+ /**
+ * Edits an expression for explicit type casting (overridable).
+ *
+ * @param c
+ * @throws CannotCompileException
+ */
+ public void edit(Cast c) throws CannotCompileException;
+
+ /**
+ * Edits a catch clause (overridable).
+ *
+ * @param h
+ * @throws CannotCompileException
+ */
+ public void edit(Handler h) throws CannotCompileException;
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/FieldAccess.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/FieldAccess.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/FieldAccess.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableFieldInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+/**
+ * A FieldAccess.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface FieldAccess extends Expression
+{
+
+ /**
+ * Returns true if the field is static.
+ *
+ * @return
+ */
+ public boolean isStatic();
+
+ /**
+ * Returns true if the field is read.
+ *
+ * @return
+ */
+ public boolean isReader();
+
+ /**
+ * Returns true if the field is written in.
+ *
+ * @return
+ */
+ public boolean isWriter();
+
+ /**
+ * Returns the name of the class in which the field is declared.
+ *
+ * @return
+ */
+ public String getClassName();
+
+ /**
+ * Returns the name of the field.
+ *
+ * @return
+ */
+ public String getFieldName();
+
+ /**
+ * Returns the field accessed by this expression.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableFieldInfo getField() throws NotFoundException;
+
+ /**
+ * Returns the signature of the field type.
+ * The signature is represented by a character string
+ * called field descriptor, which is defined in the JVM specification.
+ *
+ * @return
+ */
+ public String getSignature();
+
+ /**
+ * Replaces the method call with the bytecode derived from
+ * the given source text.
+ */
+ public void replace(String statement) throws CannotCompileException;
+
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Handler.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Handler.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Handler.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableClassInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+/**
+ * A Handler.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface Handler extends Expression
+{
+
+ /**
+ * Returns the type handled by the catch clause.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableClassInfo getType() throws NotFoundException;
+
+ /**
+ * This method has not been implemented yet.
+ *
+ * @param statement
+ */
+ public void replace(String statement) throws CannotCompileException;
+
+ /**
+ * Inserts bytecode at the beginning of the catch clause.
+ * The caught exception is stored in <code>$1</code>.
+ *
+ * @param src
+ * @throws CannotCompileException
+ */
+ public void insertBefore(String src) throws CannotCompileException;
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Instanceof.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Instanceof.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/Instanceof.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.MutableClassInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+/**
+ * A Instanceof.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface Instanceof extends Expression
+{
+
+ /**
+ * Returns the <code>CtClass</code> object representing
+ * the type name on the right hand side
+ * of the instanceof operator.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableClassInfo getType() throws NotFoundException;
+
+ /**
+ * Replaces the instanceof operator with the bytecode derived from
+ * the given source text.
+ */
+ public void replace(String statement) throws NotFoundException;
+
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/MethodCall.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/MethodCall.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/MethodCall.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableMethodInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+/**
+ * A MethodCall.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MethodCall extends Expression
+{
+
+ /**
+ * Returns the class name of the target object,
+ * which the method is called on.
+ *
+ * @return
+ */
+ public String getClassName();
+
+ /**
+ * Returns the name of the called method.
+ *
+ * @return
+ */
+ public String getMethodName();
+
+ /**
+ * Get the called method
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableMethodInfo getMethod() throws NotFoundException;
+
+
+ /**
+ * Return the method signature
+ *
+ * @return
+ */
+ public String getSignatue();
+
+ /**
+ * Returns true if the called method is of a superclass of the current
+ * class.
+ *
+ * @return
+ */
+ public boolean isSuper();
+
+ /**
+ * Replaces the method call with the bytecode derived from
+ * the given source text.
+ */
+ public void replace(String statement) throws CannotCompileException;
+
+
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewArray.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewArray.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewArray.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableClassInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+/**
+ * A NewArray.
+ *
+ * @author <a href="mailto:stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface NewArray extends Expression
+{
+
+ /**
+ * Returns the type of array components. If the created array is
+ * a two-dimensional array of <tt>int</tt>,
+ * the type returned by this method is
+ * not <tt>int[]</tt> but <tt>int</tt>.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableClassInfo getComponentType() throws NotFoundException;
+
+ /**
+ * Returns the number of dimensions of arrays to be created.
+ * If the opcode is multianewarray, this method returns the second
+ * operand. Otherwise, it returns 1.
+ *
+ * @return
+ */
+ public int getCreatedDimensions();
+
+ /**
+ * Replaces the array creation with the bytecode derived from
+ * the given source text.
+ */
+ public void replace(String statement) throws CannotCompileException;
+}
Added: projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewExpression.java
===================================================================
--- projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewExpression.java (rev 0)
+++ projects/jboss-reflect/trunk/src/main/java/org/jboss/reflect/plugins/javassist/expr/NewExpression.java 2009-03-16 11:40:42 UTC (rev 85918)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.plugins.javassist.expr;
+
+import org.jboss.reflect.spi.CannotCompileException;
+import org.jboss.reflect.spi.MutableConstructorInfo;
+import org.jboss.reflect.spi.NotFoundException;
+
+public interface NewExpression extends Expression
+{
+
+ /**
+ * Returns the class name of the created object.
+ *
+ * @return
+ */
+ public String getClassName();
+
+ /**
+ * Get the signature of the constructor
+ *
+ * @return
+ */
+ public String getSignature();
+
+ /**
+ * Returns the constructor called for creating the object.
+ *
+ * @return
+ * @throws NotFoundException
+ */
+ public MutableConstructorInfo getConstructor() throws NotFoundException;
+
+ /**
+ * Replaces the <tt>new</tt> expression with the bytecode derived from
+ * the given source text.
+ */
+ public void replace(String statement) throws CannotCompileException;
+
+
+
+}
More information about the jboss-cvs-commits
mailing list