@Override public MetaClass[] getCheckedExceptions() { return GWTClass.fromClassArray(oracle, method.getThrows()); }
@Override public MetaClass[] getCheckedExceptions() { return GWTClass.fromClassArray(oracle, method.getThrows()); }
private String generateThrowsSignature(JMethod method) { JType[] methodThrows = method.getThrows(); if (methodThrows.length == 0) { return ""; } StringBuilder builder = new StringBuilder("throws "); for (int i = 0, methodThrowsLength = methodThrows.length; i < methodThrowsLength; i++) { JType methodThrow = methodThrows[i]; builder.append(methodThrow.isClass().getQualifiedSourceName()); if (i != methodThrows.length - 1) { builder.append(", "); } } return builder.toString(); }
private String getBaseMethodDeclaration(JMethod jmethod) { // Foo foo, Bar bar, Baz baz StringBuilder parameters = new StringBuilder(); for (JParameter param : jmethod.getParameters()) { parameters.append(",").append(ModelUtils.getQualifiedBaseSourceName(param.getType())).append( " ").append(param.getName()); } if (parameters.length() > 0) { parameters = parameters.deleteCharAt(0); } StringBuilder throwsDeclaration = new StringBuilder(); if (jmethod.getThrows().length > 0) { for (JType thrown : jmethod.getThrows()) { throwsDeclaration.append(". ").append(ModelUtils.getQualifiedBaseSourceName(thrown)); } throwsDeclaration.deleteCharAt(0); throwsDeclaration.insert(0, "throws "); } String returnName = ModelUtils.getQualifiedBaseSourceName(jmethod.getReturnType()); assert !returnName.contains("extends"); return String.format("%s %s(%s) %s", returnName, jmethod.getName(), parameters, throwsDeclaration); }
private String getBaseMethodDeclaration(JMethod jmethod) { // Foo foo, Bar bar, Baz baz StringBuilder parameters = new StringBuilder(); for (JParameter param : jmethod.getParameters()) { parameters.append(",").append(ModelUtils.getQualifiedBaseSourceName(param.getType())).append( " ").append(param.getName()); } if (parameters.length() > 0) { parameters = parameters.deleteCharAt(0); } StringBuilder throwsDeclaration = new StringBuilder(); if (jmethod.getThrows().length > 0) { for (JType thrown : jmethod.getThrows()) { throwsDeclaration.append(". ").append(ModelUtils.getQualifiedBaseSourceName(thrown)); } throwsDeclaration.deleteCharAt(0); throwsDeclaration.insert(0, "throws "); } String returnName = ModelUtils.getQualifiedBaseSourceName(jmethod.getReturnType()); assert !returnName.contains("extends"); return String.format("%s %s(%s) %s", returnName, jmethod.getName(), parameters, throwsDeclaration); }
private String getBaseMethodDeclaration(JMethod jmethod) { // Foo foo, Bar bar, Baz baz StringBuilder parameters = new StringBuilder(); for (JParameter param : jmethod.getParameters()) { parameters.append(",").append(ModelUtils.getQualifiedBaseSourceName(param.getType())).append( " ").append(param.getName()); } if (parameters.length() > 0) { parameters = parameters.deleteCharAt(0); } StringBuilder throwsDeclaration = new StringBuilder(); if (jmethod.getThrows().length > 0) { for (JType thrown : jmethod.getThrows()) { throwsDeclaration.append(". ").append(ModelUtils.getQualifiedBaseSourceName(thrown)); } throwsDeclaration.deleteCharAt(0); throwsDeclaration.insert(0, "throws "); } String returnName = ModelUtils.getQualifiedBaseSourceName(jmethod.getReturnType()); assert !returnName.contains("extends"); return String.format("%s %s(%s) %s", returnName, jmethod.getName(), parameters, throwsDeclaration); }
JType[] exs = method.getThrows(); if (exs.length > 0) { for (JType ex : exs) {
JType[] exs = method.getThrows(); if (exs.length > 0) { for (JType ex : exs) {
JType[] exs = method.getThrows(); if (exs.length > 0) { TreeLogger throwsLogger = methodLogger.branch(TreeLogger.DEBUG, "Throws:", null);
JType[] exs = method.getThrows(); if (exs.length > 0) { TreeLogger throwsLogger = methodLogger.branch(TreeLogger.DEBUG, "Throws:", null);
if (method.getThrows().length != 0) { logger.log( Type.ERROR,
generateGetExceptions(logger, cb, method.getThrows()); generateGetReturnType(logger, cb, method); generateGetName(logger, cb, method);
appendClassArray(instantiator, method.getThrows(), ctx);