protected static class MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement extends MemberSubstitution.WithoutSpecification
MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement, MemberSubstitution.WithoutSpecification.ForMatchedField, MemberSubstitution.WithoutSpecification.ForMatchedMethod
methodGraphCompiler, strict, substitution
Modifier | Constructor and Description |
---|---|
protected |
ForMatchedByteCodeElement(MethodGraph.Compiler methodGraphCompiler,
boolean strict,
MemberSubstitution.Substitution substitution,
ElementMatcher<? super ByteCodeElement> matcher)
Creates a new member substitution for a matched byte code element that requires a specification for how to perform a substitution.
|
Modifier and Type | Method and Description |
---|---|
protected MemberSubstitution.Substitution |
doReplaceWith(FieldDescription fieldDescription)
Creates a substitution for replacing the byte code elements matched by this instance with an access of the specified field.
|
protected MemberSubstitution.Substitution |
doReplaceWith(MethodDescription methodDescription)
Creates a substitution for replacing the byte code elements matched by this instance with an invocation of the specified method.
|
protected MemberSubstitution.Substitution |
doStub()
Applies the stubbing for this instance.
|
replaceWith, replaceWith, replaceWith, replaceWith, stub
protected ForMatchedByteCodeElement(MethodGraph.Compiler methodGraphCompiler, boolean strict, MemberSubstitution.Substitution substitution, ElementMatcher<? super ByteCodeElement> matcher)
methodGraphCompiler
- The method graph compiler to use.strict
- true
if the method processing should be strict where an exception is raised if a member cannot be found.substitution
- The substitution to apply.matcher
- A matcher for any byte code elements that should be substituted.protected MemberSubstitution.Substitution doStub()
MemberSubstitution.WithoutSpecification
doStub
in class MemberSubstitution.WithoutSpecification
protected MemberSubstitution.Substitution doReplaceWith(FieldDescription fieldDescription)
MemberSubstitution.WithoutSpecification
doReplaceWith
in class MemberSubstitution.WithoutSpecification
fieldDescription
- The field to access.protected MemberSubstitution.Substitution doReplaceWith(MethodDescription methodDescription)
MemberSubstitution.WithoutSpecification
doReplaceWith
in class MemberSubstitution.WithoutSpecification
methodDescription
- The method to invoke.Copyright © 2014–2017. All rights reserved.