Module org.glavo.classfile
Package org.glavo.classfile.components
Record Class ClassRemapper.ClassRemapperImpl
java.lang.Object
java.lang.Record
org.glavo.classfile.components.ClassRemapper.ClassRemapperImpl
- All Implemented Interfaces:
ClassfileTransform<ClassTransform,,ClassElement, ClassBuilder> ClassTransform,ClassRemapper
- Enclosing interface:
ClassRemapper
public static record ClassRemapper.ClassRemapperImpl(Function<ClassDesc,ClassDesc> mapFunction)
extends Record
implements ClassRemapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glavo.classfile.ClassfileTransform
ClassfileTransform.ResolvedTransform<E extends ClassfileElement>Nested classes/interfaces inherited from interface org.glavo.classfile.components.ClassRemapper
ClassRemapper.ClassRemapperImpl -
Field Summary
Fields inherited from interface org.glavo.classfile.ClassTransform
ACCEPT_ALL -
Constructor Summary
ConstructorsConstructorDescriptionClassRemapperImpl(Function<ClassDesc, ClassDesc> mapFunction) Creates an instance of aClassRemapperImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ClassBuilder clb, ClassElement cle) Transform an element by taking the appropriate actions on the builder.Returns thisClassRemapperasCodeTransforminstanceReturns thisClassRemapperasFieldTransforminstanceReturns thisClassRemapperasMethodTransforminstancefinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Access method to internal class mapping function.Returns the value of themapFunctionrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glavo.classfile.ClassfileTransform
atEnd, atStartMethods inherited from interface org.glavo.classfile.components.ClassRemapper
remapClassMethods inherited from interface org.glavo.classfile.ClassTransform
andThen, resolve
-
Constructor Details
-
ClassRemapperImpl
Creates an instance of aClassRemapperImplrecord class.- Parameters:
mapFunction- the value for themapFunctionrecord component
-
-
Method Details
-
accept
Description copied from interface:ClassfileTransformTransform an element by taking the appropriate actions on the builder. Used when transforming a classfile entity (class, method, field, method body.) If no transformation is desired, the element can be presented toClassfileBuilder.with(ClassfileElement). If the element is to be dropped, no action is required.- Specified by:
acceptin interfaceClassfileTransform<ClassTransform,ClassElement, ClassBuilder> - Parameters:
clb- the builder for the new entitycle- the element
-
asFieldTransform
Description copied from interface:ClassRemapperReturns thisClassRemapperasFieldTransforminstance- Specified by:
asFieldTransformin interfaceClassRemapper- Returns:
- this
ClassRemapperasFieldTransforminstance
-
asMethodTransform
Description copied from interface:ClassRemapperReturns thisClassRemapperasMethodTransforminstance- Specified by:
asMethodTransformin interfaceClassRemapper- Returns:
- this
ClassRemapperasMethodTransforminstance
-
asCodeTransform
Description copied from interface:ClassRemapperReturns thisClassRemapperasCodeTransforminstance- Specified by:
asCodeTransformin interfaceClassRemapper- Returns:
- this
ClassRemapperasCodeTransforminstance
-
map
Description copied from interface:ClassRemapperAccess method to internal class mapping function.- Specified by:
mapin interfaceClassRemapper- Parameters:
desc- source class- Returns:
- class target class
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
mapFunction
Returns the value of themapFunctionrecord component.- Returns:
- the value of the
mapFunctionrecord component
-