Returns the JType for an integer field. Handles type lookup and unboxing.
336399
private JType getIntegerType(JCodeModel owner, JsonNode node, GenerationConfig config) {

    if (config.isUseBigIntegers()) {
      return unboxIfNecessary(owner.ref(BigInteger.class), config);
    } else if (config.isUseLongIntegers() || node.has("minimum") && node.get("minimum").isLong() || node.has("maximum") && node.get("maximum")
        .isLong()) {
      return unboxIfNecessary(owner.ref(Long.class), config);
    } else {
      return unboxIfNecessary(owner.ref(Integer.class), config);
    }

  }
78853
public static int getInt(Object obj, String fieldName) {
        try {
            return getField(obj.getClass(), fieldName).getInt(obj);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
501784
def get_int(self, key, default=None):
        
        """
        return self.get_converted(
            key, ConversionTypeEnum.INTEGER, default=default)
609384
public Class<?> getGenericType(Field field) {
        Type generic = field.getGenericType();
        if (generic instanceof ParameterizedType) {
            Type actual = ((ParameterizedType) generic).getActualTypeArguments()[0];
            if (actual instanceof Class) {
                return (Class<?>) actual;
            } else if (actual instanceof ParameterizedType) {
                //in case of nested generics we don't go deep
                return (Class<?>) ((ParameterizedType) actual).getRawType();
            }
        }

        return Object.class;
    }
1102610
def integer(self, x):
        
        if type(x) is str:
            hex = binascii.unhexlify(x)
            return int.from_bytes(hex, 'big')

        return x.value if isinstance(x, FiniteField.Value) else x
374675
public static Class getFieldType(FieldNode field) {
        // Step 1: Analyze the field's declared type
        Class declaredType = getClassForClassNode(field.getType());
        if (declaredType != null) {
            return declaredType;
        }

        // Step 2: Analyze the cast type of the initial expression
        if (field.getInitialExpression() != null) {
            Class castType = getClassForClassNode(field.getInitialExpression().getType());
            if (castType != null) {
                return castType;
            }
        }

        // Step 3: Look at the literal within the constant
        if (field.getInitialExpression() instanceof ConstantExpression) {
            Object constantValue = ((ConstantExpression) field.getInitialExpression()).getValue();
            if (constantValue == null) {
                return null;
            } else if (constantValue instanceof String) {
                return String.class;
            } else if (isBoolean(field.getInitialExpression())) {
                return Boolean.class;
            } else if (constantValue.getClass() == Integer.class || constantValue.getClass() == Integer.TYPE) {
                return Integer.class;
            } else if (constantValue.getClass() == Long.class || constantValue.getClass() == Long.TYPE) {
                return Long.class;
            } else if (constantValue.getClass() == Double.class || constantValue.getClass() == Double.TYPE) {
                return Double.class;
            } else if (constantValue.getClass() == Float.class || constantValue.getClass() == Float.TYPE) {
                return Float.class;
            }
        }
        return null;
    }
686812
public Class<?> getType()
    {
        if ( this == Primitive.VOID )
            return Void.TYPE;

        // NULL return null as type... we currently use null type to indicate
        // loose typing throughout bsh.
        if ( this == Primitive.NULL )
            return null;

        return unboxType( value.getClass() );
    }
376860
private static Class<?> boxTypeFor(Class<?> primType) {
		if (primType == int.class) {
			return Integer.class;
		}
		else if (primType == boolean.class) {
			return Boolean.class;
		}
		else if (primType == byte.class) {
			return Byte.class;
		}
		else if (primType == char.class) {
			return Character.class;
		}
		else if (primType == double.class) {
			return Double.class;
		}
		else if (primType == float.class) {
			return Float.class;
		}
		else if (primType == long.class) {
			return Long.class;
		}
		else if (primType == short.class) {
			return Short.class;
		}
		throw new IllegalStateException("Forgotten a case in this method?");
	}
911592
private static String getTypeName(FieldElement field) {
        DataType type = field.type();
        return type.toString();
    }
1255942
def datatype(dbtype, description, cursor):
    """"""
    dt = cursor.db.introspection.get_field_type(dbtype, description)
    if type(dt) is tuple:
        return dt[0]
    else:
        return dt
988090
private JdbcType lookupJdbcType()
    {
        JdbcType result = null;
        String columnType = getColumnType();
        // if sql type was not set in metadata we use reflection
        // to determine sql type by reflection
        if (columnType == null)
        {
            try
            {
                result = JdbcTypesHelper.getJdbcTypeByReflection(m_PersistentField.getType().getName());
            }
            catch(Exception e)
            {
                String eol = SystemUtils.LINE_SEPARATOR;
                throw new OJBRuntimeException("Can't automatically assign a jdbc field-type for field: "
                        + eol + this.toXML() + eol + "in class: " + eol + getClassDescriptor(), e);
            }
        }
        else
        {
            try
            {
                result = JdbcTypesHelper.getJdbcTypeByName(columnType);
            }
            catch(Exception e)
            {
                String eol = SystemUtils.LINE_SEPARATOR;
                throw new OJBRuntimeException("Can't assign the specified jdbc field-type '"+columnType+"' for field: "
                        + eol + this.toXML() + eol + "in class: " + eol + getClassDescriptor(), e);
            }
        }
        return result;
    }
577132
public int getInteger() throws IOException {
        if (tag != tag_Integer) {
            throw new IOException("DerValue.getInteger, not an int " + tag);
        }
        return buffer.getInteger(data.available());
    }
542975
@Override
	public JavaType getJavaType(final int jdbcType, final String jdbcTypeName) {
		JDBCType type = null;
		try {
			type = JDBCType.valueOf(jdbcType);
		} catch (IllegalArgumentException ex) {
			type = JDBCType.OTHER;
		}
		return getJavaType(type, jdbcTypeName);
	}
195214
@Override
    public Type getType() {
        ParameterizedType type = (ParameterizedType) field.getGenericType();
        if (type.getActualTypeArguments()[0] instanceof ParameterizedType) {
            ParameterizedType first = (ParameterizedType) type.getActualTypeArguments()[0];
            return first.getRawType();
        } else {
            return type.getActualTypeArguments()[0];
        }
    }
50643
Integer getColDataTypeSub(int i) {

        int type = table.getColumn(i).getDataType().getJDBCTypeCode();
        int sub = type == Types.VARCHAR_IGNORECASE ? Types.TYPE_SUB_IGNORECASE
                                                   : Types.TYPE_SUB_DEFAULT;

        return ValuePool.getInt(sub);
    }
1171133
function() {
      
      var str_value;
      
      // StringField getValue (handles typeInvite and trim options)
      str_value = inputEx.IntegerField.superclass.getValue.call(this);
      
      // don't return NaN if empty field
      if (str_value === '') {
         return '';
      }
      
      return parseInt(str_value, 10);
   }
1254651
public int getColumnType( int index ) throws OdaException
	{
		//return Types.JAVA_OBJECT;//Any OrientDB field may be NULL
		///*
		String fieldName = getColumnName(index);
		OType fieldType = rowDoc.fieldType(fieldName);
		if (fieldType!=null){
			return typesSqlTypes.get(fieldType);
		}else{
			return Types.VARCHAR;
			//throw new OdaException("Unknown OType of field "+fieldName+" with index "+index);
		}
		//*/
	}