Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public ClassReader(
this.b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V24) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V25) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public void visitTableSwitchInsn(
* Visits a LOOKUPSWITCH instruction.
*
* @param dflt beginning of the default handler block.
* @param keys the values of the keys.
* @param keys the values of the keys. Keys must be sorted in increasing order.
* @param labels beginnings of the handler blocks. {@code labels[i]} is the beginning of the
* handler block for the {@code keys[i]} key.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ public interface Opcodes {
int V22 = 0 << 16 | 66;
int V23 = 0 << 16 | 67;
int V24 = 0 << 16 | 68;
int V25 = 0 << 16 | 69;

/**
* Version flag indicating that the class is using 'preview' features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@
// THE POSSIBILITY OF SUCH DAMAGE.
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.ebean.enhance.asm.ConstantDynamic;
import io.ebean.enhance.asm.Handle;
import io.ebean.enhance.asm.Label;
import io.ebean.enhance.asm.MethodVisitor;
import io.ebean.enhance.asm.Opcodes;
import io.ebean.enhance.asm.Type;

/**
* A {@link MethodVisitor} to insert before, after and around advices in methods and constructors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,11 @@
// THE POSSIBILITY OF SUCH DAMAGE.
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import io.ebean.enhance.asm.ClassVisitor;
import io.ebean.enhance.asm.ConstantDynamic;
import io.ebean.enhance.asm.Handle;
import io.ebean.enhance.asm.Label;
import io.ebean.enhance.asm.MethodVisitor;
import io.ebean.enhance.asm.Opcodes;
import io.ebean.enhance.asm.Type;

/**
* A {@link MethodVisitor} with convenient methods to generate code. For example, using this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@

package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.ConstantDynamic;
import io.ebean.enhance.asm.Handle;
import io.ebean.enhance.asm.Label;
import io.ebean.enhance.asm.MethodVisitor;
import io.ebean.enhance.asm.Opcodes;
import io.ebean.enhance.asm.Type;
import io.ebean.enhance.asm.*;

/**
* A {@link MethodVisitor} providing a more detailed API to generate and transform instructions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
// THE POSSIBILITY OF SUCH DAMAGE.
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.AnnotationVisitor;
import io.ebean.enhance.asm.Label;
import io.ebean.enhance.asm.MethodVisitor;
import io.ebean.enhance.asm.Opcodes;
import io.ebean.enhance.asm.Type;
import io.ebean.enhance.asm.TypePath;
import io.ebean.enhance.asm.*;

/**
* A {@link MethodVisitor} that renumbers local variables in their order of appearance. This adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
// THE POSSIBILITY OF SUCH DAMAGE.
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.Type;

import java.util.HashMap;
import java.util.Map;
import io.ebean.enhance.asm.Type;

/**
* A named method descriptor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@

package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.*;

import java.util.ArrayList;
import java.util.List;

import io.ebean.enhance.asm.*;
import io.ebean.enhance.asm.ByteVector;

/**
* A ModuleHashes attribute. This attribute is specific to the OpenJDK and may change in the future.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.*;
import io.ebean.enhance.asm.ByteVector;

/**
* A ModuleResolution attribute. This attribute is specific to the OpenJDK and may change in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.*;
import io.ebean.enhance.asm.ByteVector;

/**
* A ModuleTarget attribute. This attribute is specific to the OpenJDK and may change in the future.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
// THE POSSIBILITY OF SUCH DAMAGE.
package io.ebean.enhance.asm.commons;

import io.ebean.enhance.asm.ClassVisitor;
import io.ebean.enhance.asm.FieldVisitor;
import io.ebean.enhance.asm.MethodVisitor;
import io.ebean.enhance.asm.Opcodes;

import java.io.ByteArrayOutputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
Expand All @@ -36,10 +41,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import io.ebean.enhance.asm.ClassVisitor;
import io.ebean.enhance.asm.FieldVisitor;
import io.ebean.enhance.asm.MethodVisitor;
import io.ebean.enhance.asm.Opcodes;

/**
* A {@link ClassVisitor} that adds a serial version unique identifier to a class if missing. A
Expand Down
10 changes: 5 additions & 5 deletions ebean-agent/src/main/java/io/ebean/enhance/asm/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

<p>
The <a href="http://asm.ow2.org/">ASM</a> framework is organized
around the {@link io.ebean.enhance.asm.ClassVisitor ClassVisitor},
{@link io.ebean.enhance.asm.FieldVisitor FieldVisitor},
{@link io.ebean.enhance.asm.MethodVisitor MethodVisitor} and
{@link io.ebean.enhance.asm.AnnotationVisitor AnnotationVisitor} abstract classes,
around the {@link org.objectweb.asm.ClassVisitor ClassVisitor},
{@link org.objectweb.asm.FieldVisitor FieldVisitor},
{@link org.objectweb.asm.MethodVisitor MethodVisitor} and
{@link org.objectweb.asm.AnnotationVisitor AnnotationVisitor} abstract classes,
which allow one to visit the fields, methods and annotations of a class,
including the bytecode instructions of each method.

Expand All @@ -53,7 +53,7 @@

<p>
In order to generate a class from scratch, only the {@link
io.ebean.enhance.asm.ClassWriter ClassWriter} class is necessary. Indeed,
org.objectweb.asm.ClassWriter ClassWriter} class is necessary. Indeed,
in order to generate a class, one must just call its visit<em>Xxx</em>
methods with the appropriate arguments to generate the desired fields
and methods.
Expand Down