001 /* 002 // $Id: //open/util/resgen/src/org/eigenbase/resgen/Generator.java#3 $ 003 // Package org.eigenbase.resgen is an i18n resource generator. 004 // Copyright (C) 2005-2005 The Eigenbase Project 005 // Copyright (C) 2005-2005 Disruptive Tech 006 // Copyright (C) 2005-2005 LucidEra, Inc. 007 // Portions Copyright (C) 2001-2005 Kana Software, Inc. and others. 008 // 009 // This library is free software; you can redistribute it and/or modify it 010 // under the terms of the GNU Lesser General Public License as published by the 011 // Free Software Foundation; either version 2 of the License, or (at your 012 // option) any later version approved by The Eigenbase Project. 013 // 014 // This library is distributed in the hope that it will be useful, 015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 // GNU Lesser General Public License for more details. 018 // 019 // You should have received a copy of the GNU Lesser General Public License 020 // along with this library; if not, write to the Free Software 021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 022 */ 023 package org.eigenbase.resgen; 024 025 import java.io.PrintWriter; 026 027 /** 028 * A generator converts a set of resource definitions to a piece of code. 029 * 030 * @author jhyde 031 * @since 19 September, 2005 032 * @version $Id: //open/util/resgen/src/org/eigenbase/resgen/Generator.java#3 $ 033 */ 034 interface Generator 035 { 036 /** 037 * Configures whether this generator will output comments that may be 038 * submitted to a source code management system. In general, it 039 * squelches comments indicating the file should not be checked in as 040 * well as comments change with each generation of the file (thereby 041 * avoiding merge conflicts). 042 * 043 * @param enabled 044 */ 045 void setScmSafeComments(boolean enabled); 046 047 /** 048 * Generates a class containing a line for each resource. 049 */ 050 void generateModule( 051 ResourceGen generator, 052 ResourceDef.ResourceBundle resourceList, 053 PrintWriter pw); 054 } 055 056 // End Generator.java