Ejemplo n.º 1
0
  public MethodStmtCompiler(ClassStmtCompiler clazz, MethodStmtToken statement) {
    super(clazz.getCompiler());
    this.clazz = clazz;
    this.statement = statement;
    this.node = new MethodNodeImpl();

    this.localVariables = new LinkedHashMap<>();

    entity = new MethodEntity(getCompiler().getContext());
    entity.setClazz(clazz.entity);
    if (statement != null) entity.setName(statement.getName().getName());

    realName = entity.getName();
    methodId = compiler.getScope().nextMethodIndex();
  }
Ejemplo n.º 2
0
  public MethodStmtCompiler(ClassStmtCompiler clazz, MethodNode node) {
    super(clazz.getCompiler());
    this.clazz = clazz;
    this.statement = null;
    this.node = node;

    this.localVariables = new LinkedHashMap<>();

    entity = new MethodEntity(getCompiler().getContext());
    entity.setClazz(clazz.entity);
    entity.setName(node.name);
    realName = entity.getName();

    methodId = compiler.getScope().nextMethodIndex();
  }