Skip to content

Commit 0f81328

Browse files
committed
Code formatting in BaseWriter.java
Also some helpful comments.
1 parent eeb6f1f commit 0f81328

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

java_generate/ReferenceGenerator/src/writers/BaseWriter.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,18 @@ protected static String getLocalAnchor(ProgramElementDoc doc)
103103
return ret;
104104
}
105105

106-
protected static String getReturnTypes(MethodDoc doc){
106+
protected static String getReturnTypes(MethodDoc doc)
107+
{
107108
String ret = importedName(doc.returnType().toString());
108-
if(doc.containingClass() != null){
109-
for(MethodDoc m : doc.containingClass().methods()){
110-
if(m.name().equals(doc.name()) && m.returnType() != doc.returnType()){
109+
if(doc.containingClass() != null)
110+
{
111+
for(MethodDoc m : doc.containingClass().methods())
112+
{
113+
if( m.name().equals(doc.name()) && m.returnType() != doc.returnType() )
114+
{
111115
String name = getSimplifiedType( importedName(m.returnType().toString()) );
112-
113-
if( ! ret.contains( name ))
114-
{
116+
if( ! ret.contains( name ) )
117+
{ // add return type name if it's not already included
115118
ret += ", " + name;
116119
}
117120
}
@@ -477,8 +480,9 @@ protected static ArrayList<HashMap<String, String>> getSyntax(MethodDoc doc, Str
477480
}
478481

479482
protected static String importedName(String fullName){
480-
if(fullName.contains(".")){
481-
return fullName.substring(fullName.lastIndexOf(".")+1);
483+
if(fullName.contains("."))
484+
{
485+
return fullName.substring( fullName.lastIndexOf(".") + 1 );
482486
}
483487
return fullName;
484488
}

0 commit comments

Comments
 (0)