JavaFX-Plus v1.beta

This commit is contained in:
billkiller
2019-06-29 01:34:10 +08:00
commit f1eb3e57ec
111 changed files with 6484 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
package cn.edu.scau.biubiusuisui.factory;
import cn.edu.scau.biubiusuisui.annotation.FXEntity;
import cn.edu.scau.biubiusuisui.entity.FXPlusContext;
import cn.edu.scau.biubiusuisui.example.Student;
import javafx.beans.property.Property;
import org.junit.Test;
import java.util.Map;
import java.util.function.Predicate;
import static org.junit.Assert.*;
/**
* @Author jack
* @Date:2019/6/28 1:32
*/
public class FXEntityFactoryTest {
@Test
public void getClassProperty() {
FXEntityFactory fxEntityFactory =FXEntityFactory.getInstance();
Student student = new Student();
student.setName("Jack");
try {
Map<String, Property> entityProperty = fxEntityFactory.getEntityProperty(student,null);
entityProperty.forEach((k,v)->{
System.out.println("key" + k +" v" + v);
});
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
@Test
public void getInstance() {
}
@Test
public void createJavaBeanProxy() {
Student student = new Student();
student.setName("NAME");
}
@Test
public void createJavaBeanProxy2() throws InstantiationException, IllegalAccessException {
Student student1 = (Student) FXEntityFactory.getInstance().createJavaBeanProxy(Student.class);
System.out.println(student1);
FXPlusContext.getProryByBeanObject(student1).getStringPropertyMap().forEach((k,v)->{
System.out.println("k " +k +"v" + v);
});
student1.setName("Jack");
}
@Test
public void getEntityProperty() {
}
}