A visitor wrapper that adjusts the modifiers of the instrumented type or its members.
Important Note
The removal of the method is not reflected in the created org.'s
type description of the instrumented type. The modifier changes are neither visible to element matchers during an instrumentation.
net.bytebuddy.dynamic.Transformer.ForField#withModifiers(ModifierContributor.ForField...) , net.bytebuddy.dynamic.Transformer.ForMethod#withModifiers(ModifierContributor.ForMethod...)
| Modifier and Type | Class and Description |
|---|---|
| protected static class | ModifierAdjustment.
The type of the adjusted element's description. T>A description of a conditional adjustment. |
| protected static class | ModifierAdjustment.
A class visitor that enforces a collection of modifier adjustments. |
| Modifier and Type | Field and Description |
|---|---|
| private final List | fieldAdjustments
A list of adjustments to apply to the instrumented type's declared fields. |
| private final List | methodAdjustments
A list of adjustments to apply to the instrumented type's methods. |
| private final List | typeAdjustments
A list of adjustments to apply to the instrumented type. |
| Access | Constructor and Description |
|---|---|
| public | |
| protected | ModifierAdjustment(List<ModifierAdjustment.
A list of adjustments to apply to the instrumented type. typeAdjustments,A list of adjustments to apply to the instrumented type's declared fields. fieldAdjustments,A list of adjustments to apply to the instrumented type's methods. methodAdjustmentsCreates a new modifier adjustment. |
| Modifier and Type | Method and Description |
|---|---|
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributorAdjusts any constructor's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributors)Adjusts any constructor's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a constructor's modifiers should be adjusted. matcher, ModifierContributor.The modifier contributors to enforce. modifierContributorAdjusts a constructor's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a constructor's modifiers should be adjusted. matcher, List<? extends ModifierContributor.The modifier contributors to enforce. modifierContributors)Adjusts a constructor's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributorAdjusts any field's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributors)Adjusts any field's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a field's modifiers should be adjusted. matcher, ModifierContributor.The modifier contributors to enforce. modifierContributorAdjusts a field's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a field's modifiers should be adjusted. matcher, List<? extends ModifierContributor.The modifier contributors to enforce. modifierContributors)Adjusts a field's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributorAdjusts any method's or constructor's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributors)Adjusts any method's or constructor's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a method's or constructor's modifiers should be adjusted. matcher, ModifierContributor.The modifier contributors to enforce. modifierContributorAdjusts a method's or constructor's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a method's or constructor's modifiers should be adjusted. matcher, List<? extends ModifierContributor.The modifier contributors to enforce. modifierContributors)Adjusts a method's or constructor's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributorAdjusts any method's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributors)Adjusts any method's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a method's modifiers should be adjusted. matcher, ModifierContributor.The modifier contributors to enforce. modifierContributorAdjusts a method's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines if a method's modifiers should be adjusted. matcher, List<? extends ModifierContributor.The modifier contributors to enforce. modifierContributors)Adjusts a method's modifiers if it fulfills the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributorAdjusts any instrumented type's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The modifier contributors to enforce. modifierContributors)Adjusts any instrumented type's modifiers. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines a type's eligibility. matcher, ModifierContributor.The modifier contributors to enforce. modifierContributorAdjusts an instrumented type's modifiers if it matches the supplied matcher. |
| public ModifierAdjustment | Returns: A new modifier adjustment that enforces the given modifier contributors and any previous adjustments.The matcher that determines a type's eligibility. matcher, List<? extends ModifierContributor.The modifier contributors to enforce. modifierContributors)Adjusts an instrumented type's modifiers if it matches the supplied matcher. |
| public ModifierAdjustment. | 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..
|