Hallo,
folgender Code ist gegeben:
Frage1: Was bedeuted das .class in Zeile 17? Googlen gibt nur normale Klassendefinitionen.
Bestätigung2: Der static Block ab Zeile 22 wird ja ausgeführt, wenn die Klasse gelanden wird, ohne dass eine Instanz erstellt worden ist... richtig?
Ich danke allen im voraus..
Gruß Huck
folgender Code ist gegeben:
Java:
/**
* This program is free software; you can redistribute ....
*/
package openlr.map.teleatlas.sqlite.impl;
/**
* Thread safe implementation of the OpenLR {@link openlr.map.MapDatabase} interface for use with a Tele Atlas digital map in SQLite format.
*/
public final class MapDatabaseImpl implements openlr.map.MapDatabase {
/** The Constant KILO_BYTE. */
private static final int KILO_BYTE = 1024;
/**
* The default logger for this class.
*/
private static final Logger LOG = Logger.getLogger(MapDatabaseImpl.class);
/**
* Static block to read logging configuration.
*/
static {
if (new File(LOGGING_PROPERTIES_FILE).exists()) {
PropertyConfigurator.configureAndWatch(LOGGING_PROPERTIES_FILE, LOGGING_WATCH_DELAY);
} else {
URL url = MapDatabaseImpl.class.getResource("/" + LOGGING_PROPERTIES_FILE);
if (url != null) {
PropertyConfigurator.configure(url);
}
}
}
//.... usw..
Frage1: Was bedeuted das .class in Zeile 17? Googlen gibt nur normale Klassendefinitionen.
Bestätigung2: Der static Block ab Zeile 22 wird ja ausgeführt, wenn die Klasse gelanden wird, ohne dass eine Instanz erstellt worden ist... richtig?
Ich danke allen im voraus..
Gruß Huck