org.multijava.mjc
Class CTypeNullity
java.lang.Object
org.multijava.mjc.CTypeNullity
- public class CTypeNullity
- extends Object
This class performs nullity type information checks.
isNonNull
protected final boolean isNonNull
type
protected final CType type
CTypeNullity
private CTypeNullity(long modifiers,
CType type)
CTypeNullity
private CTypeNullity(boolean isNonNull,
CType type)
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 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.