polyglot.ext.covarRet
Class CovarRetClassBody_c

java.lang.Object
  extended bypolyglot.ext.jl.ast.Node_c
      extended bypolyglot.ext.jl.ast.Term_c
          extended bypolyglot.ext.jl.ast.ClassBody_c
              extended bypolyglot.ext.covarRet.CovarRetClassBody_c
All Implemented Interfaces:
ClassBody, java.lang.Cloneable, Copy, JL, Node, NodeOps, Term

public class CovarRetClassBody_c
extends ClassBody_c

A ClassBody represents the body of a class or interface declaration or the body of an anonymous class. The covariant return extension overrides the overrideMethodCheck method to allow the return type of a method to be a subclass of the return type declared in a superclass.


Field Summary
 
Fields inherited from class polyglot.ext.jl.ast.ClassBody_c
members
 
Fields inherited from class polyglot.ext.jl.ast.Term_c
reachable
 
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
 
Constructor Summary
CovarRetClassBody_c(Position pos, java.util.List members)
           
 
Method Summary
protected  void overrideMethodCheck(TypeChecker tc)
           
 
Methods inherited from class polyglot.ext.jl.ast.ClassBody_c
acceptCFG, addMember, disambiguate, disambiguateEnter, duplicateConstructorCheck, duplicateFieldCheck, duplicateMemberClassCheck, duplicateMethodCheck, entry, isSameMethod, members, members, prettyPrint, reconstruct, toString, typeCheck, visitChildren
 
Methods inherited from class polyglot.ext.jl.ast.Term_c
listEntry, reachable, reachable
 
Methods inherited from class polyglot.ext.jl.ast.Node_c
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypes, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateOverride, dump, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.ast.Term
reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, throwTypes, translate, typeCheckEnter
 
Methods inherited from interface polyglot.util.Copy
copy
 

Constructor Detail

CovarRetClassBody_c

public CovarRetClassBody_c(Position pos,
                           java.util.List members)
Method Detail

overrideMethodCheck

protected void overrideMethodCheck(TypeChecker tc)
                            throws SemanticException
Throws:
SemanticException