< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/JType.java

Print this page

        

*** 20,39 **** * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.tools.jextract; - import jdk.internal.org.objectweb.asm.ClassVisitor; import java.foreign.memory.Callback; import java.foreign.memory.Pointer; import java.util.Objects; - import static jdk.internal.org.objectweb.asm.Opcodes.ACC_ABSTRACT; - import static jdk.internal.org.objectweb.asm.Opcodes.ACC_INTERFACE; - import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC; - import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC; - /** * A Java Type descriptor */ public abstract class JType { --- 20,33 ----
*** 42,52 **** * * @return The type descriptor as defined in JVMS 4.3 */ public abstract String getDescriptor(); - public void visitInner(ClassVisitor cv) {} public String getSignature(boolean isArgument) { return getDescriptor(); } public abstract String getSourceSignature(boolean isArgument); --- 36,45 ----
*** 181,198 **** return clsName.substring(packageEnd + 1); } else { return clsName; } } - - @Override - public void visitInner(ClassVisitor cv) { - if (enclosingName != null) { - cv.visitInnerClass(clsName, enclosingName, simpleName, - ACC_PUBLIC | ACC_STATIC | ACC_ABSTRACT | ACC_INTERFACE); - } - } } public final static class ArrayType extends JType { final JType elementType; --- 174,183 ----
*** 204,218 **** public String getDescriptor() { return JType.of(java.foreign.memory.Array.class).getDescriptor(); } @Override - public void visitInner(ClassVisitor cv) { - elementType.visitInner(cv); - } - - @Override public String getSignature(boolean isArgument) { StringBuilder sb = new StringBuilder(); sb.append("L"); sb.append(java.foreign.memory.Array.class.getName().replace('.', '/')); sb.append("<"); --- 189,198 ----
*** 280,297 **** public String getSourceSignature(boolean isArgument) { throw new UnsupportedOperationException(); } @Override - public void visitInner(ClassVisitor cv) { - returnType.visitInner(cv); - for (JType at : args) { - at.visitInner(cv); - } - } - - @Override public String getSignature(boolean isArgument) { StringBuilder sb = new StringBuilder(); sb.append('('); // ensure sequence for (int i = 0; i < args.length; i++) { --- 260,269 ----
*** 319,334 **** } Function getFunction() { return fn; } - - @Override - public void visitInner(ClassVisitor cv) { - fn.visitInner(cv); - super.visitInner(cv); - } } public static class GenericType extends ClassType { JType targ; --- 291,300 ----
*** 381,393 **** } public static GenericType ofCallback(JType targ) { return new GenericType(JType.binaryName(Callback.class), targ); } - - @Override - public void visitInner(ClassVisitor cv) { - targ.visitInner(cv); - super.visitInner(cv); - } } } --- 347,353 ----
< prev index next >