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

org.snapscript.core.module.EmptyModule Maven / Gradle / Ivy

package org.snapscript.core.module;

import static org.snapscript.core.ModifierType.MODULE;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.snapscript.common.CompleteProgress;
import org.snapscript.common.Progress;
import org.snapscript.core.Context;
import org.snapscript.core.Reserved;
import org.snapscript.core.annotation.Annotation;
import org.snapscript.core.function.Function;
import org.snapscript.core.link.ImportManager;
import org.snapscript.core.property.Property;
import org.snapscript.core.scope.ModelScope;
import org.snapscript.core.scope.Scope;
import org.snapscript.core.type.Phase;
import org.snapscript.core.type.Type;

public class EmptyModule implements Module {

   private final List properties;
   private final List functions;
   private final Progress progress;
   private final Context context;
   private final Scope scope;
   private final Type type;
   
   public EmptyModule(Context context) {
      this.progress = new CompleteProgress();
      this.properties = new ArrayList();
      this.functions = new ArrayList();      
      this.scope = new ModelScope(null, this);
      this.type = new ModuleType(this);
      this.context = context;
   }
   
   @Override
   public Type getType() {
      return type;
   }

   @Override
   public Scope getScope() {
      return scope;
   }

   @Override
   public Context getContext() {
      return context;
   }
   
   @Override
   public Progress getProgress() {
      return progress;
   }

   @Override
   public ImportManager getManager() {
      return null;
   }

   @Override
   public Type getType(Class type) {
      return null;
   }

   @Override
   public Type getType(String name) {
      return null;
   }

   @Override
   public Type addType(String name, int modifiers) {
      return null;
   }

   @Override
   public Module getModule(String module) {
      return null;
   }

   @Override
   public InputStream getResource(String path) {
      return null;
   }

   @Override
   public List getAnnotations() {
      return Collections.emptyList();
   }
   
   @Override
   public List getProperties() {
      return properties;
   }

   @Override
   public List getFunctions() {
      return functions;
   }

   @Override
   public List getTypes() {
      return Collections.emptyList();
   }

   @Override
   public String getName() {
      return null;
   }

   @Override
   public Path getPath() {
      return null;
   }
   
   @Override
   public int getModifiers() {
      return MODULE.mask;
   }

   @Override
   public int getOrder() {
      return 0;
   }
   
   @Override
   public String toString() {
      return Reserved.DEFAULT_PACKAGE;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy