mjc

org.multijava.mjc
Interface JClassOrGFImportType

All Known Implementing Classes:
JClassOrGFImport

public interface JClassOrGFImportType

This type represents (in the AST) import statements for single classes or generic functions, e.g., import java.util.ArrayList; or import org.multijava.samples.typecheck.


Method Summary
 void accept(MjcVisitor p)
          Accepts the specified visitor
 String getName()
           
 String ident()
           
 boolean isClassImport()
          Indicates whether this simple import statement imports a type.
 boolean isGFImport()
          Indicates whether this simple import statement imports an external generic function.
 void setImportKind(FileFinder finder)
          Registers whether this imports a type or an external generic function.
 void setUsed()
          States that specified class is used.
 void typecheck(Main compiler)
          Checks whether this class import statement names a class (or generic function) that is used in the source code.
 

Method Detail

getName

public String getName()
Returns:
the class name defined by this statement

ident

public String ident()
Returns:
the class name defined by this statement

setUsed

public void setUsed()
States that specified class is used.


isClassImport

public boolean isClassImport()
Indicates whether this simple import statement imports a type.

Returns:
true iff this imports a type

isGFImport

public boolean isGFImport()
Indicates whether this simple import statement imports an external generic function.

Returns:
true iff this imports an external generic function

setImportKind

public void setImportKind(FileFinder finder)
                            throws PositionedError
Registers whether this imports a type or an external generic function.

Throws:
PositionedError

typecheck

public void typecheck(Main compiler)
Checks whether this class import statement names a class (or generic function) that is used in the source code. Reports a warning if not.


accept

public void accept(MjcVisitor p)
Accepts the specified visitor

Parameters:
p - the visitor

mjc

mjc is Copyright (C) 2000-2004 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. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.