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

org.snapscript.tree.define.GenericList Maven / Gradle / Ivy

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

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

import org.snapscript.core.constraint.Constraint;
import org.snapscript.core.scope.Scope;

public class GenericList {

   private final GenericParameter[] declarations;
   
   public GenericList(GenericParameter... declarations) {
      this.declarations = declarations;
   }
   
   public List getGenerics(Scope scope) throws Exception {
      List generics = new ArrayList();
      
      if(declarations != null) {
         for(GenericParameter declaration : declarations) {
            Constraint constraint = declaration.getGeneric(scope);
            generics.add(constraint);
         }
      }
      return generics;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy