Here you can find the source of getJdbcTypeNames()
public static Map<Integer, String> getJdbcTypeNames()
//package com.java2s; /**/*from w w w . j a va 2s .c o m*/ * Copyright (c) 2015-present Jorge D?az All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ import java.lang.reflect.Field; import java.sql.Types; import java.util.HashMap; import java.util.Map; public class Main { private static Map<Integer, String> jdbcTypeNames = null; public static Map<Integer, String> getJdbcTypeNames() { if (jdbcTypeNames == null) { Map<Integer, String> aux = new HashMap<>(); for (Field field : Types.class.getFields()) { try { aux.put((Integer) field.get(null), field.getName()); } catch (IllegalArgumentException iae) { } catch (IllegalAccessException iae) { } } jdbcTypeNames = aux; } return jdbcTypeNames; } }