내용에 따라 컴파일되지 않은 Java 클래스에서 '무언가'를 생성하는 표준 또는 기존 방법이 있습니까? 이 같은 기본적으로 뭔가 :Java 파일에서 JSON 생성
@MakeJsonDocumentation
public class ExistingClass{
private name = "";
public ExistingClass(String name){
this.name = name;
}
@JsonField
public String getName(){
return this.name;
}
@JsonField
public void setName(String name){
this.name = name;
}
@JsonMethod
public void someMethod(String text){
System.out.println("someMethod " + text)
}
@JsonMethod
public void otherMethod(){
System.out.println("otherMethod")
}
}
뭔가에이
{
"ExistingClass": {
"Fields": {
"Name": "String"
},
"Methods": {
"someMethod": {
"Parameters": {
"Type": "String",
"Name": "text"
},
"Returns": "Nothing"
},
"otherMethod": {
"Parameters": "Nothing",
"Returns": {
"Type": "String"
}
}
}
}
}
그리고 존재하지 않는 경우, 그것은 내가 자동화하고 싶습니다 때문에 컴파일시 주석이 작업을 수행 할 수 있습니다 같은 생성기 대신 파서를 작성해야하며, 클래스에 대해 뭔가를 바꿀 때마다 파서를 통해 최신 데이터 시트를 가져온다.
I 해요 종류의 여기 어둠 속에서, 난 단지 내가 원하는 것을 알고 있지만 적어도 올바른 방향으로 약간의 검색 키워드가 매우 환영받을 그래서 아무 생각이 어떻게 그것을 달성하지 않으려면 : P
이 항목을 확인하십시오. http://stackoverflow.com/questions/17866155/unmarshalling-nested-objects-from-json-with-jaxb –