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

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

package org.snapscript.core.module;

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

import java.util.Collections;
import java.util.List;

import org.snapscript.common.CompleteProgress;
import org.snapscript.common.Progress;
import org.snapscript.core.annotation.Annotation;
import org.snapscript.core.constraint.Constraint;
import org.snapscript.core.function.Function;
import org.snapscript.core.property.Property;
import org.snapscript.core.scope.Scope;
import org.snapscript.core.type.Phase;
import org.snapscript.core.type.Type;

public class ModuleType implements Type {
   
   private final Progress progress;
   private final Module module;
   
   public ModuleType(Module module) {
      this.progress = new CompleteProgress();
      this.module = module;
   }

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

   @Override
   public List getAnnotations() {
      return module.getAnnotations();
   }
   
   @Override
   public List getGenerics() {
      return Collections.emptyList();
   }

   @Override
   public List getProperties() {
      return module.getProperties();
   }

   @Override
   public List getFunctions() {
      return module.getFunctions();
   }

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

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

   @Override
   public Scope getScope() {
      return module.getScope();
   }

   @Override
   public Class getType() {
      return Module.class;
   }

   @Override
   public Type getOuter() {
      return null;
   }

   @Override
   public Type getEntry() {
      return null;
   }

   @Override
   public String getName() {
      return module.getName();
   }
   
   @Override
   public int getModifiers(){
      return MODULE.mask;
   }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy