@Override public byte getByte(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableValue.class.isAssignableFrom(property.getType())) throw new UnsupportedOperationException("JavaFX doesn't support byte properties"); return property.getByte(holder); }
@Override public short getShort(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableValue.class.isAssignableFrom(property.getType())) throw new UnsupportedOperationException("JavaFX doesn't support short properties"); return property.getShort(holder); }
@Override public void setShort(Object holder, short value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (WritableValue.class.isAssignableFrom(property.getType())) throw new UnsupportedOperationException("JavaFX doesn't support short properties"); property.setShort(holder, value); }
@Override public void setChar(Object holder, char value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (WritableValue.class.isAssignableFrom(property.getType())) throw new UnsupportedOperationException("JavaFX doesn't support char properties"); property.setChar(holder, value); }
@Override public char getChar(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableValue.class.isAssignableFrom(property.getType())) throw new UnsupportedOperationException("JavaFX doesn't support char properties"); return property.getChar(holder); }
public void getAndWriteProperty(Object obj, Property property) throws IOException, IllegalAccessException, InvocationTargetException { if (property.getType().isPrimitive()) codecRegistry.getPrimitivePropertyCodec(property.getType()).encodePrimitive(this, obj, property); else writeObject(property.getObject(obj)); } }
public void getAndWriteProperty(Object obj, Property property) throws IOException, IllegalAccessException, InvocationTargetException { if (property.getType().isPrimitive()) codecRegistry.getPrimitivePropertyCodec(property.getType()).encodePrimitive(this, obj, property); else writeObject(property.getObject(obj)); }
public void getAndWriteProperty(Object obj, Property property) throws IOException, IllegalAccessException, InvocationTargetException { if (property.getType().isPrimitive()) codecRegistry.getPrimitivePropertyCodec(property.getType()).encodePrimitive(this, obj, property); else writeObject(property.getObject(obj)); }
public void getAndWriteProperty(Object obj, Property property) throws IOException, IllegalAccessException, InvocationTargetException { if (property.getType().isPrimitive()) codecRegistry.getPrimitivePropertyCodec(property.getType()).encodePrimitive(this, obj, property); else writeObject(property.getObject(obj)); }
@Override public double getDouble(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableDoubleValue.class.isAssignableFrom(property.getType())) return ((ObservableDoubleValue)property.getObject(holder)).get(); return property.getDouble(holder); }
@Override public void setBoolean(Object holder, boolean value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (WritableBooleanValue.class.isAssignableFrom(property.getType())) ((WritableBooleanValue)property.getObject(holder)).set(value); else property.setBoolean(holder, value); }
@Override public void setFloat(Object holder, float value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (WritableFloatValue.class.isAssignableFrom(property.getType())) ((WritableFloatValue)property.getObject(holder)).set(value); else property.setFloat(holder, value); }
@Override public int getInt(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableIntegerValue.class.isAssignableFrom(property.getType())) return ((ObservableIntegerValue)property.getObject(holder)).get(); return property.getInt(holder); }
@Override public void setDouble(Object holder, double value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (WritableDoubleValue.class.isAssignableFrom(property.getType())) ((WritableDoubleValue)property.getObject(holder)).set(value); else property.setDouble(holder, value); }
@Override public boolean getBoolean(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableBooleanValue.class.isAssignableFrom(property.getType())) return ((ObservableBooleanValue)property.getObject(holder)).get(); return property.getBoolean(holder); }
@Override public long getLong(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableLongValue.class.isAssignableFrom(property.getType())) return ((ObservableLongValue)property.getObject(holder)).get(); return property.getLong(holder); }
public void readAndSetProperty(Object obj, Property property) throws IOException, ClassNotFoundException, IllegalAccessException, InvocationTargetException { if (property.isAnnotationPresent(Include.class) && !property.isWritable()) property = new NoopWritableProperty(property.getName(), property.getType()); if (property.getType().isPrimitive()) codecRegistry.getPrimitivePropertyCodec(property.getType()).decodePrimitive(this, obj, property); else property.setObject(obj, readObject()); }
@Override public void setInt(Object holder, int value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (WritableIntegerValue.class.isAssignableFrom(property.getType())) ((WritableIntegerValue)property.getObject(holder)).set(value); else property.setInt(holder, value); }
@Override public float getFloat(Object holder) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (ObservableFloatValue.class.isAssignableFrom(property.getType())) return ((ObservableFloatValue)property.getObject(holder)).get(); return property.getFloat(holder); }
public void readAndSetProperty(Object obj, Property property) throws IOException, ClassNotFoundException, IllegalAccessException, InvocationTargetException { if (property.isAnnotationPresent(Include.class) && !property.isWritable()) property = new NoopWritableProperty(property.getName(), property.getType()); if (property.getType().isPrimitive()) codecRegistry.getPrimitivePropertyCodec(property.getType()).decodePrimitive(this, obj, property); else property.setObject(obj, readObject()); }