forked from hongweyu/JavaFutuOpenD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructure.java
More file actions
38 lines (32 loc) · 730 Bytes
/
Copy pathStructure.java
File metadata and controls
38 lines (32 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package why.stock.futu;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import com.sun.jna.Pointer;
/**
* @author why
*
* @date 2019/04/13 10:55 created
*/
public class Structure extends com.sun.jna.Structure {
public Structure() {
super(ALIGN_NONE);
}
/**
* @param p
*/
public Structure(Pointer p) {
super(p, ALIGN_NONE);
}
/* (non-Javadoc)
* @see com.sun.jna.Structure#getFieldOrder()
*/
@Override
protected List getFieldOrder() {
Field[] fields = getClass().getDeclaredFields();
List<String> names = new ArrayList<String>(fields.length);
for(Field field : fields)
names.add(field.getName());
return names;
}
}