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 30d05ec

Browse files
Expanded Method and Property classes
1 parent 3d56899 commit 30d05ec

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public class Method implements Member {
99
private boolean isPublic = true;
1010
private String returnType;
1111
private ArrayList<Parameter> parameters;
12+
private boolean isDeprecated = false;
13+
private String deprecationMessage;
1214

1315
public Method(String name){
1416
this.name = name;
@@ -31,6 +33,15 @@ public boolean isStatic(){
3133
return isStatic;
3234
}
3335

36+
public void setDeprecated(boolean isDeprecated, String message){
37+
this.isDeprecated = isDeprecated;
38+
this.deprecationMessage = message;
39+
}
40+
41+
public boolean isDeprecated(){
42+
return isDeprecated;
43+
}
44+
3445
public void setReturnType(String returnType){
3546
this.returnType = returnType;
3647
}

‎src/javaxt/utils/src/Property.java

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,57 @@
33

44
public class Property implements Member {
55
private String name;
6-
6+
private String description;
7+
private String type;
8+
private String defaultValue;
9+
private boolean isStatic = false;
10+
11+
public Property(String name){
12+
this.name = name;
13+
}
14+
715
public String getName(){
816
return name;
917
}
10-
18+
19+
public void setDescription(String description){
20+
this.description = description;
21+
}
22+
23+
public String getDescription(){
24+
return description;
25+
}
26+
27+
public void setType(String type){
28+
this.type = type;
29+
}
30+
31+
public String getType(){
32+
return type;
33+
}
34+
35+
public void setStatic(boolean isStatic){
36+
this.isStatic = isStatic;
37+
}
38+
39+
public boolean isStatic(){
40+
return isStatic;
41+
}
42+
43+
public void setDefaultValue(String defaultValue){
44+
this.defaultValue = defaultValue;
45+
}
46+
47+
public String getDefaultValue(){
48+
return defaultValue;
49+
}
50+
1151
public JSONObject toJson(){
1252
JSONObject json = new JSONObject();
1353
json.set("name", name);
54+
json.set("type", type);
55+
json.set("description", description);
56+
json.set("defaultValue", defaultValue);
1457
return json;
1558
}
1659
}

0 commit comments

Comments
(0)

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