
org.snapscript.tree.constraint.GenericParameterList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap Show documentation
Show all versions of snap Show documentation
Dynamic scripting for the JVM
The newest version!
package org.snapscript.tree.constraint;
import java.util.ArrayList;
import java.util.List;
import org.snapscript.core.constraint.Constraint;
import org.snapscript.core.scope.Scope;
public class GenericParameterList implements GenericList {
private final GenericParameter[] declarations;
public GenericParameterList(GenericParameter... declarations) {
this.declarations = declarations;
}
@Override
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 - 2025 Weber Informatics LLC | Privacy Policy