001 /*
002 * Cobertura - http://cobertura.sourceforge.net/
003 *
004 * This file was taken from JavaNCSS
005 * http://www.kclee.com/clemens/java/javancss/
006 * Copyright (C) 2000 Chr. Clemens Lee <clemens a.t kclee d.o.t com>
007 *
008 * Cobertura is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License as published
010 * by the Free Software Foundation; either version 2 of the License,
011 * or (at your option) any later version.
012 *
013 * Cobertura is distributed in the hope that it will be useful, but
014 * WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
016 * General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with Cobertura; if not, write to the Free Software
020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
021 * USA
022 */
023
024
025 /*
026 *
027 * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
028 *
029 * WARNING TO COBERTURA DEVELOPERS
030 *
031 * DO NOT MODIFY THIS FILE!
032 *
033 * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT.
034 *
035 * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT
036 * javancss/coberturaREADME.txt
037 *
038 * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
039 */
040 package net.sourceforge.cobertura.javancss.parser;
041
042 import java.util.*;
043
044 public interface JavaParserInterface
045 {
046 public void parse() throws Exception;
047 public void parseImportUnit() throws Exception;
048
049 public int getNcss();
050
051 public int getLOC();
052
053 // added by SMS
054 public int getJvdc();
055
056 /*public int getTopLevelClasses() {
057 return _topLevelClasses;
058 }*/
059
060 public List/*<FunctionMetric>*/ getFunction();
061
062 /**
063 * @return Top level classes in sorted order
064 */
065 public List/*<ObjectMetric>*/ getObject();
066
067 /**
068 * @return The empty package consists of the name ".".
069 */
070 public Map/*<String,PackageMetric>*/ getPackage();
071
072 public List getImports();
073
074 /**
075 * name, beginLine, ...
076 */
077 public Object[] getPackageObjects();
078
079 /**
080 * if javancss is used with cat *.java a long
081 * input stream might get generated, so line
082 * number information in case of an parse exception
083 * is not very useful.
084 */
085 public String getLastFunction();
086 }