private static void generateGetChannelCountMethod(ClassDefinition classDefinition, int outputChannelCount) { classDefinition.declareMethod( a(PUBLIC), "getChannelCount", type(int.class)) .getBody() .push(outputChannelCount) .retInt(); }
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();
public BytecodeBlock ret(Class<?> type) { if (type == long.class) { retLong(); } else if (type == boolean.class) { retBoolean(); } else if (type == int.class || type == byte.class || type == char.class || type == short.class) { retInt(); } else if (type == float.class) { retFloat(); } else if (type == double.class) { retDouble(); } else if (type == void.class) { ret(); } else if (!type.isPrimitive()) { retObject(); } else { throw new IllegalArgumentException("Unsupported type: " + type.getName()); } return this; }
private static void generateGetChannelCountMethod(ClassDefinition classDefinition, int outputChannelCount) { classDefinition.declareMethod( a(PUBLIC), "getChannelCount", type(int.class)) .getBody() .push(outputChannelCount) .retInt(); }
private static void generateGetChannelCountMethod(ClassDefinition classDefinition, int outputChannelCount) { classDefinition.declareMethod( a(PUBLIC), "getChannelCount", type(int.class)) .getBody() .push(outputChannelCount) .retInt(); }
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();
.getBody() .push(true) .retInt();