/** * Creates a constructor strategy for invoking a super constructor with default arguments. */ public ForDefaultConstructor() { this(any()); }
/** * Creates a constructor strategy for invoking a super constructor with default arguments. * * @param methodAttributeAppenderFactory The method attribute appender factory to apply. */ public ForDefaultConstructor(MethodAttributeAppender.Factory methodAttributeAppenderFactory) { this(any(), methodAttributeAppenderFactory); }
/** * Creates a new {@link net.bytebuddy.agent.builder.AgentBuilder.RawMatcher} that only matches the * supplied {@link TypeDescription} against a supplied matcher. * * @param typeMatcher The type matcher to apply to a {@link TypeDescription}. */ public ForElementMatchers(ElementMatcher<? super TypeDescription> typeMatcher) { this(typeMatcher, any()); }
/** * Creates a new {@link net.bytebuddy.agent.builder.AgentBuilder.RawMatcher} that only matches the * supplied {@link TypeDescription} and its {@link java.lang.ClassLoader} against two matcher in order * to decided if an instrumentation should be conducted. * * @param typeMatcher The type matcher to apply to a {@link TypeDescription}. * @param classLoaderMatcher The class loader matcher to apply to a {@link java.lang.ClassLoader}. */ public ForElementMatchers(ElementMatcher<? super TypeDescription> typeMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) { this(typeMatcher, classLoaderMatcher, any()); }
public SubclassBytecodeGenerator(SubclassLoader loader) { this(loader, null, any()); }
/** * Adjusts any method's or constructor's modifiers. * * @param modifierContributors The modifier contributors to enforce. * @return A new modifier adjustment that enforces the given modifier contributors and any previous adjustments. */ public ModifierAdjustment withInvokableModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors) { return withInvokableModifiers(any(), modifierContributors); }
/** * {@inheritDoc} */ public Ignored ignore(ElementMatcher<? super TypeDescription> typeMatcher) { return ignore(typeMatcher, any()); }
/** * {@inheritDoc} */ public AgentBuilder withResubmission(RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler) { return withResubmission(resubmissionScheduler, any()); }
/** * Adjusts any method's modifiers. * * @param modifierContributors The modifier contributors to enforce. * @return A new modifier adjustment that enforces the given modifier contributors and any previous adjustments. */ public ModifierAdjustment withMethodModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors) { return withMethodModifiers(any(), modifierContributors); }
/** * {@inheritDoc} */ public S and(ElementMatcher<? super TypeDescription> typeMatcher) { return and(typeMatcher, any()); }
/** * {@inheritDoc} */ public S or(ElementMatcher<? super TypeDescription> typeMatcher) { return or(typeMatcher, any()); }
/** * {@inheritDoc} */ public Identified.Narrowable type(ElementMatcher<? super TypeDescription> typeMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) { return type(typeMatcher, classLoaderMatcher, any()); }
/** * Adjusts any field's modifiers. * * @param modifierContributors The modifier contributors to enforce. * @return A new modifier adjustment that enforces the given modifier contributors and any previous adjustments. */ public ModifierAdjustment withFieldModifiers(List<? extends ModifierContributor.ForField> modifierContributors) { return withFieldModifiers(any(), modifierContributors); }
/** * Adjusts any constructor's modifiers. * * @param modifierContributors The modifier contributors to enforce. * @return A new modifier adjustment that enforces the given modifier contributors and any previous adjustments. */ public ModifierAdjustment withConstructorModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors) { return withConstructorModifiers(any(), modifierContributors); }
/** * {@inheritDoc} */ public Ignored ignore(ElementMatcher<? super TypeDescription> typeMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) { return ignore(typeMatcher, classLoaderMatcher, any()); }
/** * {@inheritDoc} */ public S and(ElementMatcher<? super TypeDescription> typeMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) { return and(typeMatcher, classLoaderMatcher, any()); }
/** * {@inheritDoc} */ public S or(ElementMatcher<? super TypeDescription> typeMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) { return or(typeMatcher, classLoaderMatcher, any()); }
/** * {@inheritDoc} */ public Identified.Narrowable type(ElementMatcher<? super TypeDescription> typeMatcher) { return type(typeMatcher, any()); }
/** * Adjusts any instrumented type's modifiers. * * @param modifierContributors The modifier contributors to enforce. * @return A new modifier adjustment that enforces the given modifier contributors and any previous adjustments. */ public ModifierAdjustment withTypeModifiers(List<? extends ModifierContributor.ForType> modifierContributors) { return withTypeModifiers(any(), modifierContributors); }
/** * {@inheritDoc} */ public ElementMatcher<? super S> resolve(TypeDescription typeDescription) { ElementMatcher.Junction<S> matcher = any(); for (LatentMatcher<? super S> latentMatcher : matchers) { matcher = matcher.and(latentMatcher.resolve(typeDescription)); } return matcher; } }