/** * Gets the value of a static <code>short</code> field. * * @param field Field object whose value is returned. * @return the value of the <code>short</code> field */ public static short getShort(Field field) { checkStatic(field); try { return field.getShort(null); } catch (Exception exp) { throw translate(exp); } }
public final int getShortValue(Object obj) throws IllegalAccessException { if (!isAndroid && memOffset >= 0) { return FSTUtil.unFlaggedUnsafe.getShort(obj, memOffset); } return field.getShort(obj); }
public short getReflectS() throws Exception { return f_s.getShort(t); }
/** * Gets the value of an instance <code>short</code> field. * * @param field Field object whose value is returned. * @param obj the object to extract the <code>short</code> value * from * @return the value of the <code>short</code> field */ public static short getShort(Field field, Object obj) { try { return field.getShort(obj); } catch (Exception exp) { throw translate(exp); } }
public short getShort(Object o) throws IllegalArgumentException, IllegalAccessException { return this.field.getShort(o); }
public final int getShortValue(Object obj) throws IllegalAccessException { if (!isAndroid && memOffset >= 0) { return FSTUtil.unFlaggedUnsafe.getShort(obj, memOffset); } return field.getShort(obj); }
public static short callSetShort(Field thiz, Object o) throws IllegalArgumentException, IllegalAccessException { thiz.setShort(o, (short) 1234); return thiz.getShort(o); }
short sid; try { sid = recCls.getField("RECORD_ID").getShort(null); } catch (IllegalArgumentException e) { throw new RuntimeException(e);
private int getInt(Object object, Class<?> fieldType, Class<?> expectedType) { if (fieldType == Integer.TYPE) { return getI(object, field); } if (fieldType == Character.TYPE) { return getC(object, field); } return getShort(object, fieldType, expectedType); }
return Short.valueOf( field.getShort( owner ) );
sid = recClass.getField("sid").getShort(null); } catch (Exception illegalArgumentException) { throw new org.apache.poi.util.RecordFormatException(
/** * Returns the value of the field in the specified object as a {@code short} * . This reproduces the effect of {@code object.fieldName} * <p> * If this field is static, the object argument is ignored. * Otherwise, if the object is {@code null}, a NullPointerException is * thrown. If the object is not an instance of the declaring class of the * method, an IllegalArgumentException is thrown. * <p> * If this Field object is enforcing access control (see AccessibleObject) * and this field is not accessible from the current context, an * IllegalAccessException is thrown. * * @param object * the object to access * @return the field value * @throws NullPointerException * if the object is {@code null} and the field is non-static * @throws IllegalArgumentException * if the object is not compatible with the declaring class * @throws IllegalAccessException * if this field is not accessible */ public short getShort(Object object) throws IllegalAccessException, IllegalArgumentException { checkAccess(object, false); checkReceiver(object); return getShort(object, getType(), Short.TYPE); }
output.writeLong(field.getLong(obj)); } else if (type == short.class) { output.writeShort(field.getShort(obj)); } else if (type == boolean.class) { output.writeBoolean(field.getBoolean(obj));
@Override public short getShort( Object obj ) { try { return field.getShort( obj ); } catch ( Exception e ) { analyzeError( e, obj ); return 0; } }
@Override public short getShort( Object obj ) { try { return field.getShort( obj ); } catch ( Exception e ) { analyzeError( e, obj ); return 0; } }
@Override void writePrimitiveField(Object o, EntityOutput output, Field field) throws IllegalAccessException { output.writeShort(field.getShort(o)); }
public void copy (Object original, Object copy) { try { field.setShort(copy, field.getShort(original)); } catch (Exception e) { KryoException ex = new KryoException(e); ex.addTrace(this + " (" + type.getName() + ")"); throw ex; } } }
public void write (Output output, Object object) { try { output.writeShort(field.getShort(object)); } catch (Exception e) { KryoException ex = new KryoException(e); ex.addTrace(this + " (" + type.getName() + ")"); throw ex; } }
public void copy (Object original, Object copy) { try { field.setShort(copy, field.getShort(original)); } catch (Exception e) { KryoException ex = new KryoException(e); ex.addTrace(this + " (" + type.getName() + ")"); throw ex; } } }