All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.tree.InstructionResolver Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.snapscript.tree;

import java.util.Map;

import org.snapscript.core.Context;

public class InstructionResolver implements OperationResolver {
   
   private volatile Map operations;
   private volatile InstructionBuilder builder;
   
   public InstructionResolver(Context context, String file) {
      this.builder = new InstructionBuilder(context, file);
   }

   @Override
   public Operation resolve(String name) throws Exception {
      if(operations == null) {            
         operations = builder.create();         
      }      
      return operations.get(name);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy