| Modifier and Type | Class and Description |
|---|---|
| public static interface | RenamingPlugin.
A renaming function tho transform a type's binary name. |
| protected static class | RenamingPlugin.
An ASM |
| Modifier and Type | Field and Description |
|---|---|
| private final ElementMatcher | matcher
A matcher that determines what types to consider for renaming. |
| private final RenamingPlugin. | renaming
The renaming to apply. |
| Access | Constructor and Description |
|---|---|
| public | RenamingPlugin(String
The pattern to consider. pattern, String The replacement to apply if the supplied pattern is matched. replacement)Creates a renaming plugin for a given regular expression and replacement that applies to all types. |
| public | RenamingPlugin(String
The pattern to consider. pattern, String The replacement to apply if the supplied pattern is matched. replacement, String The prefix for types to consider for renaming. prefix)Creates a renaming plugin for a given regular expression and replacement that applies to all types that start with a given prefix. |
| public | RenamingPlugin(RenamingPlugin.
The renaming to apply. renamingCreates a renaming plugin for the given renaming that applies to all types. |
| public | RenamingPlugin(RenamingPlugin.
The renaming to apply. renaming,A matcher that determines what types to consider for renaming. matcher)Creates a renaming plugin for the given renaming and type matcher. |
| Modifier and Type | Method and Description |
|---|---|
| public DynamicType. | apply(DynamicType.
The builder to use as a basis for the applied transformation. builder,The type being transformed. typeDescription, ClassFileLocator A class file locator that can locate other types in the scope of the project. classFileLocator)Implements org. |
| public void | close()
Implements java. |
| public boolean | matches(TypeDescription
The instance to be matched or target)null.Implements org. |
| public ClassVisitor | wrap(TypeDescription
The instrumented type. instrumentedType, ClassVisitor A classVisitor, Implementation.ClassVisitor to become the new primary class visitor to which the created
org. is written to.The implementation context of the current instrumentation. implementationContext,The type pool that was provided for the class creation. typePool, FieldList<FieldDescription.The instrumented type's fields. fields,The instrumented type's methods non-ignored declared and virtually inherited methods. methods, int The ASM writerFlags, int org. flags to consider.The ASM readerFlags)org. flags to consider.Implements org. ClassVisitorWrapper to the creation of a org..
|
| matcher | back to summary |
|---|---|
| private final ElementMatcher<? super TypeDescription> matcher A matcher that determines what types to consider for renaming. | |
| renaming | back to summary |
|---|---|
| private final RenamingPlugin. The renaming to apply. | |
| RenamingPlugin | back to summary |
|---|---|
| public RenamingPlugin(String pattern, String replacement) Creates a renaming plugin for a given regular expression and replacement that applies to all types. | |
| RenamingPlugin | back to summary |
|---|---|
| public RenamingPlugin(String pattern, String replacement, String prefix) Creates a renaming plugin for a given regular expression and replacement that applies to all types that start with a given prefix. | |
| RenamingPlugin | back to summary |
|---|---|
| public RenamingPlugin(RenamingPlugin. Creates a renaming plugin for the given renaming that applies to all types.
| |
| RenamingPlugin | back to summary |
|---|---|
| public RenamingPlugin(RenamingPlugin. Creates a renaming plugin for the given renaming and type matcher.
| |
| apply | back to summary |
|---|---|
| public DynamicType. Implements org. Doc from org. Applies this plugin.
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in | |
| matches | back to summary |
|---|---|
| public boolean matches(TypeDescription target) Implements org. Doc from org. Matches a target against this element matcher.
| |
| wrap | back to summary |
|---|---|
| public ClassVisitor wrap(TypeDescription instrumentedType, ClassVisitor classVisitor, Implementation. Implements org. Doc from org. Applies a
| |
| Modifier and Type | Class and Description |
|---|---|
| public static class | RenamingPlugin.
A compound renaming. |
| public static class | RenamingPlugin.
A renaming that renames types by a given regular expression. |
| public static enum | RenamingPlugin.
A non-operational renaming. |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| apply | back to summary |
|---|---|
| public String apply(String name) Applies a renaming. | |
| Modifier and Type | Field and Description |
|---|---|
| private final List | renamings
The renamings to apply. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Compound(List<? extends RenamingPlugin.
The renamings to apply. renamings)Creates a new compound renaming. |
| Modifier and Type | Method and Description |
|---|---|
| public String | apply(String
The previous name. name)Implements org. |
| renamings | back to summary |
|---|---|
| private final List<RenamingPlugin. The renamings to apply. | |
| Compound | back to summary |
|---|---|
| public Compound(RenamingPlugin. Creates a new compound renaming.
| |
| Compound | back to summary |
|---|---|
| public Compound(List<? extends RenamingPlugin. Creates a new compound renaming.
| |
| apply | back to summary |
|---|---|
| public String apply(String name) Implements org. Doc from org. Applies a renaming. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Pattern | pattern
The regular expression to use. |
| private final String | replacement
The replacement to apply. |
| Access | Constructor and Description |
|---|---|
| public | ForPattern(Pattern
The regular expression to use. pattern, String The replacement to apply. replacement)Creates a new renaming for a regular expression. |
| Modifier and Type | Method and Description |
|---|---|
| public String | apply(String
The previous name. name)Implements org. |
| pattern | back to summary |
|---|---|
| private final Pattern pattern The regular expression to use. | |
| replacement | back to summary |
|---|---|
| private final String replacement The replacement to apply. | |
| ForPattern | back to summary |
|---|---|
| public ForPattern(Pattern pattern, String replacement) Creates a new renaming for a regular expression. | |
| apply | back to summary |
|---|---|
| public String apply(String name) Implements org. Doc from org. Applies a renaming. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final RenamingPlugin. | INSTANCE
The singleton instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | apply(String
The previous name. name)Implements org. |
| public static RenamingPlugin. | |
| public static RenamingPlugin. |
| INSTANCE | back to summary |
|---|---|
| public static final RenamingPlugin. The singleton instance. | |
| NoOp | back to summary |
|---|---|
| private NoOp() | |
| apply | back to summary |
|---|---|
| public String apply(String name) Implements org. Doc from org. Applies a renaming. | |
| valueOf | back to summary |
|---|---|
| public static RenamingPlugin. | |
| values | back to summary |
|---|---|
| public static RenamingPlugin. | |
Remapper to apply renamings.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | cache
A cache of previously applied renamings. |
| private final RenamingPlugin. | renaming
The renaming to apply. |
| Access | Constructor and Description |
|---|---|
| protected | RenamingRemapper(RenamingPlugin.
The renaming to apply. renamingCreates a new renaming remapper. |
| Modifier and Type | Method and Description |
|---|---|
| public String | map(String
the internal name of a class (see internalName)Type#getInternalName()).Overrides org. |
| cache | back to summary |
|---|---|
| private final Map<String, String> cache A cache of previously applied renamings. | |
| renaming | back to summary |
|---|---|
| private final RenamingPlugin. The renaming to apply. | |
| RenamingRemapper | back to summary |
|---|---|
| protected RenamingRemapper(RenamingPlugin. Creates a new renaming remapper.
| |
| map | back to summary |
|---|---|
| public String map(String internalName) Overrides org. Doc from org. Maps the internal name of a class to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.
| |