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

org.snapscript.core.type.index.ScopeType Maven / Gradle / Ivy

package org.snapscript.core.type.index;

import java.util.ArrayList;
import java.util.List;

import org.snapscript.common.LockProgress;
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.module.Module;
import org.snapscript.core.property.Property;
import org.snapscript.core.scope.Scope;
import org.snapscript.core.type.Phase;
import org.snapscript.core.type.Type;
import org.snapscript.core.type.TypeDescription;
import org.snapscript.core.type.StaticScope;

public class ScopeType implements Type {
   
   private final TypeDescription description;
   private final List annotations;
   private final List constraints;
   private final List properties;
   private final List functions;
   private final List types;
   private final Progress progress;
   private final Module module;
   private final Scope scope;
   private final Type outer;
   private final String name;
   private final int modifiers;
   private final int order;
   
   public ScopeType(Module module, Type outer, String name, int modifiers, int order){
      this.description = new TypeDescription(this);
      this.annotations = new ArrayList();
      this.constraints = new ArrayList();
      this.properties = new ArrayList();
      this.functions = new ArrayList();
      this.types = new ArrayList();
      this.progress = new LockProgress();
      this.scope = new StaticScope(this);
      this.modifiers = modifiers;
      this.module = module;
      this.outer = outer;
      this.order = order;
      this.name = name;
   }
   
   @Override
   public Progress getProgress() {
      return progress;
   }
   
   @Override
   public List getAnnotations() {
      return annotations;
   }
   
   @Override
   public List getGenerics() {
      return constraints;
   }
   
   @Override
   public List getProperties() {
      return properties;
   }
   
   @Override
   public List getFunctions(){
      return functions;
   }
   
   @Override
   public List getTypes(){
      return types;
   }
   
   @Override
   public Module getModule(){
      return module;
   }
   
   @Override
   public Scope getScope(){
      return scope;
   }
   
   @Override
   public String getName(){
      return name;
   }
   
   @Override
   public Class getType() {
      return null;
   }
   
   @Override
   public Type getOuter(){
      return outer;
   }
   
   @Override
   public Type getEntry(){
      return null;
   }
   
   @Override
   public int getModifiers() {
      return modifiers;
   }   
   
   @Override
   public int getOrder() {
      return order;
   }
   
   @Override
   public String toString() {
      return description.toString();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy