<dependency>
<groupId>org.argot</groupId>
<artifactId>argot-core</artifactId>
<version>2.0.0</version>
</dependency>
import org.argot.Argot;
import org.argot.Type;
import org.argot.annotation.ArgotBean;
import org.argot.annotation.ArgotField;
@ArgotBean
public class Person {
@ArgotField(type = Type.String, index = 1)
private String name;
@ArgotField(type = Type.Int, index = 2)
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
public class Main {
public static void main(String[] args) {
Person person = new Person("John", 30);
System.out.println("Name: " + person.getName());
System.out.println("Age: " + person.getAge());
}
}
Name: John
Age: 30