public class JNIWriter extends Object
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Field and Description |
---|---|
protected static Context.Key<JNIWriter> |
jniWriterKey |
Modifier and Type | Method and Description |
---|---|
protected String |
cppGuardBegin() |
protected String |
cppGuardEnd() |
protected String |
defineForStatic(TypeElement c,
VariableElement f) |
protected String |
fileTop() |
protected String |
guardBegin(String cname) |
protected String |
guardEnd(String cname) |
protected String |
includes() |
static JNIWriter |
instance(Context context)
Get the ClassWriter instance for this context.
|
protected String |
jniType(TypeMirror t) |
boolean |
needsHeader(Symbol.ClassSymbol c) |
protected void |
print(Writer out,
String text) |
protected void |
println(Writer out,
String text) |
FileObject |
write(Symbol.ClassSymbol c)
Emit a class file for a given class.
|
void |
write(Writer out,
Symbol.ClassSymbol sym) |
protected void |
writeMethods(Writer out,
Symbol.ClassSymbol sym,
String cname) |
protected void |
writeStatics(Writer out,
Symbol.ClassSymbol sym) |
protected static final Context.Key<JNIWriter> jniWriterKey
public static JNIWriter instance(Context context)
public boolean needsHeader(Symbol.ClassSymbol c)
public FileObject write(Symbol.ClassSymbol c) throws IOException
c
- The class from which a class file is generated.IOException
public void write(Writer out, Symbol.ClassSymbol sym) throws IOException
IOException
protected void writeStatics(Writer out, Symbol.ClassSymbol sym) throws IOException
IOException
protected String defineForStatic(TypeElement c, VariableElement f)
protected void writeMethods(Writer out, Symbol.ClassSymbol sym, String cname) throws IOException, com.sun.tools.javac.jvm.JNIWriter.TypeSignature.SignatureException
IOException
com.sun.tools.javac.jvm.JNIWriter.TypeSignature.SignatureException
protected final String jniType(TypeMirror t)
protected String fileTop()
protected String includes()
protected String cppGuardBegin()
protected String cppGuardEnd()
protected void print(Writer out, String text) throws IOException
IOException
protected void println(Writer out, String text) throws IOException
IOException
Copyright © 2017 earcam. All rights reserved.