Rule Execution Server API

ilog.rules.factory
Class IlrLanguageSupport

java.lang.Object
  extended by ilog.rules.factory.IlrLanguageSupport

Deprecated. Replaced by equivalent API in the ilog.rules.bom package.

public class IlrLanguageSupport
extends Object

This class defines some utility methods that are used by the rule language. This class is deprecated because it uses directly Java Reflection objects. It has no direct replacement although the API of the ilog.rules.bom package may provide alternative methods.


Method Summary
static Class getPrimitiveType(Class clazz)
          Deprecated. Finds the primitive class for a class.
static Class getPublicClass(Class clazz)
          Deprecated. Finds the closest public super class for a given class.
static Class getWrappingType(Class clazz)
          Deprecated. Finds the wrapper class for a primitive class.
static boolean isApplicable(Class param, Class argument)
          Deprecated. Checks the applicability of an argument for a method or constructor call.
static boolean isAssignable(Class leftType, Class rightType, Integer rightValue)
          Deprecated. Checks whether an expression of a certain type can be assigned a value of another type, as defined in the Java Language Specification (Assignment Conversion 5.2).
static boolean isCastable(Class resultType, Class initialType)
          Deprecated. Checks whether a cast is permitted.
static boolean isNumber(Class type)
          Deprecated. Checks whether a Java class is a primitive numeric type.
static boolean isPublic(Class clazz)
          Deprecated. Checks whether a Java class is a public class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isNumber

public static boolean isNumber(Class type)
Deprecated. 
Checks whether a Java class is a primitive numeric type. The primitive types are byte, short, int, long, float, double.

Parameters:
type - The Java class to be checked.
Returns:
true if the passed Java class is a primitive numeric type, and false otherwise.

isPublic

public static boolean isPublic(Class clazz)
Deprecated. 
Checks whether a Java class is a public class.

Parameters:
clazz - The Java class to be checked.
Returns:
true if the passed Java class is public, and false otherwise.

getPublicClass

public static Class getPublicClass(Class clazz)
Deprecated. 
Finds the closest public super class for a given class. If the passed class is public, it is returned. Otherwise, its super class is checked until a public super class is found.

Parameters:
clazz - A Java class.

getWrappingType

public static Class getWrappingType(Class clazz)
Deprecated. 
Finds the wrapper class for a primitive class. As required by the introspection API of Java, the method calls necessitate that the primitive arguments be wrapped in the corresponding Java objects. This method returns the wrapping class for a Java primitive type, and returns the argument itself if the class is not primitive.


getPrimitiveType

public static Class getPrimitiveType(Class clazz)
Deprecated. 
Finds the primitive class for a class. As required by the introspection API of Java, the method calls necessitate that the primitive arguments be wrapped in the corresponding Java objects. This method returns the primitive class for a Java wrapper type, and returns the argument itself if the class is not a primitive wrapper type. This method is the reverse method of the previous one.


isApplicable

public static boolean isApplicable(Class param,
                                   Class argument)
Deprecated. 
Checks the applicability of an argument for a method or constructor call. param is the class of the parameter defined in the method or constructor, and argument is the actual type of the passed argument. This method takes care of possible conversions, as defined in the Java language specification (15.11.2).

Parameters:
param - The type of the parameter. This argument should not be null.
argument - The type of the passed argument. By convention, if this is null, the passed argument is assumed to be null, and thus can be converted to any non primitive type.
Returns:
true if the argument is applicable to the parameter.

isAssignable

public static boolean isAssignable(Class leftType,
                                   Class rightType,
                                   Integer rightValue)
Deprecated. 
Checks whether an expression of a certain type can be assigned a value of another type, as defined in the Java Language Specification (Assignment Conversion 5.2). leftType is the type of the left-hand side expression, and rightType is the type of the right-hand expression. As defined in the Java language, if leftType is either byte, short or char, and rightType is int, the third argument represents the value of the constant int expression and is used to determine whether it is representable by the left type. In that case, the narrowing conversion is applied and the method returns true. In all the other cases, the third argument is not used, and thus it can be null.


isCastable

public static boolean isCastable(Class resultType,
                                 Class initialType)
Deprecated. 
Checks whether a cast is permitted. This method does not comply with the Java specifications (section 5.5). initialType is the type of the expression, resultType is the type to which the expression is casted. By convention, if initialType is null, it represents a cast on the null object.


Rule Execution Server API

© Copyright IBM Corp. 1987, 2013