1.1 --- a/samples/livedb/src/org/apidesign/livedb/impl/LiveDBProcessor.java Thu Jul 15 00:40:37 2010 +0200
1.2 +++ b/samples/livedb/src/org/apidesign/livedb/impl/LiveDBProcessor.java Thu Jul 29 17:44:59 2010 +0200
1.3 @@ -1,8 +1,3 @@
1.4 -/*
1.5 - * To change this template, choose Tools | Templates
1.6 - * and open the template in the editor.
1.7 - */
1.8 -
1.9 package org.apidesign.livedb.impl;
1.10
1.11 import java.io.IOException;
1.12 @@ -10,16 +5,12 @@
1.13 import java.sql.CallableStatement;
1.14 import java.sql.Connection;
1.15 import java.sql.Driver;
1.16 -import java.sql.DriverManager;
1.17 import java.sql.ResultSet;
1.18 import java.sql.ResultSetMetaData;
1.19 import java.sql.SQLException;
1.20 -import java.util.Enumeration;
1.21 import java.util.Properties;
1.22 import java.util.ServiceLoader;
1.23 import java.util.Set;
1.24 -import java.util.logging.Level;
1.25 -import java.util.logging.Logger;
1.26 import javax.annotation.processing.AbstractProcessor;
1.27 import javax.annotation.processing.Processor;
1.28 import javax.annotation.processing.RoundEnvironment;
1.29 @@ -37,10 +28,11 @@
1.30 *
1.31 * @author Jaroslav Tulach <jtulach@netbeans.org>
1.32 */
1.33 +// BEGIN: livedb.processor
1.34 @SupportedAnnotationTypes("org.apidesign.livedb.LiveDB")
1.35 @SupportedSourceVersion(SourceVersion.RELEASE_6)
1.36 @ServiceProvider(service=Processor.class)
1.37 -public class LiveDBProcessor extends AbstractProcessor {
1.38 +public final class LiveDBProcessor extends AbstractProcessor {
1.39 @Override
1.40 public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
1.41 for (Element e : roundEnv.getElementsAnnotatedWith(LiveDB.class)) {
1.42 @@ -106,7 +98,7 @@
1.43 }
1.44 return true;
1.45 }
1.46 -
1.47 +// FINISH: livedb.processor
1.48 private static Connection getConnection(String url, String user, String password)
1.49 throws SQLException {
1.50 final ClassLoader cl = LiveDBProcessor.class.getClassLoader();