@HashCodeAndEqualsPlugin.Enhance public static class MemberSubstitution.WithoutSpecification.ForMatchedField extends MemberSubstitution.WithoutSpecification
MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement, MemberSubstitution.WithoutSpecification.ForMatchedField, MemberSubstitution.WithoutSpecification.ForMatchedMethodmethodGraphCompiler, strict, substitution, typePoolResolver| Modifier | Constructor and Description |
|---|---|
protected |
ForMatchedField(MethodGraph.Compiler methodGraphCompiler,
MemberSubstitution.TypePoolResolver typePoolResolver,
boolean strict,
MemberSubstitution.Substitution substitution,
ElementMatcher<? super FieldDescription.InDefinedShape> matcher)
Creates a new member substitution for a matched field that requires a specification for how to perform a substitution.
|
protected |
ForMatchedField(MethodGraph.Compiler methodGraphCompiler,
MemberSubstitution.TypePoolResolver typePoolResolver,
boolean strict,
MemberSubstitution.Substitution substitution,
ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
boolean matchRead,
boolean matchWrite)
Creates a new member substitution for a matched field 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.
|
MemberSubstitution.WithoutSpecification |
onRead()
When invoked, only read access of the previously matched field is substituted.
|
MemberSubstitution.WithoutSpecification |
onWrite()
When invoked, only write access of the previously matched field is substituted.
|
replaceWith, replaceWith, replaceWith, replaceWith, stubprotected ForMatchedField(MethodGraph.Compiler methodGraphCompiler, MemberSubstitution.TypePoolResolver typePoolResolver, boolean strict, MemberSubstitution.Substitution substitution, ElementMatcher<? super FieldDescription.InDefinedShape> matcher)
methodGraphCompiler - The method graph compiler to use.typePoolResolver - The type pool resolver 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 field that should be substituted.protected ForMatchedField(MethodGraph.Compiler methodGraphCompiler, MemberSubstitution.TypePoolResolver typePoolResolver, boolean strict, MemberSubstitution.Substitution substitution, ElementMatcher<? super FieldDescription.InDefinedShape> matcher, boolean matchRead, boolean matchWrite)
methodGraphCompiler - The method graph compiler to use.typePoolResolver - The type pool resolver 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 field that should be substituted.matchRead - true if read access to a field should be substituted.matchWrite - true if write access to a field should be substituted.public MemberSubstitution.WithoutSpecification onRead()
public MemberSubstitution.WithoutSpecification onWrite()
protected MemberSubstitution.Substitution doStub()
MemberSubstitution.WithoutSpecificationdoStub in class MemberSubstitution.WithoutSpecificationprotected MemberSubstitution.Substitution doReplaceWith(FieldDescription fieldDescription)
MemberSubstitution.WithoutSpecificationdoReplaceWith in class MemberSubstitution.WithoutSpecificationfieldDescription - The field to access.protected MemberSubstitution.Substitution doReplaceWith(MethodDescription methodDescription)
MemberSubstitution.WithoutSpecificationdoReplaceWith in class MemberSubstitution.WithoutSpecificationmethodDescription - The method to invoke.Copyright © 2014–2018. All rights reserved.