mjc

org.multijava.util.classfile
Class GenericFunctionInfo

java.lang.Object
  extended byorg.multijava.util.classfile.GenericFunctionInfo

public class GenericFunctionInfo
extends Object

This data structure groups a set of multimethods all declared in the same class or generic function anchor and all belonging to the same generic function.


Field Summary
private  AsciiConstant generictype
           
private  MultimethodInfo[] multimethods
           
private  AsciiConstant name
           
private  short number
           
private  AsciiConstant topConcMethColl
           
private  AsciiConstant type
           
 
Constructor Summary
GenericFunctionInfo(DataInput in, ConstantPool cp)
          Constructs a generic function info structure from a class file stream
GenericFunctionInfo(String name, String type, String generictype, int number, String topConcMethColl, MultimethodInfo[] multimethods)
          Constructs a generic function info structure from source.
 
Method Summary
protected  void appendMultimethodInfo(ArrayList result)
          Appends the MultimethodInfo objects for the multimethods declared locally for this generic function to result.
 String getGenericSignature()
           
 String getName()
          Returns the name of this generic function
 String getSignature()
          Returns the type signature of this generic function
protected  int getSize()
           
 void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool
 void setGenericSignature(String generictype)
           
 void setName(String name)
          Sets the name of this generic function
 void setSignature(String type)
          Sets the type of this generic function
 void write(ConstantPool cp, DataOutput out)
          Write this class into the the file (out) getting data position from the constant pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private AsciiConstant name

type

private AsciiConstant type

generictype

private AsciiConstant generictype

number

private short number

topConcMethColl

private AsciiConstant topConcMethColl

multimethods

private MultimethodInfo[] multimethods
Constructor Detail

GenericFunctionInfo

public GenericFunctionInfo(String name,
                           String type,
                           String generictype,
                           int number,
                           String topConcMethColl,
                           MultimethodInfo[] multimethods)
Constructs a generic function info structure from source.

Parameters:
name - the simple name of the method
type - the top method's signature
number - the function number of the generic function
topConcMethColl - the fully qualified name of the top method of the generic function to which these methods belong, or null if these methods are external or the generic function is internal
multimethods - an array of the multimethods of this generic function declared in the local class

GenericFunctionInfo

public GenericFunctionInfo(DataInput in,
                           ConstantPool cp)
                    throws IOException,
                           ClassFileFormatException
Constructs a generic function info structure from a class file stream

Parameters:
in - the stream to read from
cp - the constant pool
Throws:
IOException - an io problem has occured
ClassFileFormatException - attempt to read a bad classfile info
Method Detail

getName

public String getName()
Returns the name of this generic function


setName

public void setName(String name)
Sets the name of this generic function


getSignature

public String getSignature()
Returns the type signature of this generic function


getGenericSignature

public String getGenericSignature()

setSignature

public void setSignature(String type)
Sets the type of this generic function


setGenericSignature

public void setGenericSignature(String generictype)

getSize

protected int getSize()

appendMultimethodInfo

protected void appendMultimethodInfo(ArrayList result)
Appends the MultimethodInfo objects for the multimethods declared locally for this generic function to result.


resolveConstants

public void resolveConstants(ConstantPool cp)
                      throws ClassFileFormatException
Insert or check location of constant value on constant pool

Parameters:
cp - the constant pool for this class
Throws:
ClassFileFormatException

write

public void write(ConstantPool cp,
                  DataOutput out)
           throws IOException,
                  ClassFileFormatException
Write this class into the the file (out) getting data position from the constant pool

Parameters:
cp - the constant pool that contain all data
out - the file where to write this object info
Throws:
IOException - an io problem has occured
ClassFileFormatException - attempt to write a bad classfile info

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.