001 /* 002 Copyright (C) 2001-2003 Laurent Martelli <laurent@aopsys.com> 003 004 This program is free software; you can redistribute it and/or modify 005 it under the terms of the GNU Lesser General Public License as 006 published by the Free Software Foundation; either version 2 of the 007 License, or (at your option) any later version. 008 009 This program is distributed in the hope that it will be useful, 010 but WITHOUT ANY WARRANTY; without even the implied warranty of 011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 012 GNU Lesser General Public License for more details. 013 014 You should have received a copy of the GNU Lesser General Public 015 License along with this program; if not, write to the Free Software 016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 017 USA */ 018 019 package org.objectweb.jac.core; 020 021 import java.io.IOException; 022 import java.io.InputStream; 023 import java.util.Set; 024 import java.util.List; 025 026 /** 027 * Configuration file parser interface 028 */ 029 public interface Parser { 030 /** 031 * Parse config file specified by its file path. 032 * @param path path of file to parse 033 * @param targetClass the class name of the aspect component 034 * @param blockKeywords additional block keywords to factorize 035 * configuration methods 036 */ 037 List parse(String path, String targetClass, Set blockKeywords) 038 throws IOException; 039 /** 040 * Parse a stream. 041 * @param input the stream to parse 042 * @param filePath path of file corresponding to the input stream 043 * @param targetClass the class name of the aspect component 044 * @param blockKeywords additional block keywords to factorize 045 * configuration methods 046 */ 047 List parse(InputStream input, String filePath, String targetClass, 048 Set blockKeywords) 049 throws IOException; 050 }