Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ private void visitModuleDeclaration(ModuleDeclaration moduleDeclaration) {
addToken(new Token(KEYWORD, "to"), SPACE);

for (int i = 0; i < names.size(); i++) {
addToken(new Token(TYPE_NAME, names.get(i).asString()));
addToken(new Token(TYPE_NAME, names.get(i).toString()));

if (i < names.size() - 1) {
addToken(new Token(PUNCTUATION, ","), SPACE);
Expand Down Expand Up @@ -585,7 +585,7 @@ private void visitModuleDeclaration(ModuleDeclaration moduleDeclaration) {

NodeList<Name> names = d.getWith();
for (int i = 0; i < names.size(); i++) {
addToken(new Token(TYPE_NAME, names.get(i).asString()));
addToken(new Token(TYPE_NAME, names.get(i).toString()));

if (i < names.size() - 1) {
addToken(new Token(PUNCTUATION, ","), SPACE);
Expand Down Expand Up @@ -841,7 +841,7 @@ private void tokeniseFields(boolean isInterfaceDeclaration, TypeDeclaration<?> t
final NodeList<Modifier> fieldModifiers = fieldDeclaration.getModifiers();
// public, protected, static, final
for (final Modifier fieldModifier : fieldModifiers) {
addToken(new Token(KEYWORD, fieldModifier.getKeyword().asString()));
addToken(new Token(KEYWORD, fieldModifier.toString()));
}

// field type and name
Expand Down Expand Up @@ -1177,7 +1177,7 @@ private void processAnnotationValueExpression(final Expression valueExpr, final

private void getModifiers(NodeList<Modifier> modifiers) {
for (final Modifier modifier : modifiers) {
addToken(new Token(KEYWORD, modifier.getKeyword().asString()));
addToken(new Token(KEYWORD, modifier.toString()));
}
}

Expand Down Expand Up @@ -1265,7 +1265,7 @@ private void getThrowException(CallableDeclaration<?> callableDeclaration) {
addToken(new Token(KEYWORD, "throws"), SPACE);

for (int i = 0, max = thrownExceptions.size(); i < max; i++) {
final String exceptionName = thrownExceptions.get(i).getElementType().asString();
final String exceptionName = thrownExceptions.get(i).getElementType().toString();
final Token throwsToken = new Token(TYPE_NAME, exceptionName);

// we look up the package name in case it is a custom type in the same library,
Expand Down Expand Up @@ -1304,7 +1304,7 @@ private void getType(Object type) {

private void getClassType(Type type) {
if (type.isPrimitiveType()) {
addToken(new Token(TYPE_NAME, type.asPrimitiveType().asString()));
addToken(new Token(TYPE_NAME, type.asPrimitiveType().toString()));
} else if (type.isVoidType()) {
addToken(new Token(TYPE_NAME, "void"));
} else if (type.isReferenceType()) {
Expand Down Expand Up @@ -1431,7 +1431,7 @@ public void visit(CompilationUnit compilationUnit, Map<String, String> arg) {
compilationUnit.getImports().stream()
.map(ImportDeclaration::getName)
.forEach(name -> name.getQualifier().ifPresent(packageName ->
apiListing.addPackageTypeMapping(packageName.asString(), name.getIdentifier())));
apiListing.addPackageTypeMapping(packageName.toString(), name.getIdentifier())));
}
}

Expand Down