private void initObjectTypes ( Properties info ) throws SQLException { // Add in the types that come packaged with the driver. // These can be overridden later if desired. addDataType ( "box" , org . postgresql . geometric . PGbox . class ) ; addDataType ( "circle" , org . postgresql . geometric . PGcircle . class ) ; addDataType ( "line" , org . postgresql . geometric . PGline . class ) ; addDataType ( "lseg" , org . postgresql . geometric . PGlseg . class ) ; addDataType ( "path" , org . postgresql . geometric . PGpath . class ) ; addDataType ( "point" , org . postgresql . geometric . PGpoint . class ) ; addDataType ( "polygon" , org . postgresql . geometric . PGpolygon . class ) ; addDataType ( "money" , org . postgresql . util . PGmoney . class ) ; addDataType ( "interval" , org . postgresql . util . PGInterval . class ) ; Enumeration < ? > e = info . propertyNames ( ) ; while ( e . hasMoreElements ( ) ) { String propertyName = ( String ) e . nextElement ( ) ; if ( propertyName . startsWith ( "datatype." ) ) { String typeName = propertyName . substring ( 9 ) ; String className = info . getProperty ( propertyName ) ; Class < ? > klass ; try { klass = Class . forName ( className ) ; } catch ( ClassNotFoundException cnfe ) { throw new PSQLException ( GT . tr ( "Unable to load the class {0} responsible for the datatype {1}" , className , typeName ) , PSQLState . SYSTEM_ERROR , cnfe ) ; } addDataType ( typeName , klass . asSubclass ( PGobject . class ) ) ; } } }
This initialises the objectTypes hash map