public static class ByteBuddy.OptionalMethodInterception extends ByteBuddy implements ByteBuddy.MethodInterceptable
ByteBuddy.Definable<T>, ByteBuddy.EnumerationImplementation, ByteBuddy.MatchedMethodInterception, ByteBuddy.MethodAnnotationTarget, ByteBuddy.MethodInterceptable, ByteBuddy.OptionalMethodInterception, ByteBuddy.Proxy| Modifier and Type | Field and Description | 
|---|---|
| protected LatentMethodMatcher | methodMatcherThe method matcher that defines the selected that is represented by this instance. | 
auxiliaryTypeNamingStrategy, BYTE_BUDDY_DEFAULT_PREFIX, BYTE_BUDDY_DEFAULT_SUFFIX, classFileVersion, classVisitorWrapperChain, defaultFieldAttributeAppenderFactory, defaultMethodAttributeAppenderFactory, ignoredMethods, interfaceTypes, methodGraphCompiler, methodRegistry, modifiers, namingStrategy, typeAttributeAppender| Modifier | Constructor and Description | 
|---|---|
| protected  | OptionalMethodInterception(ClassFileVersion classFileVersion,
                          NamingStrategy.Unbound namingStrategy,
                          AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
                          List<TypeDescription> interfaceTypes,
                          ElementMatcher<? super MethodDescription> ignoredMethods,
                          ClassVisitorWrapper.Chain classVisitorWrapperChain,
                          MethodRegistry methodRegistry,
                          ByteBuddy.Definable<Integer> modifiers,
                          TypeAttributeAppender typeAttributeAppender,
                          MethodGraph.Compiler methodGraphCompiler,
                          FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
                          MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
                          LatentMethodMatcher methodMatcher)Creates a new optional method interception. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object other) | 
| int | hashCode() | 
| ByteBuddy.MethodAnnotationTarget | intercept(Implementation implementation)Intercepts the currently selected methods with the provided implementation. | 
| String | toString() | 
| ByteBuddy.MethodAnnotationTarget | withDefaultValue(Object value)Defines a default annotation value to set for any matched method. | 
| ByteBuddy.MethodAnnotationTarget | withDefaultValue(Object value,
                Class<?> type)Defines a default annotation value to set for any matched method. | 
| ByteBuddy.MethodAnnotationTarget | withoutCode()Implements the currently selected methods as  abstractmethods. | 
constructor, getAuxiliaryTypeNamingStrategy, getClassFileVersion, getClassVisitorWrapperChain, getDefaultFieldAttributeAppenderFactory, getDefaultMethodAttributeAppenderFactory, getIgnoredMethods, getInterfaceTypes, getMethodGraphCompiler, getMethodRegistry, getModifiers, getNamingStrategy, getTypeAttributeAppender, invokable, invokable, makeAnnotation, makeEnumeration, makeEnumeration, makeInterface, makeInterface, makeInterface, makeInterface, makeInterface, makeInterface, makePackage, method, rebase, rebase, rebase, rebase, rebase, rebase, rebase, redefine, redefine, redefine, subclass, subclass, subclass, subclass, withAttribute, withClassFileVersion, withClassVisitor, withDefaultFieldAttributeAppender, withDefaultMethodAttributeAppender, withIgnoredMethods, withImplementing, withImplementing, withImplementing, withImplementing, withMethodGraphCompiler, withModifiers, withNamingStrategy, withNamingStrategy, withNamingStrategy, withTypeAnnotation, withTypeAnnotation, withTypeAnnotation, withTypeAnnotationprotected final LatentMethodMatcher methodMatcher
protected OptionalMethodInterception(ClassFileVersion classFileVersion, NamingStrategy.Unbound namingStrategy, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, List<TypeDescription> interfaceTypes, ElementMatcher<? super MethodDescription> ignoredMethods, ClassVisitorWrapper.Chain classVisitorWrapperChain, MethodRegistry methodRegistry, ByteBuddy.Definable<Integer> modifiers, TypeAttributeAppender typeAttributeAppender, MethodGraph.Compiler methodGraphCompiler, FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory, MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory, LatentMethodMatcher methodMatcher)
classFileVersion - The currently defined class file version.namingStrategy - The currently defined naming strategy.auxiliaryTypeNamingStrategy - The currently defined naming strategy for auxiliary types.interfaceTypes - The currently defined collection of interfaces to be implemented
                                              by any dynamically created type.ignoredMethods - The methods to always be ignored.
                                              process.classVisitorWrapperChain - The class visitor wrapper chain to be applied to any implementation
                                              process.methodRegistry - The currently valid method registry.modifiers - The modifiers to define for any implementation process.typeAttributeAppender - The type attribute appender to apply to any implementation process.methodGraphCompiler - The method graph compiler to use.defaultFieldAttributeAppenderFactory - The field attribute appender to apply as a default for any field
                                              definition.defaultMethodAttributeAppenderFactory - The method attribute appender to apply as a default for any
                                              method definition or implementation.methodMatcher - The method matcher representing the current method selection.public ByteBuddy.MethodAnnotationTarget intercept(Implementation implementation)
ByteBuddy.MethodInterceptableintercept in interface ByteBuddy.MethodInterceptableimplementation - The implementation to apply to the currently selected method.public ByteBuddy.MethodAnnotationTarget withoutCode()
ByteBuddy.MethodInterceptableabstract methods.withoutCode in interface ByteBuddy.MethodInterceptableabstract methods.public ByteBuddy.MethodAnnotationTarget withDefaultValue(Object value, Class<?> type)
ByteBuddy.MethodInterceptablewithDefaultValue in interface ByteBuddy.MethodInterceptablevalue - The value that the annotation property should set as a default.type - The type of the annotation property.public ByteBuddy.MethodAnnotationTarget withDefaultValue(Object value)
ByteBuddy.MethodInterceptableenum values should be handed as EnumerationDescription
 instances, annotations as AnnotationDescription instances and
 Class values as TypeDescription instances. Other values are handed in their actual form or as their wrapper types.withDefaultValue in interface ByteBuddy.MethodInterceptablevalue - A non-loaded value that the annotation property should set as a default.Copyright © 2014–2015. All rights reserved.