ilog.rules.factory.translation

Class IlrClassTranslation

  • java.lang.Object
    • ilog.rules.factory.translation.IlrClassTranslation
  • All Implemented Interfaces:
    java.io.Serializable


    public class IlrClassTranslation
    extends java.lang.Object
    implements java.io.Serializable
    Class translation. It refers to a business class getBusinessName(). It may refer to a execution class getExecutionName(). It may refer to an extension class getExtenderName(). It may provide a tester getTester(). It may provide translations for its members.
    Since:
    JRules 6.0
    See Also:
    Serialized Form
    • Constructor Detail

      • IlrClassTranslation

        public IlrClassTranslation()
    • Method Detail

      • getBusinessName

        public java.lang.String getBusinessName()
        Returns the business class name.
        Returns:
        The business class name. It cannot be null.
      • setBusinessName

        public void setBusinessName(java.lang.String businessName)
        Sets the business class name.
        Parameters:
        businessName - The business class name. It cannot be null.
      • getExecutionName

        public java.lang.String getExecutionName()
        Gets the execution class name.
        Returns:
        The execution class name. It may be null. In this case, the translator will use the business class name as the execution name.
      • setExecutionName

        public void setExecutionName(java.lang.String executionName)
        Sets the execution class name.
        Parameters:
        executionName - The execution class name. It may be null. In this case, the translator will use the business class name as the execution name.
      • getExtenderName

        public java.lang.String getExtenderName()
        Gets the extender class name.
        Returns:
        The extender class name. It may be null. In this case, it means there is no extender class.
      • setExtenderName

        public void setExtenderName(java.lang.String extenderName)
        Sets the extender class name.
        Parameters:
        extenderName - The extender class name. It may be null. In this case, it means there is no extender class.
      • isTranslated

        public boolean isTranslated()
        Returns true if the class is to be translated. A class that is not translated will not produce errors when translations are checked, but will produce an error if it is used in a ruleset being translated.
        Since:
        JRules 6.1
      • setTranslated

        public void setTranslated(boolean translated)
        Sets whether this class should be translated or not.
        Since:
        JRules 6.1
      • getCaseSensitivity

        public IlrTranslationConstants.CaseSensitivity getCaseSensitivity()
        Gets the global case sensitivity for this class member's lookup. It may be null. In this case, the case sensitivity of the whole translation configuration applies.
        Since:
        JRules 6.1
      • addImport

        public void addImport(java.lang.String importStatement)
        Adds an import statement. An import statement can refer to a class, such as java.util.Map, or to a whole package, such as java.util.*.
        Parameters:
        importStatement - An import statement.
      • getTester

        public IlrBody getTester()
        Returns the tester for the business class. The tester is the body of a function used to test if an object is an instance of the business class. Inside the tester, this can be used to refer to the object being tested.
        Returns:
        The tester for the business class. In can be null. In this case, it means that instances of the execution class will be considered as instances of the business class.
      • addAttribute

        public void addAttribute(IlrAttributeTranslation attribute)
        Adds a translation for an attribute.
        Parameters:
        attribute - The attribute translation.
      • removeAttribute

        public boolean removeAttribute(java.lang.String name)
        Removes an attribute translation.
        Parameters:
        name - The name of the attribute.
        Returns:
        true if the attribute translation was removed.
      • removeAttribute

        public boolean removeAttribute(IlrAttributeTranslation attribute)
        Removes an attribute translation.
        Parameters:
        attribute - The attribute translation.
        Returns:
        true if the attribute translation was removed.
      • getAttribute

        public IlrAttributeTranslation getAttribute(java.lang.String name)
        Gets an attribute translation.
        Parameters:
        name - The name of the attribute.
        Returns:
        The attribute translation. It may be null.
      • getAttributes

        public java.util.Iterator getAttributes()
        Returns an iterator over all attribute translations.
        Returns:
        An iterator over all attribute translations.
      • addMethod

        public void addMethod(IlrMethodTranslation method)
        Adds a method translation.
        Parameters:
        method - The method translation.
      • removeMethod

        public boolean removeMethod(java.lang.String name,
                           java.lang.String signature)
        Removes a method translation.
        Parameters:
        name - The method name.
        signature - The method signature.
        Returns:
        true if the method was removed.
      • removeMethod

        public void removeMethod(IlrMethodTranslation method)
        Removes a method translation.
        Parameters:
        method - The method translation.
      • getMethods

        public java.util.List getMethods(java.lang.String name)
        Returns the list of method translations for a given method name.
        Parameters:
        name - The name of the methods.
        Returns:
        The list of method translations.
      • getMethod

        public IlrMethodTranslation getMethod(java.lang.String name,
                                     java.lang.String signature)
        Returns a method translation.
        Parameters:
        name - The method name.
        signature - The method signature. The signature of the method follows the syntax described in IlrMemberWithParametersTranslation.getSignature().
        Returns:
        The method translation. If name does not contain any methods, null is returned.
      • addConstructor

        public void addConstructor(IlrConstructorTranslation constructor)
        Adds a constructor translation.
        Parameters:
        constructor - The constructor translation.
      • removeConstructor

        public boolean removeConstructor(java.lang.String signature)
        Removes a constructor translation.
        Parameters:
        signature - The signature of the constructor.
        Returns:
        true if the constructor translation was removed.
      • removeConstructor

        public boolean removeConstructor(IlrConstructorTranslation constructor)
        Removes a constructor translation.
        Parameters:
        constructor - The constructor translation to be removed.
        Returns:
        true if the constructor translation was removed.
      • getConstructors

        public java.util.List getConstructors()
        Returns the list of constructor translations.
        Returns:
        The list of constructor translations.

© Copyright IBM Corp. 1987, 2017