Sun WBEM SDK Developer's Guide

Syntactic and Semantic Error Checking

The MOF Compiler (mofc) compiles .mof text files into Java classes (bytecode). The MOF Compiler does syntactical checking of the MOF files. The CIM Object Manager does semantic and syntactical checking because it can be accessed by many different applications.

The MOF file in Example 4–19 defines two classes, A and B. If you compiled this example file, the CIM Object Manager would return a semantic error because only a key can override another key.


Example 4–19 Semantic Error Checking

Class A         \\Define Class A
 {     [Key]
int a;  
}  
Class B:A       \\Class B extends A 
{  [overrides ("c", key (false)) ]
int b;   
}