@HashCodeAndEqualsPlugin.Enhance public static class ConstructorStrategy.ForDefaultConstructor extends Object implements ConstructorStrategy
ConstructorStrategy.Default, ConstructorStrategy.ForDefaultConstructor
Constructor and Description |
---|
ForDefaultConstructor()
Creates a constructor strategy for invoking a super constructor with default arguments.
|
ForDefaultConstructor(ElementMatcher<? super MethodDescription> elementMatcher)
Creates a constructor strategy for invoking a super constructor with default arguments.
|
ForDefaultConstructor(ElementMatcher<? super MethodDescription> elementMatcher,
MethodAttributeAppender.Factory methodAttributeAppenderFactory)
Creates a constructor strategy for invoking a super constructor with default arguments.
|
ForDefaultConstructor(MethodAttributeAppender.Factory methodAttributeAppenderFactory)
Creates a constructor strategy for invoking a super constructor with default arguments.
|
Modifier and Type | Method and Description |
---|---|
List<MethodDescription.Token> |
extractConstructors(TypeDescription instrumentedType)
Extracts constructors for a given super type.
|
MethodRegistry |
inject(TypeDescription instrumentedType,
MethodRegistry methodRegistry)
Returns a method registry that is capable of creating byte code for the constructors that were
provided by the
ConstructorStrategy.extractConstructors(TypeDescription)
method of this instance. |
public ForDefaultConstructor()
public ForDefaultConstructor(ElementMatcher<? super MethodDescription> elementMatcher)
elementMatcher
- A matcher to select a super constructor among possible candidates.public ForDefaultConstructor(MethodAttributeAppender.Factory methodAttributeAppenderFactory)
methodAttributeAppenderFactory
- The method attribute appender factory to apply.public ForDefaultConstructor(ElementMatcher<? super MethodDescription> elementMatcher, MethodAttributeAppender.Factory methodAttributeAppenderFactory)
elementMatcher
- A matcher to select a super constructor among possible candidates.methodAttributeAppenderFactory
- The method attribute appender factory to apply.public List<MethodDescription.Token> extractConstructors(TypeDescription instrumentedType)
extractConstructors
in interface ConstructorStrategy
instrumentedType
- The type for which the constructors should be created.public MethodRegistry inject(TypeDescription instrumentedType, MethodRegistry methodRegistry)
ConstructorStrategy.extractConstructors(TypeDescription)
method of this instance.inject
in interface ConstructorStrategy
instrumentedType
- The instrumented type.methodRegistry
- The original method registry.Copyright © 2014–2020. All rights reserved.