Esempio n. 1
0
  public MbeanGenerator(ResourceManager mgr, MibNode aGroup, Context ctxt) throws IOException {
    super(mgr, aGroup, ctxt);

    gentype = ctxt.gentype;

    // Specify oid of the current bean ...
    //
    oid = node.getComputedOid();

    // Try to find a symbol to associate to the group
    //
    varName = node.getSymbolName();
    if (varName == null) varName = getClassName(node.getComputedOid());
    symboleName = getNodeSymbolName(node);

    Trace.info(MessageHandler.getMessage("generate.info.var", varName));

    // Open the file which will represent the M-bean.
    //
    out = openFile(symboleName + Def.JAVA);

    // Write generic header ...
    //
    writeHeader();

    // write our own header ...
    //
    writeClassDeclaration();

    // write the beginning of the constructor
    //
    buildConstructorHeader();
  }