本文整理汇总了Java中org.springframework.asm.Type.VOID_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java Type.VOID_TYPE属性的具体用法?Java Type.VOID_TYPE怎么用?Java Type.VOID_TYPE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.springframework.asm.Type
的用法示例。
在下文中一共展示了Type.VOID_TYPE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHandleMessageMethod
private void createHandleMessageMethod(ClassEmitter classEmitter) {
Signature signature = new Signature(
"handleMessage", Type.VOID_TYPE, new Type[] { MESSAGE_TYPE });
Signature subscriberMethodSignature = new Signature(
subscriberInfo.getSubscriberMethodName(),
Type.VOID_TYPE,
new Type[] { Type.getType(subscriberInfo.getEventType()) });
CodeEmitter emitter = classEmitter.begin_method(Constants.ACC_PUBLIC, signature, null);
emitter.load_this();
emitter.getfield("delegate");
emitter.load_arg(0);
emitter.invoke_interface(MESSAGE_TYPE, GETPAYLOAD_SIGNATURE);
emitter.checkcast(Type.getType(subscriberInfo.getEventType()));
emitter.invoke_virtual(Type.getType(subscriberInfo.getBeanClass()), subscriberMethodSignature);
emitter.return_value();
emitter.end_method();
}
开发者ID:unbroken-dome,项目名称:spring-integration-eventbus,代码行数:20,代码来源:CglibSubscriberProxyClassGenerator.java
示例2: emitProxy
private void emitProxy(ClassEmitter ce, final MethodInfo method) {
int modifiers = Constants.ACC_PUBLIC;
if ((method.getModifiers() & Constants.ACC_VARARGS) == Constants.ACC_VARARGS) {
modifiers |= Constants.ACC_VARARGS;
}
final CodeEmitter e = EmitUtils.begin_method(ce, method, modifiers);
Type returnType = method.getSignature().getReturnType();
final boolean returns = returnType != Type.VOID_TYPE;
Local result = null;
if (returns) {
result = e.make_local(returnType);
e.zero_or_null(returnType);
e.store_local(result);
}
e.load_this();
e.super_getfield("targets", Constants.TYPE_OBJECT_ARRAY);
final Local result2 = result;
EmitUtils.process_array(e, Constants.TYPE_OBJECT_ARRAY, new ProcessArrayCallback() {
public void processElement(Type type) {
e.checkcast(Type.getType(iface));
e.load_args();
e.invoke(method);
if (returns) {
e.store_local(result2);
}
}
});
if (returns) {
e.load_local(result);
}
e.return_value();
e.end_method();
}
示例3: createConstructor
private void createConstructor(ClassEmitter classEmitter) {
Signature signature = new Signature(
Constants.CONSTRUCTOR_NAME, Type.VOID_TYPE,
new Type[] { Type.getType(subscriberInfo.getBeanClass()) });
CodeEmitter emitter = classEmitter.begin_method(Constants.ACC_PUBLIC, signature, null);
emitter.load_this();
emitter.dup();
emitter.super_invoke_constructor();
emitter.load_arg(0);
emitter.putfield("delegate");
emitter.return_value();
emitter.end_method();
}
开发者ID:unbroken-dome,项目名称:spring-integration-eventbus,代码行数:14,代码来源:CglibSubscriberProxyClassGenerator.java