raw edit fix

This commit is contained in:
honfika@gmail.com
2015-02-03 18:59:05 +01:00
parent 74a101e1ea
commit 1fb58e6dd8
7 changed files with 52 additions and 40 deletions

View File

@@ -91,6 +91,7 @@ public class DefineFont2Tag extends FontTag {
@Conditional("fontFlagsHasLayout")
public List<RECT> fontBoundsTable;
@Conditional("fontFlagsHasLayout")
public List<KERNINGRECORD> fontKerningTable;
public static final int ID = 48;

View File

@@ -83,10 +83,14 @@ public class DefineFont3Tag extends FontTag {
@Conditional("fontFlagsHasLayout")
public int fontLeading;
@SWFType(BasicType.SI16)
@Conditional("fontFlagsHasLayout")
public List<Integer> fontAdvanceTable;
@Conditional("fontFlagsHasLayout")
public List<RECT> fontBoundsTable;
@Conditional("fontFlagsHasLayout")
public List<KERNINGRECORD> fontKerningTable;
public static final int ID = 75;

View File

@@ -33,6 +33,11 @@ import java.util.logging.Logger;
*/
public class ReflectionTools {
public static Object getValue(Object obj, Field field) throws IllegalArgumentException, IllegalAccessException {
Object value = field.get(obj);
return value;
}
public static Object getValue(Object obj, Field field, int index) throws IllegalArgumentException, IllegalAccessException {
if (getFieldSubSize(obj, field) <= index) {
return null;
@@ -74,6 +79,10 @@ public class ReflectionTools {
return 0;
}
public static void setValue(Object obj, Field field, Object newValue) throws IllegalArgumentException, IllegalAccessException {
field.set(obj, newValue);
}
@SuppressWarnings("unchecked")
public static void setValue(Object obj, Field field, int index, Object newValue) throws IllegalArgumentException, IllegalAccessException {
Object value = field.get(obj);