Interface CConstructorContextType

All Superinterfaces:
CContextType, CMethodContextType
All Known Implementing Classes:

public interface CConstructorContextType
extends CMethodContextType

This class represents the context for a constructor during checking passes (checkInterface, checkInitializers, typecheck). It includes data on whether the constructor calls a super constructor.

See Also:

Method Summary
 boolean isInConstructor()
          Indicates whether this context is enclosed in a constructor.
 boolean isSuperConstructorCalled()
 void setSuperConstructorCalled(boolean b)
 void verifyExceptions(TokenReference ref)
          Verifies that all checked exceptions are defined in the throw list.
Methods inherited from interface org.multijava.mjc.CMethodContextType
addThrowable, createFlowControlContext, createFlowControlContext, getCMethod, getMethodContext, isInInitializer, isPure, isStatic, throwables
Methods inherited from interface org.multijava.mjc.CContextType
addFANonNull, addFANonNulls, addFANull, addFANulls, adoptNullityInfo, arithmeticMode, catchUp, check, check, check, check, classToGenerate, createClassContext, createExtMethodContext, createInterfaceContext, declaredOutsideOfLoop, declares, dumpNonNulls, fail, fail, findNearestHost, getClassContext, getCompilationUnit, getCompiler, getFANonNulls, getFANulls, getFlowControlContext, getParentContext, initializeField, isBeforeSuperConstructorCall, isFANonNull, isFieldDefinitelyAssigned, isInLoop, lookupClass, lookupField, lookupField, lookupLocalVariable, lookupMethod, lookupMethod, lookupMethodOrSet, lookupMethodOrSet, lookupOuterField, lookupOuterField, lookupOuterLocalVariable, lookupTypeVariable, mergeNullityInfo, modUtil, registerGFDecl, registerVisibleMethod, registerVisibleType, removeAllFANullity, removeFANonNull, replaceFieldInfoUpTo, reportTrouble, resolveMaybeExtMethodRef

Method Detail


public void verifyExceptions(TokenReference ref)
                               throws PositionedError
Verifies that all checked exceptions are defined in the throw list. Sets the throwables of the constructor if it is the synthetic constructor of an anonymous class.

Specified by:
verifyExceptions in interface CMethodContextType
PositionedError - if checks fail


public boolean isInConstructor()
Indicates whether this context is enclosed in a constructor.

Specified by:
isInConstructor in interface CMethodContextType


public void setSuperConstructorCalled(boolean b)


public boolean isSuperConstructorCalled()


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.