public override object GetRawConstantValue() { if ((JavaField.getModifiers() & java.lang.reflect.Modifier.STATIC) != 0) { var value = JavaField.get(null); switch (value) { case java.lang.Boolean boolBox: return(system.Boolean.Box(boolBox.booleanValue() ? 1 : 0)); case java.lang.Byte byteBox: return(system.SByte.Box(byteBox.byteValue())); case java.lang.Character charBox: return(system.Char.Box(charBox.charValue())); case java.lang.Short shortBox: return(system.Int16.Box(shortBox.shortValue())); case java.lang.Integer intBox: return(system.Int32.Box(intBox.intValue())); case java.lang.Long longBox: return(system.Int64.Box(longBox.longValue())); case java.lang.Float floatBox: return(system.Single.Box(floatBox.floatValue())); case java.lang.Double doubleBox: return(system.Double.Box(doubleBox.doubleValue())); } } throw new System.NotSupportedException(); }
public override object GetRawConstantValue() { if (0 != (JavaField.getModifiers() & (java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.FINAL)) && JavaField.getType().isPrimitive()) { return(GetValue(null)); } throw new System.NotSupportedException(); }
private bool Method2(int arg) { if (arg == 0) { int count = 10; } FileInputStream stream = new FileInputStream("Test"); int count_Renamed1 = Float.floatToIntBits(10f); byte[] buffer = new byte[count_Renamed1]; stream.read(buffer); java.lang.reflect.Field f = null; return(Modifier.isTransient(f.getModifiers())); }
private void findAnnotation(System.Collections.Generic.ICollection <com.arangodb.entity.DocumentFieldAttribute.Type > values, System.Collections.Generic.IDictionary <com.arangodb.entity.DocumentFieldAttribute.Type , java.lang.reflect.Field> fields, java.lang.reflect.Field field) { com.arangodb.entity.DocumentFieldAttribute annotation = field.getAnnotation <com.arangodb.entity.DocumentFieldAttribute >(); if (annotation != null && !field.isSynthetic() && !java.lang.reflect.Modifier.isStatic (field.getModifiers()) && typeof(string).isAssignableFrom (field.getType())) { com.arangodb.entity.DocumentFieldAttribute.Type value = annotation.value(); if (values.contains(value)) { field.setAccessible(true); fields[value] = field; values.remove(value); } } }