|
| 1 | +package edu.rice.cs.drjava.model.repl; |
| 2 | + |
| 3 | +//import edu.rice.cs.dynamicjava.symbol.TypeSystem; |
| 4 | +//import edu.rice.cs.dynamicjava.symbol.ExtendedTypeSystem; |
| 5 | +import edu.rice.cs.plt.lambda.LambdaUtil; |
| 6 | +//import edu.rice.cs.plt.lambda.LazyThunk; |
| 7 | +//import edu.rice.cs.plt.lambda.Thunk; |
| 8 | + |
| 9 | +public class Options { |
| 10 | + |
| 11 | + public static final Options DEFAULT = new Options(); |
| 12 | + |
| 13 | +// private final Thunk<? extends TypeSystem> _tsFactory; |
| 14 | + |
| 15 | +// /** For default options, use {@link #DEFAULT}; for custom options, create a subclass. */ |
| 16 | +// protected Options() { _tsFactory = typeSystemFactory(); } |
| 17 | + |
| 18 | +// /** |
| 19 | +// * Provide a factory for the type system. Allows subclasses to control the caching of the |
| 20 | +// * result (for a TypeSystem that should be allocated only once, use a LazyThunk or LambdaUtil.valueLambda). |
| 21 | +// * Note that this method is called from the constructor, before subclass constructors are run. |
| 22 | +// */ |
| 23 | +// protected Thunk<? extends TypeSystem> typeSystemFactory() { |
| 24 | +// return LambdaUtil.valueLambda(new ExtendedTypeSystem(this)); |
| 25 | +// } |
| 26 | + |
| 27 | +// public final TypeSystem typeSystem() { return _tsFactory.value(); } |
| 28 | + |
| 29 | + /** Require a semicolon at the end of statements. */ |
| 30 | + public boolean requireSemicolon() { return false; } |
| 31 | + /** Require variable declarations to include an explicit type. */ |
| 32 | + public boolean requireVariableType() { return false; } |
| 33 | + /** Check that all access of class members is permitted by accessibility controls. */ |
| 34 | + public boolean enforceAllAccess() { return false; } |
| 35 | + /** Check that access of private class members is permitted (irrelevant if enforceAllAccess() is true). */ |
| 36 | + public boolean enforcePrivateAccess() { return false; } |
| 37 | + /** Disallow boxing conversion. */ |
| 38 | + public boolean prohibitBoxing() { return false; } |
| 39 | + /** Disallow unchecked casting conversion. */ |
| 40 | + public boolean prohibitUncheckedCasts() { return true; } |
| 41 | +} |
0 commit comments