Example #1
0
 /** Generates the code for the checker. */
 protected void addChecker(
     Context ctxt,
     MibNode node,
     String description,
     String syntax,
     String var,
     StringBuffer buff) {
   if (!isRowStatus(ctxt, var)) super.addChecker(ctxt, node, description, syntax, var, buff);
   else if (MibGenProperties.isDeprecatedEnabled())
     // Generate deprecated checker for RowStatus.
     // Only for JDMK 5.0 compatible MIBs.
     addRowStatusChecker(ctxt, node, description, syntax, var, buff);
 }
Example #2
0
  /** Build getter and setter for a variable ... */
  protected void addAccessors(MibNode node, String syntax, String var) throws IOException {

    // Get the object definition associated to the node
    //
    ASTObjectTypeDefinition definition = node.getObjectType();
    String description = definition.getDefinition().getDescription();

    addGetter(this.context, node, description, syntax, var, accessors);

    // If the variable is read-write, add a setter and a checker ...
    //
    int access = definition.getDefinition().getAccess();
    if ((access == ParserConstants.RW)
        || (access == ParserConstants.WO)
        || (access == ParserConstants.RC)) {
      addSetter(this.context, node, description, syntax, var, accessors);
      addChecker(this.context, node, description, syntax, var, accessors);
    }
  }