Java Code Examples for net.bytebuddy.dynamic.scaffold.MethodGraph#Linked

The following examples show how to use net.bytebuddy.dynamic.scaffold.MethodGraph#Linked . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MethodCallProxy.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public MethodGraph.Linked compile(TypeDescription typeDescription) {
    return compile(typeDescription, typeDescription);
}
 
Example 2
Source File: MethodCallProxy.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public MethodGraph.Linked compile(TypeDefinition typeDefinition, TypeDescription viewPoint) {
    return methodGraph;
}
 
Example 3
Source File: SubclassImplementationTarget.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public Implementation.Target make(TypeDescription instrumentedType, MethodGraph.Linked methodGraph, ClassFileVersion classFileVersion) {
    return new SubclassImplementationTarget(instrumentedType, methodGraph, DefaultMethodInvocation.of(classFileVersion), originTypeResolver);
}
 
Example 4
Source File: RebaseImplementationTarget.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public Implementation.Target make(TypeDescription instrumentedType, MethodGraph.Linked methodGraph, ClassFileVersion classFileVersion) {
    return RebaseImplementationTarget.of(instrumentedType, methodGraph, classFileVersion, methodRebaseResolver);
}
 
Example 5
Source File: SubclassImplementationTarget.java    From byte-buddy with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new subclass implementation target.
 *
 * @param instrumentedType        The instrumented type.
 * @param methodGraph             A method graph of the instrumented type.
 * @param defaultMethodInvocation The default method invocation mode to apply.
 * @param originTypeResolver      A resolver for the origin type.
 */
protected SubclassImplementationTarget(TypeDescription instrumentedType,
                                       MethodGraph.Linked methodGraph,
                                       DefaultMethodInvocation defaultMethodInvocation,
                                       OriginTypeResolver originTypeResolver) {
    super(instrumentedType, methodGraph, defaultMethodInvocation);
    this.originTypeResolver = originTypeResolver;
}
 
Example 6
Source File: RebaseImplementationTarget.java    From byte-buddy with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a rebase implementation target.
 *
 * @param instrumentedType        The instrumented type.
 * @param methodGraph             A method graph of the instrumented type.
 * @param defaultMethodInvocation The default method invocation mode to apply.
 * @param rebaseableMethods       A mapping of the instrumented type's declared methods by each method's token.
 */
protected RebaseImplementationTarget(TypeDescription instrumentedType,
                                     MethodGraph.Linked methodGraph,
                                     DefaultMethodInvocation defaultMethodInvocation,
                                     Map<MethodDescription.SignatureToken, MethodRebaseResolver.Resolution> rebaseableMethods) {
    super(instrumentedType, methodGraph, defaultMethodInvocation);
    this.rebaseableMethods = rebaseableMethods;
}
 
Example 7
Source File: RebaseImplementationTarget.java    From byte-buddy with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new rebase implementation target.
 *
 * @param instrumentedType     The instrumented type.
 * @param methodGraph          A method graph of the instrumented type.
 * @param classFileVersion     The type's class file version.
 * @param methodRebaseResolver A method rebase resolver to be used when calling a rebased method.
 * @return An implementation target for the given input.
 */
protected static Implementation.Target of(TypeDescription instrumentedType,
                                          MethodGraph.Linked methodGraph,
                                          ClassFileVersion classFileVersion,
                                          MethodRebaseResolver methodRebaseResolver) {
    return new RebaseImplementationTarget(instrumentedType, methodGraph, DefaultMethodInvocation.of(classFileVersion), methodRebaseResolver.asTokenMap());
}
 
Example 8
Source File: Implementation.java    From byte-buddy with Apache License 2.0 2 votes vote down vote up
/**
 * Creates an implementation target.
 *
 * @param instrumentedType The instrumented type.
 * @param methodGraph      A method graph of the instrumented type.
 * @param classFileVersion The type's class file version.
 * @return An implementation target for the instrumented type.
 */
Target make(TypeDescription instrumentedType, MethodGraph.Linked methodGraph, ClassFileVersion classFileVersion);
 
Example 9
Source File: Implementation.java    From byte-buddy with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new implementation target.
 *
 * @param instrumentedType        The instrumented type.
 * @param methodGraph             The instrumented type's method graph.
 * @param defaultMethodInvocation The default method invocation mode to apply.
 */
protected AbstractBase(TypeDescription instrumentedType, MethodGraph.Linked methodGraph, DefaultMethodInvocation defaultMethodInvocation) {
    this.instrumentedType = instrumentedType;
    this.methodGraph = methodGraph;
    this.defaultMethodInvocation = defaultMethodInvocation;
}