JML

org.multijava.mjc
Interface JPackageImportType

All Known Implementing Classes:
JmlPackageImport, JPackageImport

public interface JPackageImportType

This type represents (in the AST) full-package import statements, with an asterisk. For example, import java.util.*;.


Method Summary
 void accept(MjcVisitor p)
          Accepts the specified visitor
 String getName()
          Returns the package name defined by this declaration.
 void setClassUsed(String clazz)
          States that specified class in imported package is used.
 void typecheck(Main compiler, JPackageName pack)
          Checks the use of package import statements.
 

Method Detail

getName

public String getName()
Returns the package name defined by this declaration.

Returns:
the package name defined by this declaration

setClassUsed

public void setClassUsed(String clazz)
States that specified class in imported package is used.

Parameters:
clazz - the class that is used.

typecheck

public void typecheck(Main compiler,
                      JPackageName pack)
Checks the use of package import statements. Issues warnings for things like unused packages being imported or a package import being used when only a small number of classes from the package are actually referenced. In general these are stylistic issues.

Parameters:
compiler - the compiler calling this method
pack - the name of the package being imported

accept

public void accept(MjcVisitor p)
Accepts the specified visitor

Parameters:
p - the visitor

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.