Top Inners Fields Constructors Methods
org.springframework.cglib.core

public Class DuplicatesPredicate

extends Object
implements Predicate
Class Inheritance
All Implemented Interfaces
org.springframework.cglib.core.Predicate
Annotations
@SuppressWarnings:rawtypes, unchecked
Imports
java.io.IOException, .InputStream, java.lang.reflect.Method, java.util.Collections, .HashMap, .HashSet, .List, .Map, .Set, org.springframework.asm.ClassReader, .ClassVisitor, .MethodVisitor, .Opcodes

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final Set<E>
private final Set<E>

Constructor Summary

AccessConstructor and Description
public
DuplicatesPredicate()

Constructs a DuplicatesPredicate that will allow subclass bridge methods to be preferred over superclass non-bridge methods.

public
DuplicatesPredicate(List<E> allMethods)

Constructs a DuplicatesPredicate that prefers using superclass non-bridge methods despite a subclass method with the same signature existing (if the subclass is a bridge method).

Method Summary

Modifier and TypeMethod and Description
public boolean
private static ClassLoader
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rejectedback to summary
private final Set<E> rejected
uniqueback to summary
private final Set<E> unique

Constructor Detail

DuplicatesPredicateback to summary
public DuplicatesPredicate()

Constructs a DuplicatesPredicate that will allow subclass bridge methods to be preferred over superclass non-bridge methods.

DuplicatesPredicateback to summary
public DuplicatesPredicate(List<E> allMethods)

Constructs a DuplicatesPredicate that prefers using superclass non-bridge methods despite a subclass method with the same signature existing (if the subclass is a bridge method).

Method Detail

evaluateback to summary
public boolean evaluate(Object arg)

Implements org.springframework.cglib.core.Predicate.evaluate.

Annotations
@Override
getClassLoaderback to summary
private static ClassLoader getClassLoader(Class<T> c)
org.springframework.cglib.core back to summary

private Class DuplicatesPredicate.UnnecessaryBridgeFinder

extends ClassVisitor
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Signature
private Map<K, V>
private final Set<E>
Inherited from org.springframework.asm.ClassVisitor:
apicv

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
visit(int
the class version. The minor version is stored in the 16 most significant bits, and the major version in the 16 least significant bits.
version
,
int
the class's access flags (see Opcodes). This parameter also indicates if the class is deprecated Opcodes#ACC_DEPRECATED or a record Opcodes#ACC_RECORD.
access
,
String
the internal name of the class (see Type#getInternalName()).
name
,
String
the signature of this class. May be null if the class is not a generic one, and does not extend or implement generic classes or interfaces.
signature
,
String
the internal of name of the super class (see Type#getInternalName()). For interfaces, the super class is Object. May be null, but only for the Object class.
superName
,
String[]
the internal names of the class's interfaces (see Type#getInternalName()). May be null.
interfaces
)

Overrides org.springframework.asm.ClassVisitor.visit.

Visits the header of the class.

public MethodVisitor
visitMethod(int
the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.
access
,
String
the method's name.
name
,
String
the method's descriptor (see Type).
desc
,
String
the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.
signature
,
String[]
the internal names of the method's exception classes (see Type#getInternalName()). May be null.
exceptions
)

Overrides org.springframework.asm.ClassVisitor.visitMethod.

Visits a method of the class.

Inherited from org.springframework.asm.ClassVisitor:
getDelegatevisitAnnotationvisitAttributevisitEndvisitFieldvisitInnerClassvisitModulevisitNestHostvisitNestMembervisitOuterClassvisitPermittedSubclassvisitRecordComponentvisitSourcevisitTypeAnnotation

Field Detail

currentMethodSigback to summary
private Signature currentMethodSig
methodsback to summary
private Map<K, V> methods
rejectedback to summary
private final Set<E> rejected

Constructor Detail

UnnecessaryBridgeFinderback to summary
pack-priv UnnecessaryBridgeFinder(Set<E> rejected)

Method Detail

addSuspectMethodback to summary
pack-priv void addSuspectMethod(Method m)
visitback to summary
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)

Overrides org.springframework.asm.ClassVisitor.visit.

Doc from org.springframework.asm.ClassVisitor.visit.

Visits the header of the class.

Parameters
version:int

the class version. The minor version is stored in the 16 most significant bits, and the major version in the 16 least significant bits.

access:int

the class's access flags (see Opcodes). This parameter also indicates if the class is deprecated Opcodes#ACC_DEPRECATED or a record Opcodes#ACC_RECORD.

name:String

the internal name of the class (see Type#getInternalName()).

signature:String

the signature of this class. May be null if the class is not a generic one, and does not extend or implement generic classes or interfaces.

superName:String

the internal of name of the super class (see Type#getInternalName()). For interfaces, the super class is Object. May be null, but only for the Object class.

interfaces:String[]

the internal names of the class's interfaces (see Type#getInternalName()). May be null.

Annotations
@Override
visitMethodback to summary
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)

Overrides org.springframework.asm.ClassVisitor.visitMethod.

Doc from org.springframework.asm.ClassVisitor.visitMethod.

Visits a method of the class. This method must return a new MethodVisitor instance (or null) each time it is called, i.e., it should not return a previously returned visitor.

Parameters
access:int

the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.

name:String

the method's name.

desc:String

the method's descriptor (see Type).

signature:String

the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.

exceptions:String[]

the internal names of the method's exception classes (see Type#getInternalName()). May be null.

Returns:MethodVisitor

an object to visit the byte code of the method, or null if this class visitor is not interested in visiting the code of this method.

Annotations
@Override