The Inference Block › Object-Oriented Knowledge
Object-Oriented Knowledge
An Aion application is completely object-oriented. The class hierarchy encompasses all functionality-including rules and inferencing.
Rules and inference blocks participate in object orientation because they are an integral part of the method in which you write them. The characteristics of a method affect the rules and inference blocks in it. For instance:
- If a method has access rights to particular attributes and methods, so do its rules and inference blocks.
- If a method has a private or protected access type, then access to its rules and inference blocks is limited, too.
- If you want rules and inference blocks to be globally accessible in your application, give the method an access type of public.
- If the attributes and methods belong to a different class, you specify class or instance name when accessing them in a rule or inference block.
- If rules and inference blocks reside in an instance method, they use the same instance with which you called the method.
- Unqualified names in rules refer to attributes and methods of the current instance and class. (Unqualified names are those that do not specify a class or instance name.)
- Rules and inference blocks participate in inheritance.
- The current instance may belong to the class in which the rule is defined or to a descendant class. If you make an unqualified method call in a rule, you do not know ahead of time to which class the instance belongs. Hence, polymorphism applies to rules and inference blocks, too.
- Rules and inference blocks can be specialized by specializing the method in which they reside.