public synchronized void init(ProcessingEnvironment processingEnv) {
        if (initialized)
            throw new IllegalStateException("Cannot call init more than once.");
        if (processingEnv == null)
            throw new NullPointerException("Tool provided null ProcessingEnvironment");

        this.processingEnv = processingEnv;
        initialized = true;
    }