Java Code Examples for net.bytebuddy.implementation.bytecode.ByteCodeAppender#Compound

The following examples show how to use net.bytebuddy.implementation.bytecode.ByteCodeAppender#Compound . 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: Implementation.java    From byte-buddy with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public ByteCodeAppender appender(Target implementationTarget) {
    ByteCodeAppender[] byteCodeAppender = new ByteCodeAppender[implementations.size()];
    int index = 0;
    for (Implementation implementation : implementations) {
        byteCodeAppender[index++] = implementation.appender(implementationTarget);
    }
    return new ByteCodeAppender.Compound(byteCodeAppender);
}
 
Example 2
Source File: Implementation.java    From byte-buddy with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public ByteCodeAppender appender(Target implementationTarget) {
    ByteCodeAppender[] byteCodeAppender = new ByteCodeAppender[implementations.size() + 1];
    int index = 0;
    for (Implementation implementation : implementations) {
        byteCodeAppender[index++] = implementation.appender(implementationTarget);
    }
    byteCodeAppender[index] = composable.appender(implementationTarget);
    return new ByteCodeAppender.Compound(byteCodeAppender);
}
 
Example 3
Source File: InlineDirtyCheckingHandler.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public ByteCodeAppender appender(Target implementationTarget) {
	return new ByteCodeAppender.Compound( this, delegate.appender( implementationTarget ) );
}
 
Example 4
Source File: Implementation.java    From byte-buddy with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new simple implementation for the given byte code appenders.
 *
 * @param byteCodeAppender The byte code appenders to apply in their order of application.
 */
public Simple(ByteCodeAppender... byteCodeAppender) {
    this.byteCodeAppender = new ByteCodeAppender.Compound(byteCodeAppender);
}