001package org.clafer.javascript; 002 003import org.clafer.assertion.Assertion; 004import org.clafer.ast.AstModel; 005import org.clafer.compiler.ClaferOption; 006import org.clafer.objective.Objective; 007import org.clafer.scope.Scope; 008 009/** 010 * 011 * @author jimmy 012 */ 013public class JavascriptFile { 014 015 private final AstModel model; 016 private final Scope scope; 017 private final ClaferOption option; 018 private final Objective[] objectives; 019 private final Assertion[] assertions; 020 private final boolean hasIntRange; 021 022 public JavascriptFile(AstModel model, Scope scope, ClaferOption option, Objective[] objectives, Assertion[] assertions) { 023 this(model, scope, option, objectives, assertions, false); 024 } 025 026 public JavascriptFile(AstModel model, Scope scope, ClaferOption option, Objective[] objectives, Assertion[] assertions, boolean hasIntRange) { 027 this.model = model; 028 this.scope = scope; 029 this.option = option; 030 this.objectives = objectives; 031 this.assertions = assertions; 032 this.hasIntRange = hasIntRange; 033 } 034 035 public AstModel getModel() { 036 return model; 037 } 038 039 public Scope getScope() { 040 return scope; 041 } 042 043 public ClaferOption getOption() { 044 return option; 045 } 046 047 public Objective[] getObjectives() { 048 return objectives; 049 } 050 051 public Assertion[] getAssertions() { 052 return assertions; 053 } 054 055 /** 056 * @return whether the model sets its integer range (intRange), so the scope's 057 * integer range is not the default 058 */ 059 public boolean hasIntRange() { 060 return hasIntRange; 061 } 062}