Java Code Examples for javax.lang.model.element.ExecutableElement#getSimpleName()
The following examples show how to use
javax.lang.model.element.ExecutableElement#getSimpleName() .
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: AbstractTestGenerator.java From netbeans with Apache License 2.0 | 6 votes |
/** * Checks whether the interface declare given method * * @param trgInterface interface to be declaring the method * @param srcMethod method to be declared * @return {@code true} if the method is declared by the interface, {@code false} otherwise */ private static boolean isMethodDeclaredByInterface(TypeElement trgInterface, ExecutableElement srcMethod) { List<? extends Element> enclosedElements = trgInterface.getEnclosedElements(); List<? extends VariableElement> methodParameters = srcMethod.getParameters(); for (Element enclosedElement : enclosedElements) { if (enclosedElement instanceof ExecutableElement) { ExecutableElement exElement = (ExecutableElement) enclosedElement; List<? extends VariableElement> elementParameters = exElement.getParameters(); if (srcMethod.getSimpleName() != exElement.getSimpleName() || (methodParameters.size() != elementParameters.size())) { continue; } for (int i = 0; i < methodParameters.size(); i++) { if (!((VariableElement) methodParameters.get(i)).asType().toString().equals( ((VariableElement) elementParameters.get(i)).asType().toString())) { continue; } } return true; } } return false; }
Example 2
Source File: LLNI.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected final String jniMethodName(ExecutableElement method, String cname, boolean longName) throws TypeSignature.SignatureException { String res = "Java_" + cname + "_" + method.getSimpleName(); if (longName) { TypeMirror mType = types.erasure(method.getReturnType()); List<? extends VariableElement> params = method.getParameters(); List<TypeMirror> argTypes = new ArrayList<>(); for (VariableElement param: params) { argTypes.add(types.erasure(param.asType())); } res = res + "__"; for (TypeMirror t: argTypes) { String tname = t.toString(); TypeSignature newTypeSig = new TypeSignature(elems); String sig = newTypeSig.getTypeSignature(tname); res = res + nameToIdentifier(sig); } } return res; }
Example 3
Source File: LLNI.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected final String jniMethodName(ExecutableElement method, String cname, boolean longName) throws TypeSignature.SignatureException { String res = "Java_" + cname + "_" + method.getSimpleName(); if (longName) { TypeMirror mType = types.erasure(method.getReturnType()); List<? extends VariableElement> params = method.getParameters(); List<TypeMirror> argTypes = new ArrayList<TypeMirror>(); for (VariableElement param: params) { argTypes.add(types.erasure(param.asType())); } res = res + "__"; for (TypeMirror t: argTypes) { String tname = t.toString(); TypeSignature newTypeSig = new TypeSignature(elems); String sig = newTypeSig.getTypeSignature(tname); res = res + nameToIdentifier(sig); } } return res; }
Example 4
Source File: MapKeyGenerator.java From dagger2-sample with Apache License 2.0 | 5 votes |
@Override ImmutableSet<JavaWriter> write(ClassName generatedTypeName, Element e) { JavaWriter writer = JavaWriter.inPackage(generatedTypeName.packageName()); TypeWriter mapKeyWriter = writer.addClass(generatedTypeName.simpleName()); mapKeyWriter.annotate(Generated.class).setValue(ComponentProcessor.class.getName()); mapKeyWriter.addModifiers(PUBLIC); //create map key create method, which will return an instance of map key MethodWriter getMethodWriter = mapKeyWriter.addMethod(e.asType(), "create"); //get parameter list of create method List<? extends Element> enclosingElements = e.getEnclosedElements(); List<String> paraList = new ArrayList<String>(); //Using AutoAnnotation to generate mapkey creator files later getMethodWriter.annotate(AutoAnnotation.class); getMethodWriter.addModifiers(PUBLIC, STATIC); for (Element element : enclosingElements) { if (element instanceof ExecutableElement) { ExecutableElement executableElement = (ExecutableElement) element; Name parameterName = executableElement.getSimpleName(); getMethodWriter.addParameter( (TypeElement) ((DeclaredType) (executableElement.getReturnType())).asElement(), parameterName.toString()); paraList.add(parameterName.toString()); } else { throw new IllegalStateException(); } } getMethodWriter.body().addSnippet( "return new AutoAnnotation_" + generatedTypeName.simpleName() + "_create(%s);", Joiner.on(", ").join(paraList)); return ImmutableSet.of(writer); }
Example 5
Source File: LLNI.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected final boolean needLongName(ExecutableElement method, TypeElement clazz) { Name methodName = method.getSimpleName(); for (ExecutableElement memberMethod: methods) { if ((memberMethod != method) && memberMethod.getModifiers().contains(Modifier.NATIVE) && (methodName.equals(memberMethod.getSimpleName()))) return true; } return false; }
Example 6
Source File: LLNI.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected final boolean needLongName(ExecutableElement method, TypeElement clazz) { Name methodName = method.getSimpleName(); for (ExecutableElement memberMethod: methods) { if ((memberMethod != method) && memberMethod.getModifiers().contains(Modifier.NATIVE) && (methodName.equals(memberMethod.getSimpleName()))) return true; } return false; }
Example 7
Source File: MethodFinder.java From FreeBuilder with Apache License 2.0 | 4 votes |
Signature(ExecutableElement method) { name = method.getSimpleName(); params = method.getParameters().size(); }
Example 8
Source File: JNIWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected void writeMethods(Writer out, ClassSymbol sym, String cname) throws IOException, TypeSignature.SignatureException { List<ExecutableElement> classmethods = ElementFilter.methodsIn(sym.getEnclosedElements()); for (ExecutableElement md: classmethods) { if(md.getModifiers().contains(Modifier.NATIVE)){ TypeMirror mtr = types.erasure(md.getReturnType()); String sig = signature(md); TypeSignature newtypesig = new TypeSignature(elements); CharSequence methodName = md.getSimpleName(); boolean longName = false; for (ExecutableElement md2: classmethods) { if ((md2 != md) && (methodName.equals(md2.getSimpleName())) && (md2.getModifiers().contains(Modifier.NATIVE))) longName = true; } println(out, "/*"); println(out, " * Class: " + cname); println(out, " * Method: " + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); println(out, " * Signature: " + newtypesig.getTypeSignature(sig, mtr)); println(out, " */"); println(out, "JNIEXPORT " + jniType(mtr) + " JNICALL " + mangler.mangleMethod(md, sym, (longName) ? Mangle.Type.METHOD_JNI_LONG : Mangle.Type.METHOD_JNI_SHORT)); print(out, " (JNIEnv *, "); List<? extends VariableElement> paramargs = md.getParameters(); List<TypeMirror> args = new ArrayList<TypeMirror>(); for (VariableElement p: paramargs) { args.add(types.erasure(p.asType())); } if (md.getModifiers().contains(Modifier.STATIC)) print(out, "jclass"); else print(out, "jobject"); for (TypeMirror arg: args) { print(out, ", "); print(out, jniType(arg)); } println(out, ");" + lineSep); } } }
Example 9
Source File: DumpJavaDoc.java From cxf with Apache License 2.0 | 4 votes |
@Override public boolean run(DocletEnvironment docEnv) { final Elements utils = docEnv.getElementUtils(); final DocTrees docTrees = docEnv.getDocTrees(); try (OutputStream os = Files.newOutputStream(Paths.get(dumpFileName))) { final Properties javaDocMap = new Properties(); for (Element element : docEnv.getIncludedElements()) { if (element.getKind() == ElementKind.CLASS) { final TypeElement classDoc = (TypeElement) element; final DocCommentTree classCommentTree = docTrees.getDocCommentTree(classDoc); if (classCommentTree != null) { javaDocMap.put(classDoc.toString(), getAllComments(classCommentTree.getFullBody())); } for (Element member: classDoc.getEnclosedElements()) { // Skip all non-public methods if (!member.getModifiers().contains(Modifier.PUBLIC)) { continue; } if (member.getKind() == ElementKind.METHOD) { final ExecutableElement method = (ExecutableElement) member; final DocCommentTree methodCommentTree = docTrees.getDocCommentTree(method); final String qualifiedName = utils.getBinaryName(classDoc) + "." + method.getSimpleName(); if (methodCommentTree == null) { javaDocMap.put(qualifiedName, ""); } else { javaDocMap.put(qualifiedName, getAllComments(methodCommentTree.getFullBody())); for (DocTree tree: methodCommentTree.getBlockTags()) { if (tree.getKind() == DocTree.Kind.RETURN) { final ReturnTree returnTree = (ReturnTree) tree; javaDocMap.put(qualifiedName + ".returnCommentTag", getAllComments(returnTree.getDescription())); } else if (tree.getKind() == DocTree.Kind.PARAM) { final ParamTree paramTree = (ParamTree) tree; final int index = getParamIndex(method, paramTree); if (index >= 0) { javaDocMap.put(qualifiedName + ".paramCommentTag." + index, getAllComments(paramTree.getDescription())); } } } } } } } } javaDocMap.store(os, ""); os.flush(); } catch (final IOException ex) { reporter.print(Diagnostic.Kind.ERROR, ex.getMessage()); } return true; }
Example 10
Source File: JNI.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void write(OutputStream o, TypeElement clazz) throws Util.Exit { try { String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS); PrintWriter pw = wrapWriter(o); pw.println(guardBegin(cname)); pw.println(cppGuardBegin()); /* Write statics. */ List<VariableElement> classfields = getAllFields(clazz); for (VariableElement v: classfields) { if (!v.getModifiers().contains(Modifier.STATIC)) continue; String s = null; s = defineForStatic(clazz, v); if (s != null) { pw.println(s); } } /* Write methods. */ List<ExecutableElement> classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements()); for (ExecutableElement md: classmethods) { if(md.getModifiers().contains(Modifier.NATIVE)){ TypeMirror mtr = types.erasure(md.getReturnType()); String sig = signature(md); TypeSignature newtypesig = new TypeSignature(elems); CharSequence methodName = md.getSimpleName(); boolean longName = false; for (ExecutableElement md2: classmethods) { if ((md2 != md) && (methodName.equals(md2.getSimpleName())) && (md2.getModifiers().contains(Modifier.NATIVE))) longName = true; } pw.println("/*"); pw.println(" * Class: " + cname); pw.println(" * Method: " + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr)); pw.println(" */"); pw.println("JNIEXPORT " + jniType(mtr) + " JNICALL " + mangler.mangleMethod(md, clazz, (longName) ? Mangle.Type.METHOD_JNI_LONG : Mangle.Type.METHOD_JNI_SHORT)); pw.print(" (JNIEnv *, "); List<? extends VariableElement> paramargs = md.getParameters(); List<TypeMirror> args = new ArrayList<TypeMirror>(); for (VariableElement p: paramargs) { args.add(types.erasure(p.asType())); } if (md.getModifiers().contains(Modifier.STATIC)) pw.print("jclass"); else pw.print("jobject"); for (TypeMirror arg: args) { pw.print(", "); pw.print(jniType(arg)); } pw.println(");" + lineSep); } } pw.println(cppGuardEnd()); pw.println(guardEnd(cname)); } catch (TypeSignature.SignatureException e) { util.error("jni.sigerror", e.getMessage()); } }
Example 11
Source File: JNIWriter.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected void writeMethods(Writer out, ClassSymbol sym, String cname) throws IOException, TypeSignature.SignatureException { List<ExecutableElement> classmethods = ElementFilter.methodsIn(sym.getEnclosedElements()); for (ExecutableElement md: classmethods) { if(md.getModifiers().contains(Modifier.NATIVE)){ TypeMirror mtr = types.erasure(md.getReturnType()); String sig = signature(md); TypeSignature newtypesig = new TypeSignature(elements); CharSequence methodName = md.getSimpleName(); boolean longName = false; for (ExecutableElement md2: classmethods) { if ((md2 != md) && (methodName.equals(md2.getSimpleName())) && (md2.getModifiers().contains(Modifier.NATIVE))) longName = true; } println(out, "/*"); println(out, " * Class: " + cname); println(out, " * Method: " + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); println(out, " * Signature: " + newtypesig.getTypeSignature(sig, mtr)); println(out, " */"); println(out, "JNIEXPORT " + jniType(mtr) + " JNICALL " + mangler.mangleMethod(md, sym, (longName) ? Mangle.Type.METHOD_JNI_LONG : Mangle.Type.METHOD_JNI_SHORT)); print(out, " (JNIEnv *, "); List<? extends VariableElement> paramargs = md.getParameters(); List<TypeMirror> args = new ArrayList<TypeMirror>(); for (VariableElement p: paramargs) { args.add(types.erasure(p.asType())); } if (md.getModifiers().contains(Modifier.STATIC)) print(out, "jclass"); else print(out, "jobject"); for (TypeMirror arg: args) { print(out, ", "); print(out, jniType(arg)); } println(out, ");" + lineSep); } } }
Example 12
Source File: MethodElement.java From revapi with Apache License 2.0 | 4 votes |
public static String createComparableSignature(ExecutableElement m, TypeMirror mType) { //the choice of '#' for a separator between the name and signature is because it precedes both '(' and any //legal character in a method name in the ASCII table return m.getSimpleName() + "#" + Util.toUniqueString(mType); }
Example 13
Source File: InlineAnnotationReaderImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected String fullName(ExecutableElement m) { return ((TypeElement) m.getEnclosingElement()).getQualifiedName().toString()+'#'+m.getSimpleName(); }
Example 14
Source File: JNI.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void write(OutputStream o, TypeElement clazz) throws Util.Exit { try { String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS); PrintWriter pw = wrapWriter(o); pw.println(guardBegin(cname)); pw.println(cppGuardBegin()); /* Write statics. */ List<VariableElement> classfields = getAllFields(clazz); for (VariableElement v: classfields) { if (!v.getModifiers().contains(Modifier.STATIC)) continue; String s = null; s = defineForStatic(clazz, v); if (s != null) { pw.println(s); } } /* Write methods. */ List<ExecutableElement> classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements()); for (ExecutableElement md: classmethods) { if(md.getModifiers().contains(Modifier.NATIVE)){ TypeMirror mtr = types.erasure(md.getReturnType()); String sig = signature(md); TypeSignature newtypesig = new TypeSignature(elems); CharSequence methodName = md.getSimpleName(); boolean longName = false; for (ExecutableElement md2: classmethods) { if ((md2 != md) && (methodName.equals(md2.getSimpleName())) && (md2.getModifiers().contains(Modifier.NATIVE))) longName = true; } pw.println("/*"); pw.println(" * Class: " + cname); pw.println(" * Method: " + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr)); pw.println(" */"); pw.println("JNIEXPORT " + jniType(mtr) + " JNICALL " + mangler.mangleMethod(md, clazz, (longName) ? Mangle.Type.METHOD_JNI_LONG : Mangle.Type.METHOD_JNI_SHORT)); pw.print(" (JNIEnv *, "); List<? extends VariableElement> paramargs = md.getParameters(); List<TypeMirror> args = new ArrayList<TypeMirror>(); for (VariableElement p: paramargs) { args.add(types.erasure(p.asType())); } if (md.getModifiers().contains(Modifier.STATIC)) pw.print("jclass"); else pw.print("jobject"); for (TypeMirror arg: args) { pw.print(", "); pw.print(jniType(arg)); } pw.println(");" + lineSep); } } pw.println(cppGuardEnd()); pw.println(guardEnd(cname)); } catch (TypeSignature.SignatureException e) { util.error("jni.sigerror", e.getMessage()); } }
Example 15
Source File: BuilderMethodClassifier.java From auto with Apache License 2.0 | 4 votes |
/** * Returns an {@code Optional} containing a function to use {@code copyOfMethod} to copy the * {@code parameterType} to the {@code targetType}, or {@code Optional.empty()} if the method * can't be used. For example, we might have a property of type {@code ImmutableSet<T>} and our * setter has a parameter of type {@code Set<? extends T>}. Can we use {@code ImmutableSet<E> * ImmutableSet.copyOf(Collection<? extends E>)} to set the property? What about {@code * ImmutableSet<E> ImmutableSet.copyOf(E[])}? * * <p>The example here is deliberately complicated, in that it has a type parameter of its own, * presumably because the {@code @AutoValue} class is {@code Foo<T>}. One subtle point is that the * builder will then be {@code Builder<T>} where this {@code T} is a <i>different</i> type * variable. However, we've used {@link TypeVariables} to ensure that the {@code T} in {@code * ImmutableSet<T>} is actually the one from {@code Builder<T>} instead of the original one from * {@code Foo<T>}.} * * @param copyOfMethod the candidate method to do the copy, {@code * ImmutableSet.copyOf(Collection<? extends E>)} or {@code ImmutableSet.copyOf(E[])} in the * examples. * @param targetType the type of the property to be set, {@code ImmutableSet<T>} in the example. * @param parameterType the type of the setter parameter, {@code Set<? extends T>} in the example. * @return a function that maps a string parameter to a method call using that parameter. For * example it might map {@code foo} to {@code ImmutableList.copyOf(foo)}. */ private Optional<Function<String, String>> getConvertingSetterFunction( ExecutableElement copyOfMethod, DeclaredType targetType, TypeMirror parameterType) { // We have a parameter type, for example Set<? extends T>, and we want to know if it can be // passed to the given copyOf method, which might for example be one of these methods from // ImmutableSet: // public static <E> ImmutableSet<E> copyOf(Collection<? extends E> elements) // public static <E> ImmutableSet<E> copyOf(E[] elements) // Additionally, if it can indeed be passed to the method, we want to know whether the result // (here ImmutableSet<? extends T>) is compatible with the property to be set. // We can't use Types.asMemberOf to do the substitution for us, because the methods in question // are static. So even if our target type is ImmutableSet<String>, if we ask what the type of // copyOf is in ImmutableSet<String> it will still tell us <T> Optional<T> (T). // Instead, we do the variable substitutions ourselves. if (TypeVariables.canAssignStaticMethodResult( copyOfMethod, parameterType, targetType, typeUtils)) { String method = TypeEncoder.encodeRaw(targetType) + "." + copyOfMethod.getSimpleName(); return Optional.of(s -> method + "(" + s + ")"); } return Optional.empty(); }
Example 16
Source File: JNI.java From hottub with GNU General Public License v2.0 | 4 votes |
public void write(OutputStream o, TypeElement clazz) throws Util.Exit { try { String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS); PrintWriter pw = wrapWriter(o); pw.println(guardBegin(cname)); pw.println(cppGuardBegin()); /* Write statics. */ List<VariableElement> classfields = getAllFields(clazz); for (VariableElement v: classfields) { if (!v.getModifiers().contains(Modifier.STATIC)) continue; String s = null; s = defineForStatic(clazz, v); if (s != null) { pw.println(s); } } /* Write methods. */ List<ExecutableElement> classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements()); for (ExecutableElement md: classmethods) { if(md.getModifiers().contains(Modifier.NATIVE)){ TypeMirror mtr = types.erasure(md.getReturnType()); String sig = signature(md); TypeSignature newtypesig = new TypeSignature(elems); CharSequence methodName = md.getSimpleName(); boolean longName = false; for (ExecutableElement md2: classmethods) { if ((md2 != md) && (methodName.equals(md2.getSimpleName())) && (md2.getModifiers().contains(Modifier.NATIVE))) longName = true; } pw.println("/*"); pw.println(" * Class: " + cname); pw.println(" * Method: " + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr)); pw.println(" */"); pw.println("JNIEXPORT " + jniType(mtr) + " JNICALL " + mangler.mangleMethod(md, clazz, (longName) ? Mangle.Type.METHOD_JNI_LONG : Mangle.Type.METHOD_JNI_SHORT)); pw.print(" (JNIEnv *, "); List<? extends VariableElement> paramargs = md.getParameters(); List<TypeMirror> args = new ArrayList<TypeMirror>(); for (VariableElement p: paramargs) { args.add(types.erasure(p.asType())); } if (md.getModifiers().contains(Modifier.STATIC)) pw.print("jclass"); else pw.print("jobject"); for (TypeMirror arg: args) { pw.print(", "); pw.print(jniType(arg)); } pw.println(");" + lineSep); } } pw.println(cppGuardEnd()); pw.println(guardEnd(cname)); } catch (TypeSignature.SignatureException e) { util.error("jni.sigerror", e.getMessage()); } }
Example 17
Source File: InlineAnnotationReaderImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected String fullName(ExecutableElement m) { return ((TypeElement) m.getEnclosingElement()).getQualifiedName().toString()+'#'+m.getSimpleName(); }
Example 18
Source File: AnnotationProcessorContext.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public String methodToString(ExecutableElement method) { StringBuilder buf = new StringBuilder(method.getSimpleName()); for (VariableElement param : method.getParameters()) buf.append(';').append(param.asType()); return buf.toString(); }
Example 19
Source File: InlineAnnotationReaderImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected String fullName(ExecutableElement m) { return ((TypeElement) m.getEnclosingElement()).getQualifiedName().toString()+'#'+m.getSimpleName(); }
Example 20
Source File: JNI.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void write(OutputStream o, TypeElement clazz) throws Util.Exit { try { String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS); PrintWriter pw = wrapWriter(o); pw.println(guardBegin(cname)); pw.println(cppGuardBegin()); /* Write statics. */ List<VariableElement> classfields = getAllFields(clazz); for (VariableElement v: classfields) { if (!v.getModifiers().contains(Modifier.STATIC)) continue; String s = null; s = defineForStatic(clazz, v); if (s != null) { pw.println(s); } } /* Write methods. */ List<ExecutableElement> classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements()); for (ExecutableElement md: classmethods) { if(md.getModifiers().contains(Modifier.NATIVE)){ TypeMirror mtr = types.erasure(md.getReturnType()); String sig = signature(md); TypeSignature newtypesig = new TypeSignature(elems); CharSequence methodName = md.getSimpleName(); boolean longName = false; for (ExecutableElement md2: classmethods) { if ((md2 != md) && (methodName.equals(md2.getSimpleName())) && (md2.getModifiers().contains(Modifier.NATIVE))) longName = true; } pw.println("/*"); pw.println(" * Class: " + cname); pw.println(" * Method: " + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr)); pw.println(" */"); pw.println("JNIEXPORT " + jniType(mtr) + " JNICALL " + mangler.mangleMethod(md, clazz, (longName) ? Mangle.Type.METHOD_JNI_LONG : Mangle.Type.METHOD_JNI_SHORT)); pw.print(" (JNIEnv *, "); List<? extends VariableElement> paramargs = md.getParameters(); List<TypeMirror> args = new ArrayList<TypeMirror>(); for (VariableElement p: paramargs) { args.add(types.erasure(p.asType())); } if (md.getModifiers().contains(Modifier.STATIC)) pw.print("jclass"); else pw.print("jobject"); for (TypeMirror arg: args) { pw.print(", "); pw.print(jniType(arg)); } pw.println(");" + lineSep); } } pw.println(cppGuardEnd()); pw.println(guardEnd(cname)); } catch (TypeSignature.SignatureException e) { util.error("jni.sigerror", e.getMessage()); } }