@Test(expected = UnsupportedOperationException.class) public void testInnerClassChangeForType() throws Exception { new ByteBuddy().decorate(Foo.class).innerTypeOf(Object.class); }
public InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type) { throw new UnsupportedOperationException("Cannot change type declaration of decorated type: " + instrumentedType); }
DecoratingDynamicTypeBuilder extends DynamicType.Builder.AbstractBase<T> { public InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type) { throw new UnsupportedOperationException("Cannot change type declaration of decorated type: " + instrumentedType); } }
DecoratingDynamicTypeBuilder extends DynamicType.Builder.AbstractBase<T> { public InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type) { throw new UnsupportedOperationException("Cannot change type declaration of decorated type: " + instrumentedType); } DecoratingDynamicTypeBuilder(TypeDescription instrumentedType,
                                        ClassFileVersion classFileVersion,
                                        AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                                        AnnotationValueFilter.Factory annotationValueFilterFactory,
                                        AnnotationRetention annotationRetention,
                                        Implementation.Context.Factory implementationContextFactory,
                                        MethodGraph.Compiler methodGraphCompiler,
                                        TypeValidation typeValidation,
                                        ClassWriterStrategy classWriterStrategy,
                                        LatentMatcher<? super MethodDescription> ignoredMethods,
                                        ClassFileLocator classFileLocator); protected  DecoratingDynamicTypeBuilder(TypeDescription instrumentedType,
                                           TypeAttributeAppender typeAttributeAppender,
                                           AsmVisitorWrapper asmVisitorWrapper,
                                           ClassFileVersion classFileVersion,
                                           AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                                           AnnotationValueFilter.Factory annotationValueFilterFactory,
                                           AnnotationRetention annotationRetention,
                                           Implementation.Context.Factory implementationContextFactory,
                                           MethodGraph.Compiler methodGraphCompiler,
                                           TypeValidation typeValidation,
                                           ClassWriterStrategy classWriterStrategy,
                                           LatentMatcher<? super MethodDescription> ignoredMethods,
                                           List<DynamicType> auxiliaryTypes,
                                           ClassFileLocator classFileLocator); }
DecoratingDynamicTypeBuilder extends DynamicType.Builder.AbstractBase<T> { public InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type) { throw new UnsupportedOperationException("Cannot change type declaration of decorated type: " + instrumentedType); } DecoratingDynamicTypeBuilder(TypeDescription instrumentedType,
                                        ClassFileVersion classFileVersion,
                                        AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                                        AnnotationValueFilter.Factory annotationValueFilterFactory,
                                        AnnotationRetention annotationRetention,
                                        Implementation.Context.Factory implementationContextFactory,
                                        MethodGraph.Compiler methodGraphCompiler,
                                        TypeValidation typeValidation,
                                        ClassWriterStrategy classWriterStrategy,
                                        LatentMatcher<? super MethodDescription> ignoredMethods,
                                        ClassFileLocator classFileLocator); protected  DecoratingDynamicTypeBuilder(TypeDescription instrumentedType,
                                           TypeAttributeAppender typeAttributeAppender,
                                           AsmVisitorWrapper asmVisitorWrapper,
                                           ClassFileVersion classFileVersion,
                                           AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                                           AnnotationValueFilter.Factory annotationValueFilterFactory,
                                           AnnotationRetention annotationRetention,
                                           Implementation.Context.Factory implementationContextFactory,
                                           MethodGraph.Compiler methodGraphCompiler,
                                           TypeValidation typeValidation,
                                           ClassWriterStrategy classWriterStrategy,
                                           LatentMatcher<? super MethodDescription> ignoredMethods,
                                           List<DynamicType> auxiliaryTypes,
                                           ClassFileLocator classFileLocator); DynamicType.Builder<T> visit(AsmVisitorWrapper asmVisitorWrapper); DynamicType.Builder<T> suffix(String suffix); DynamicType.Builder<T> name(String name); DynamicType.Builder<T> modifiers(int modifiers); DynamicType.Builder<T> merge(Collection<? extends ModifierContributor.ForType> modifierContributors); DynamicType.Builder<T> topLevelType(); InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type); InnerTypeDefinition<T> innerTypeOf(MethodDescription.InDefinedShape methodDescription); DynamicType.Builder<T> declaredTypes(Collection<? extends TypeDescription> types); DynamicType.Builder<T> nestHost(TypeDescription type); DynamicType.Builder<T> nestMembers(Collection<? extends TypeDescription> types); DynamicType.Builder<T> permittedSubclass(Collection<? extends TypeDescription> types); DynamicType.Builder<T> unsealed(); DynamicType.Builder<T> attribute(TypeAttributeAppender typeAttributeAppender); DynamicType.Builder<T> annotateType(Collection<? extends AnnotationDescription> annotations); MethodDefinition.ImplementationDefinition.Optional<T> implement(Collection<? extends TypeDefinition> interfaceTypes); DynamicType.Builder<T> initializer(ByteCodeAppender byteCodeAppender); DynamicType.Builder<T> initializer(LoadedTypeInitializer loadedTypeInitializer); TypeVariableDefinition<T> typeVariable(String symbol, Collection<? extends TypeDefinition> bounds); DynamicType.Builder<T> transform(ElementMatcher<? super TypeDescription.Generic> matcher, Transformer<TypeVariableToken> transformer); FieldDefinition.Optional.Valuable<T> defineField(String name, TypeDefinition type, int modifiers); FieldDefinition.Valuable<T> field(LatentMatcher<? super FieldDescription> matcher); @SuppressWarnings("unchecked") DynamicType.Builder<T> ignoreAlso(LatentMatcher<? super MethodDescription> ignoredMethods); MethodDefinition.ParameterDefinition.Initial<T> defineMethod(String name, TypeDefinition returnType, int modifiers); MethodDefinition.ParameterDefinition.Initial<T> defineConstructor(int modifiers); MethodDefinition.ImplementationDefinition<T> invokable(LatentMatcher<? super MethodDescription> matcher); RecordComponentDefinition.Optional<T> defineRecordComponent(String name, TypeDefinition type); @Override RecordComponentDefinition<T> recordComponent(LatentMatcher<? super RecordComponentDescription> matcher); DynamicType.Builder<T> require(Collection<DynamicType> auxiliaryTypes); DynamicType.Unloaded<T> make(TypeResolutionStrategy typeResolutionStrategy); DynamicType.Unloaded<T> make(TypeResolutionStrategy typeResolutionStrategy, TypePool typePool); TypeDescription toTypeDescription(); }
DecoratingDynamicTypeBuilder extends DynamicType.Builder.AbstractBase<T> { public InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type) { throw new UnsupportedOperationException("Cannot change type declaration of decorated type: " + instrumentedType); } DecoratingDynamicTypeBuilder(TypeDescription instrumentedType,
                                        ClassFileVersion classFileVersion,
                                        AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                                        AnnotationValueFilter.Factory annotationValueFilterFactory,
                                        AnnotationRetention annotationRetention,
                                        Implementation.Context.Factory implementationContextFactory,
                                        MethodGraph.Compiler methodGraphCompiler,
                                        TypeValidation typeValidation,
                                        ClassWriterStrategy classWriterStrategy,
                                        LatentMatcher<? super MethodDescription> ignoredMethods,
                                        ClassFileLocator classFileLocator); protected  DecoratingDynamicTypeBuilder(TypeDescription instrumentedType,
                                           TypeAttributeAppender typeAttributeAppender,
                                           AsmVisitorWrapper asmVisitorWrapper,
                                           ClassFileVersion classFileVersion,
                                           AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                                           AnnotationValueFilter.Factory annotationValueFilterFactory,
                                           AnnotationRetention annotationRetention,
                                           Implementation.Context.Factory implementationContextFactory,
                                           MethodGraph.Compiler methodGraphCompiler,
                                           TypeValidation typeValidation,
                                           ClassWriterStrategy classWriterStrategy,
                                           LatentMatcher<? super MethodDescription> ignoredMethods,
                                           List<DynamicType> auxiliaryTypes,
                                           ClassFileLocator classFileLocator); DynamicType.Builder<T> visit(AsmVisitorWrapper asmVisitorWrapper); DynamicType.Builder<T> suffix(String suffix); DynamicType.Builder<T> name(String name); DynamicType.Builder<T> modifiers(int modifiers); DynamicType.Builder<T> merge(Collection<? extends ModifierContributor.ForType> modifierContributors); DynamicType.Builder<T> topLevelType(); InnerTypeDefinition.ForType<T> innerTypeOf(TypeDescription type); InnerTypeDefinition<T> innerTypeOf(MethodDescription.InDefinedShape methodDescription); DynamicType.Builder<T> declaredTypes(Collection<? extends TypeDescription> types); DynamicType.Builder<T> nestHost(TypeDescription type); DynamicType.Builder<T> nestMembers(Collection<? extends TypeDescription> types); DynamicType.Builder<T> permittedSubclass(Collection<? extends TypeDescription> types); DynamicType.Builder<T> unsealed(); DynamicType.Builder<T> attribute(TypeAttributeAppender typeAttributeAppender); DynamicType.Builder<T> annotateType(Collection<? extends AnnotationDescription> annotations); MethodDefinition.ImplementationDefinition.Optional<T> implement(Collection<? extends TypeDefinition> interfaceTypes); DynamicType.Builder<T> initializer(ByteCodeAppender byteCodeAppender); DynamicType.Builder<T> initializer(LoadedTypeInitializer loadedTypeInitializer); TypeVariableDefinition<T> typeVariable(String symbol, Collection<? extends TypeDefinition> bounds); DynamicType.Builder<T> transform(ElementMatcher<? super TypeDescription.Generic> matcher, Transformer<TypeVariableToken> transformer); FieldDefinition.Optional.Valuable<T> defineField(String name, TypeDefinition type, int modifiers); FieldDefinition.Valuable<T> field(LatentMatcher<? super FieldDescription> matcher); @SuppressWarnings("unchecked") DynamicType.Builder<T> ignoreAlso(LatentMatcher<? super MethodDescription> ignoredMethods); MethodDefinition.ParameterDefinition.Initial<T> defineMethod(String name, TypeDefinition returnType, int modifiers); MethodDefinition.ParameterDefinition.Initial<T> defineConstructor(int modifiers); MethodDefinition.ImplementationDefinition<T> invokable(LatentMatcher<? super MethodDescription> matcher); RecordComponentDefinition.Optional<T> defineRecordComponent(String name, TypeDefinition type); @Override RecordComponentDefinition<T> recordComponent(LatentMatcher<? super RecordComponentDescription> matcher); DynamicType.Builder<T> require(Collection<DynamicType> auxiliaryTypes); DynamicType.Unloaded<T> make(TypeResolutionStrategy typeResolutionStrategy); DynamicType.Unloaded<T> make(TypeResolutionStrategy typeResolutionStrategy, TypePool typePool); TypeDescription toTypeDescription();  }