示例#1
0
  void begin(SectionType sectionType, Location pos) {
    if (sectionType == null) {
      throw new NullPointerException();
    }
    if (pos == null) {
      throw new NullPointerException();
    }
    if (currentType != null) {
      throw new IllegalStateException();
    }
    this.currentType = sectionType;

    //
    switch (currentType) {
      case STRING:
        break;
      case SCRIPTLET:
        writer.startScriptlet(pos);
        break;
      case EXPR:
        writer.startExpression(pos);
        break;
    }
  }