mjc

org.multijava.mjc
Class CUniverseMethodAnnotation

java.lang.Object
  extended byorg.multijava.mjc.CUniverseMethodAnnotation

public class CUniverseMethodAnnotation
extends Object

This class represents a universe annotation for a method. This includes purity and universe annotations for both parameters and return type.

Author:
AHS

Field Summary
private static byte[] EMPTY
          dummy value for empty parameter array.
private  byte[] paramConstants
          the byte constants for the parameters.
private  boolean purity
          the method's purity.
private  byte retTypeConstant
          the byte constant for the return type.
 
Constructor Summary
CUniverseMethodAnnotation(boolean purity)
          Construct a Universe method annotation for a method with only primitive parameter and return types.
CUniverseMethodAnnotation(boolean purity, byte retTypeConstant)
          Construct a Universe method annotation from byte constants for a method with no or only primitive parameters.
CUniverseMethodAnnotation(boolean purity, byte retTypeConstant, byte[] paramConstants)
          Construct a Universe method annotation from byte constants.
CUniverseMethodAnnotation(boolean purity, byte[] paramConstants)
          Construct a Universe method annotation from byte constants for a method with void or primitive return type.
 
Method Summary
 CUniverseTypeAnnotation getParamAnnotation(int index)
          Get the universe annotation for the i-th parameter.
 CUniverseTypeAnnotation getRettypeAnnotation()
          Get the universe annotation for the return value.
 boolean isEmptyParam()
          Check whether this is the dummy annotation for empty universe annotations.
 boolean isPure()
          Return the method's purity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

purity

private boolean purity
the method's purity.


retTypeConstant

private byte retTypeConstant
the byte constant for the return type.


paramConstants

private byte[] paramConstants
the byte constants for the parameters.


EMPTY

private static final byte[] EMPTY
dummy value for empty parameter array.

Constructor Detail

CUniverseMethodAnnotation

public CUniverseMethodAnnotation(boolean purity,
                                 byte retTypeConstant,
                                 byte[] paramConstants)
Construct a Universe method annotation from byte constants.

Parameters:
purity - the method's purity
retTypeConstant - the return type constant
paramConstants - the parameter constants (captured)

CUniverseMethodAnnotation

public CUniverseMethodAnnotation(boolean purity,
                                 byte[] paramConstants)
Construct a Universe method annotation from byte constants for a method with void or primitive return type.

Parameters:
purity - the method's purity
paramConstants - the parameter constants (captured)

CUniverseMethodAnnotation

public CUniverseMethodAnnotation(boolean purity,
                                 byte retTypeConstant)
Construct a Universe method annotation from byte constants for a method with no or only primitive parameters.

Parameters:
purity - the method's purity
retTypeConstant - the return type constant

CUniverseMethodAnnotation

public CUniverseMethodAnnotation(boolean purity)
Construct a Universe method annotation for a method with only primitive parameter and return types.

Parameters:
purity - the method's purity
Method Detail

isPure

public boolean isPure()
Return the method's purity.


getParamAnnotation

public CUniverseTypeAnnotation getParamAnnotation(int index)
Get the universe annotation for the i-th parameter.

Parameters:
index - the parameter's index

isEmptyParam

public boolean isEmptyParam()
Check whether this is the dummy annotation for empty universe annotations.


getRettypeAnnotation

public CUniverseTypeAnnotation getRettypeAnnotation()
Get the universe annotation for the return value.


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.