001    /*
002     * Copyright (C) 2006-2007 the original author or authors.
003     *
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     *     http://www.apache.org/licenses/LICENSE-2.0
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    
017    package org.codehaus.gmaven.runtime.util;
018    
019    import java.io.File;
020    import java.net.URL;
021    import java.util.Collection;
022    
023    /**
024     * A common interface for compiler components.
025     *
026     * @version $Id: Compiler.java 50 2009-10-16 14:06:18Z user57 $
027     * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
028     */
029    public interface Compiler
030    {
031        void setTargetDirectory(File dir);
032    
033        File getTargetDirectory();
034        
035        void add(URL source);
036    
037        void add(File source);
038    
039        Collection sources();
040    
041        int compile() throws Exception;
042    
043        void setClassPath(URL[] urls);
044    
045        URL[] getClassPath();
046    
047        // Result class ?
048    
049        // Listener intf ?
050    }