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(); }
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(); }