@Test public void testTypeModifierUnqualified() throws Exception { Class<?> type = new ByteBuddy() .redefine(Sample.class) .visit(new ModifierAdjustment().withTypeModifiers(Visibility.PUBLIC)) .make() .load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER) .getLoaded(); assertThat(type.getModifiers(), is(Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC)); }
public ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor) { return withTypeModifiers(Arrays.asList(modifierContributor)); }
ModifierAdjustment extends AsmVisitorWrapper.AbstractBase { public ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor) { return withTypeModifiers(Arrays.asList(modifierContributor)); } }
ModifierAdjustment extends AsmVisitorWrapper.AbstractBase { public ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor) { return withTypeModifiers(Arrays.asList(modifierContributor)); } ModifierAdjustment(); protected  ModifierAdjustment(List<Adjustment<TypeDescription>> typeAdjustments,
                                 List<Adjustment<FieldDescription.InDefinedShape>> fieldAdjustments,
                                 List<Adjustment<MethodDescription>> methodAdjustments); }
ModifierAdjustment extends AsmVisitorWrapper.AbstractBase { public ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor) { return withTypeModifiers(Arrays.asList(modifierContributor)); } ModifierAdjustment(); protected  ModifierAdjustment(List<Adjustment<TypeDescription>> typeAdjustments,
                                 List<Adjustment<FieldDescription.InDefinedShape>> fieldAdjustments,
                                 List<Adjustment<MethodDescription>> methodAdjustments); ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor); ModifierAdjustment withTypeModifiers(List<? extends ModifierContributor.ForType> modifierContributors); ModifierAdjustment withTypeModifiers(ElementMatcher<? super TypeDescription> matcher,
                                                ModifierContributor.ForType... modifierContributor); ModifierAdjustment withTypeModifiers(ElementMatcher<? super TypeDescription> matcher,
                                                List<? extends ModifierContributor.ForType> modifierContributors); ModifierAdjustment withFieldModifiers(ModifierContributor.ForField... modifierContributor); ModifierAdjustment withFieldModifiers(List<? extends ModifierContributor.ForField> modifierContributors); ModifierAdjustment withFieldModifiers(ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
                                                 ModifierContributor.ForField... modifierContributor); ModifierAdjustment withFieldModifiers(ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
                                                 List<? extends ModifierContributor.ForField> modifierContributors); ModifierAdjustment withMethodModifiers(ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withMethodModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withMethodModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                  ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withMethodModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                  List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withConstructorModifiers(ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withConstructorModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withConstructorModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                       ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withConstructorModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                       List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withInvokableModifiers(ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withInvokableModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withInvokableModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                     ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withInvokableModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                     List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustingClassVisitor wrap(TypeDescription instrumentedType,
                                              ClassVisitor classVisitor,
                                              Implementation.Context implementationContext,
                                              TypePool typePool,
                                              FieldList<FieldDescription.InDefinedShape> fields,
                                              MethodList<?> methods,
                                              int writerFlags,
                                              int readerFlags); }
ModifierAdjustment extends AsmVisitorWrapper.AbstractBase { public ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor) { return withTypeModifiers(Arrays.asList(modifierContributor)); } ModifierAdjustment(); protected  ModifierAdjustment(List<Adjustment<TypeDescription>> typeAdjustments,
                                 List<Adjustment<FieldDescription.InDefinedShape>> fieldAdjustments,
                                 List<Adjustment<MethodDescription>> methodAdjustments); ModifierAdjustment withTypeModifiers(ModifierContributor.ForType... modifierContributor); ModifierAdjustment withTypeModifiers(List<? extends ModifierContributor.ForType> modifierContributors); ModifierAdjustment withTypeModifiers(ElementMatcher<? super TypeDescription> matcher,
                                                ModifierContributor.ForType... modifierContributor); ModifierAdjustment withTypeModifiers(ElementMatcher<? super TypeDescription> matcher,
                                                List<? extends ModifierContributor.ForType> modifierContributors); ModifierAdjustment withFieldModifiers(ModifierContributor.ForField... modifierContributor); ModifierAdjustment withFieldModifiers(List<? extends ModifierContributor.ForField> modifierContributors); ModifierAdjustment withFieldModifiers(ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
                                                 ModifierContributor.ForField... modifierContributor); ModifierAdjustment withFieldModifiers(ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
                                                 List<? extends ModifierContributor.ForField> modifierContributors); ModifierAdjustment withMethodModifiers(ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withMethodModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withMethodModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                  ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withMethodModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                  List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withConstructorModifiers(ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withConstructorModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withConstructorModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                       ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withConstructorModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                       List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withInvokableModifiers(ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withInvokableModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustment withInvokableModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                     ModifierContributor.ForMethod... modifierContributor); ModifierAdjustment withInvokableModifiers(ElementMatcher<? super MethodDescription> matcher,
                                                     List<? extends ModifierContributor.ForMethod> modifierContributors); ModifierAdjustingClassVisitor wrap(TypeDescription instrumentedType,
                                              ClassVisitor classVisitor,
                                              Implementation.Context implementationContext,
                                              TypePool typePool,
                                              FieldList<FieldDescription.InDefinedShape> fields,
                                              MethodList<?> methods,
                                              int writerFlags,
                                              int readerFlags);  }