001: /*
002: * Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package com.sun.tools.internal.ws.processor.util;
027:
028: import java.net.URLClassLoader;
029: import java.util.Iterator;
030:
031: import com.sun.tools.internal.ws.processor.generator.Names;
032: import com.sun.xml.internal.ws.util.localization.Localizable;
033:
034: import com.sun.mirror.apt.Filer;
035:
036: /**
037: *
038: * @author WS Development Team
039: */
040: public interface ProcessorEnvironment {
041:
042: /*
043: * Flags
044: */
045: int F_VERBOSE = 1 << 0;
046: int F_WARNINGS = 1 << 1;
047:
048: /**
049: * Set the environment flags
050: */
051: public void setFlags(int flags);
052:
053: /**
054: * Get the environment flags
055: */
056: public int getFlags();
057:
058: /**
059: * Get the ClassPath.
060: */
061: public String getClassPath();
062:
063: /**
064: * Is verbose turned on
065: */
066: public boolean verbose();
067:
068: /**
069: * Remember a generated file and its type so that it
070: * can be removed later, if appropriate.
071: */
072: public void addGeneratedFile(GeneratedFileInfo file);
073:
074: public Filer getFiler();
075:
076: public void setFiler(Filer filer);
077:
078: /**
079: * Delete all the generated files made during the execution of this
080: * environment (those that have been registered with the "addGeneratedFile"
081: * method)
082: */
083: public void deleteGeneratedFiles();
084:
085: /**
086: * Get a URLClassLoader from using the classpath
087: */
088: public URLClassLoader getClassLoader();
089:
090: public Iterator getGeneratedFiles();
091:
092: /**
093: * Release resources, if any.
094: */
095: public void shutdown();
096:
097: public void error(Localizable msg);
098:
099: public void warn(Localizable msg);
100:
101: public void info(Localizable msg);
102:
103: public void printStackTrace(Throwable t);
104:
105: public Names getNames();
106:
107: public int getErrorCount();
108:
109: public int getWarningCount();
110: }
|