JML

org.multijava.mjc
Class CTypeNullity

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

public class CTypeNullity
extends Object

This class performs nullity type information checks.


Field Summary
protected  boolean isNonNull
           
protected  CType type
           
 
Constructor Summary
private CTypeNullity(boolean isNonNull, CType type)
           
private CTypeNullity(long modifiers, CType type)
           
 
Method Summary
 boolean equals(Object that)
           
static CTypeNullity getAlwaysNonNull(CType type)
           
static CTypeNullity getAlwaysNullable(CType type)
           
private static boolean isArrayExpression(JExpression expr)
           
private static boolean isAssignable(boolean leftIsDeclaredNonNull, JExpression right, CType leftType, CContextType context)
           
static boolean isAssignable(JExpression left, JExpression right, CContextType context)
           
static boolean isAssignable(JLocalVariable left, JExpression right, CContextType context)
          Returns true if the nullity of left and right would allow the assignment left=right.
static boolean isAssignable(JMethodDeclaration left, JExpression right, CContextType context)
           
 String toString()
           
static String toString(boolean isNonNull)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isNonNull

protected final boolean isNonNull

type

protected final CType type
Constructor Detail

CTypeNullity

private CTypeNullity(long modifiers,
                     CType type)

CTypeNullity

private CTypeNullity(boolean isNonNull,
                     CType type)
Method Detail

getAlwaysNonNull

public static CTypeNullity getAlwaysNonNull(CType type)

getAlwaysNullable

public static CTypeNullity getAlwaysNullable(CType type)

equals

public boolean equals(Object that)
Overrides:
equals in class Object

isAssignable

public static boolean isAssignable(JLocalVariable left,
                                   JExpression right,
                                   CContextType context)
Returns true if the nullity of left and right would allow the assignment left=right. Note that other aspects of the type must be taken into consideration.


isAssignable

public static boolean isAssignable(JMethodDeclaration left,
                                   JExpression right,
                                   CContextType context)

isAssignable

public static boolean isAssignable(JExpression left,
                                   JExpression right,
                                   CContextType context)

isAssignable

private static boolean isAssignable(boolean leftIsDeclaredNonNull,
                                    JExpression right,
                                    CType leftType,
                                    CContextType context)

isArrayExpression

private static boolean isArrayExpression(JExpression expr)

toString

public static String toString(boolean isNonNull)

toString

public String toString()
Overrides:
toString in class Object

JML

JML is Copyright (C) 1998-2002 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. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.