scale.j2s
Class ClassStuff

java.lang.Object
  extended by scale.j2s.ClassStuff

public class ClassStuff
extends java.lang.Object

This class associates various information about a Java class.

$Id: ClassStuff.java,v 1.14 2007-01-04 17:01:16 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.


Nested Class Summary
static class ClassStuff.CM
          Associate a class file with a method.
 
Field Summary
 ClassFile cf
          The Java class file for the class.
 boolean include
          True if the code for this class should be converted to Scribble.
 java.lang.String name
          The "fixed" name for the class.
 TypeDecl td
          The Clef declaration for the class.
 PointerType type
          The Clef type of the class (pointer type).
 
Constructor Summary
ClassStuff(java.lang.String name, ClassFile cf)
           
 
Method Summary
 int findVirtualMethod(java.lang.String mName, java.lang.String descriptor)
          Return the index in the class' virtual method table of the specified method.
 VariableDecl getClassDecl(Type classType)
          Return the VariableDecl for the class' class structure.
 java.util.Enumeration<java.lang.String> getInterfaces()
          Return an enumeration of the names of the interfaces implemented by the class.
 ClassStuff getSuperClass()
          Return this class' super class.
 java.util.Enumeration<ClassStuff.CM> getVirtualMethods()
          Return an enumeration of pairs of (class file, method name) for the methods in the class' virtual method table.
 VariableDecl getVTableDecl(Type vtableType)
          Return the VariableDecl for the class' virtual table.
 int numInterfaces()
          Return the number of interfaces implemented by the class.
 int numMethods()
          Return the number of methods in the class' virtual method table.
 void setClassDecl(VariableDecl vd)
          Specify the VariableDecl for the class' class structure.
 void setSuperClass(ClassStuff scs)
          Specify this class' super class.
 void setVTableDecl(VariableDecl vd)
          Specify the VariableDecl for the class' virtual table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The "fixed" name for the class.


cf

public ClassFile cf
The Java class file for the class.


td

public TypeDecl td
The Clef declaration for the class.


type

public PointerType type
The Clef type of the class (pointer type).


include

public boolean include
True if the code for this class should be converted to Scribble.

Constructor Detail

ClassStuff

public ClassStuff(java.lang.String name,
                  ClassFile cf)
Parameters:
name - is the fixed name for the class.
cf - is the class' class file structure
Method Detail

getVTableDecl

public VariableDecl getVTableDecl(Type vtableType)
Return the VariableDecl for the class' virtual table.


setVTableDecl

public void setVTableDecl(VariableDecl vd)
Specify the VariableDecl for the class' virtual table.


getClassDecl

public VariableDecl getClassDecl(Type classType)
Return the VariableDecl for the class' class structure.


setClassDecl

public void setClassDecl(VariableDecl vd)
Specify the VariableDecl for the class' class structure.


getVirtualMethods

public java.util.Enumeration<ClassStuff.CM> getVirtualMethods()
Return an enumeration of pairs of (class file, method name) for the methods in the class' virtual method table.


numMethods

public int numMethods()
Return the number of methods in the class' virtual method table.


getInterfaces

public java.util.Enumeration<java.lang.String> getInterfaces()
Return an enumeration of the names of the interfaces implemented by the class.


numInterfaces

public int numInterfaces()
Return the number of interfaces implemented by the class.


setSuperClass

public void setSuperClass(ClassStuff scs)
Specify this class' super class.


getSuperClass

public ClassStuff getSuperClass()
Return this class' super class.


findVirtualMethod

public int findVirtualMethod(java.lang.String mName,
                             java.lang.String descriptor)
Return the index in the class' virtual method table of the specified method.