geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r376859 - /geronimo/specs/branches/jee5_exp/geronimo-spec-jpa/src/main/java/javax/persistence/spi/ClassTransformer.java
Date Fri, 10 Feb 2006 21:13:22 GMT
Author: jgenender
Date: Fri Feb 10 13:13:19 2006
New Revision: 376859

URL: http://svn.apache.org/viewcvs?rev=376859&view=rev
Log:
Add missing declarations

Modified:
    geronimo/specs/branches/jee5_exp/geronimo-spec-jpa/src/main/java/javax/persistence/spi/ClassTransformer.java

Modified: geronimo/specs/branches/jee5_exp/geronimo-spec-jpa/src/main/java/javax/persistence/spi/ClassTransformer.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-jpa/src/main/java/javax/persistence/spi/ClassTransformer.java?rev=376859&r1=376858&r2=376859&view=diff
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-jpa/src/main/java/javax/persistence/spi/ClassTransformer.java
(original)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-jpa/src/main/java/javax/persistence/spi/ClassTransformer.java
Fri Feb 10 13:13:19 2006
@@ -18,10 +18,41 @@
 //
 // This source code implements specifications defined by the Java
 // Community Process. In order to remain compliant with the specification
-// DO NOT add / change / or delete method signatures!
+// DO NOT add/change/or delete method signatures!
 //
+
 package javax.persistence.spi;
 
+import java.security.ProtectionDomain;
+import java.lang.instrument.IllegalClassFormatException;
+
 public interface ClassTransformer {
+    /**
+     * Invoked when a class is being loaded or redefined. The implementation of this
+     * method may transform the supplied class file and return a new replacement class
+     * file.
+     *
+     * @param loader              The defining loader of the class to be transformed, may
be null if
+     *                            the bootstrap loader
+     * @param className           The name of the class in the internal form of fully qualified
+     *                            class and interface names
+     * @param classBeingRedefined If this is a redefine, the class being redefined,
+     *                            otherwise null
+     * @param protectionDomain    The protection domain of the class being defined or
+     *                            redefined
+     * @param classfileBuffer     The input byte buffer in class file format - must not be
+     *                            modified
+     * @return A well-formed class file buffer (the result of the transform), or null if
+     *         no transform is performed
+     * @throws java.lang.instrument.IllegalClassFormatException
+     *          If the input does not represent a well-formed
+     *          class file
+     */
+    byte[] transform(
+            ClassLoader loader,
+            String className,
+            Class<?> classBeingRedefined,
+            ProtectionDomain protectionDomain,
+            byte[] classfileBuffer) throws IllegalClassFormatException;
 
 }



Mime
View raw message