public static FieldAccess getField( Object object, String name ) { Map<String, FieldAccess> fields = getFieldsFromObject( object ); if ( fields != null) { return fields.get(name); } else { return null; } }
public static FieldAccess getField( Object object, String name ) { Map<String, FieldAccess> fields = getFieldsFromObject( object ); if ( fields != null) { return fields.get(name); } else { return null; } }
public static FieldAccess getPropertyPathField( final Class root, final String... properties ) { Class cls = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( cls ); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); return field; }
/** * Get Property Path TypeType * @param root root * @param properties properties forming a path * @return FieldAccess */ public static FieldAccess getPropertyPathField( final Object root, final String... properties ) { Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); return field; }
public static FieldAccess getPropertyPathField( final Class root, final String... properties ) { Class cls = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( cls ); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); return field; }
/** * Get Property Path TypeType * @param root root * @param properties properties forming a path * @return FieldAccess */ public static FieldAccess getPropertyPathField( final Object root, final String... properties ) { Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); return field; }
/** * Get Property Path TypeType * @param root root * @param properties properties forming a path * @return class */ public static Class<?> getPropertyPathType( final Object root, final String... properties ) { Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject(object); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); return field.type(); }
/** * Get Property Path TypeType * @param root root * @param properties properties forming a path * @return class */ public static Class<?> getPropertyPathType( final Object root, final String... properties ) { Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject(object); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); return field.type(); }
private static String getPropertyString(Object root, String[] properties) { Object object = baseForGetProperty(root, properties); Map<String, FieldAccess> fields = getFieldsFromObject( object ); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.string ) { return (String) field.getObject( object ); } else { return Conversions.toString(field.getValue(object)); } }
private static String getPropertyString(Object root, String[] properties) { Object object = baseForGetProperty(root, properties); Map<String, FieldAccess> fields = getFieldsFromObject( object ); final String lastProperty = properties[ properties.length - 1 ]; FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.string ) { return (String) field.getObject( object ); } else { return Conversions.toString(field.getValue(object)); } }
public static float getPropertyFloat( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toFloat(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.flt ) { return field.getFloat( object ); } else { return Conversions.toFloat( field.getValue( object ) ); } }
public static float getPropertyFloat( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toFloat(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.flt ) { return field.getFloat( object ); } else { return Conversions.toFloat( field.getValue( object ) ); } }
public static char getPropertyChar( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toChar(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.chr ) { return field.getChar( object ); } else { return Conversions.toChar( field.getValue( object ) ); } }
public static char getPropertyChar( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toChar(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.chr ) { return field.getChar( object ); } else { return Conversions.toChar( field.getValue( object ) ); } }
public static double getPropertyDouble( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toDouble(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.dbl ) { return field.getDouble( object ); } else { return Conversions.toDouble( field.getValue( object ) ); } }
public static long getPropertyLong( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toLong(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.lng ) { return field.getLong( object ); } else { return Conversions.toLong( field.getValue( object ) ); } }
public static long getPropertyLong( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toLong(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.lng ) { return field.getLong( object ); } else { return Conversions.toLong( field.getValue( object ) ); } }
public static int getPropertyInt( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toInt(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject(object); FieldAccess field = fields.get(lastProperty); if ( field.type() == Typ.intgr ) { return field.getInt( object ); } else { return Conversions.toInt(field.getValue(object)); } }
public static short getPropertyShort( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toShort(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.shrt ) { return field.getShort( object ); } else { return Conversions.toShort( field.getValue( object ) ); } }
public static boolean getPropertyBoolean( final Object root, final String... properties ) { final String lastProperty = properties[ properties.length - 1 ]; if ( isDigits( lastProperty ) ) { return Conversions.toBoolean(getPropertyValue(root, properties)); } Object object = baseForGetProperty( root, properties ); Map<String, FieldAccess> fields = getFieldsFromObject( object ); FieldAccess field = fields.get( lastProperty ); if ( field.type() == Typ.bln ) { return field.getBoolean( object ); } else { return Conversions.toBoolean( field.getValue( object ) ); } }