Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 62bb382

Browse files
Added "public" attribute to the Method class
1 parent 43b8ed1 commit 62bb382

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

‎src/javaxt/utils/src/Method.java

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,64 @@
55
public class Method implements Member {
66
private String name;
77
private String description;
8-
private boolean isStatic;
8+
private boolean isStatic = false;
9+
private boolean isPublic = true;
910
private String returnType;
1011
private ArrayList<Parameter> parameters;
11-
12+
1213
public Method(String name){
1314
this.name = name;
1415
this.parameters = new ArrayList<>();
1516
}
16-
17+
18+
public boolean isPublic(){
19+
return isPublic;
20+
}
21+
22+
public void setPublic(boolean isPublic){
23+
this.isPublic = isPublic;
24+
}
25+
1726
public void setStatic(boolean isStatic){
1827
this.isStatic = isStatic;
1928
}
20-
29+
2130
public boolean isStatic(){
2231
return isStatic;
2332
}
24-
33+
2534
public void setReturnType(String returnType){
2635
this.returnType = returnType;
2736
}
28-
37+
2938
public String getReturnType(){
3039
return returnType;
3140
}
32-
41+
3342
public String getName(){
3443
return name;
3544
}
36-
45+
3746
public void setDescription(String description){
3847
this.description = description;
3948
}
40-
49+
4150
public String getDescription(){
4251
return description;
4352
}
44-
53+
4554
public void addParameter(Parameter parameter){
4655
this.parameters.add(parameter);
4756
}
48-
57+
4958
public ArrayList<Parameter> getParameters(){
5059
return parameters;
5160
}
52-
61+
5362
public String toString(){
5463
return name;
5564
}
56-
65+
5766
public JSONObject toJson(){
5867
JSONObject json = new JSONObject();
5968
json.set("name", name);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /