コード例 #1
0
 public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory) {
   return type == null
       ? ValueFactory.REFERENCE_VALUE_NULL
       : !ClassUtil.isInternalArrayType(type)
           ? ValueFactory.REFERENCE_VALUE_JAVA_LANG_OBJECT_MAYBE_NULL
           : valueFactory.createValue(type.substring(1), referencedClass, true).referenceValue();
 }
コード例 #2
0
ファイル: PolygonValue.java プロジェクト: inutard/cra
 public Value eval(RCvalue args) throws EvalException {
   if (args.size() != 2) throw new EvalException("usage: reduce(polygon, errtol])");
   PolygonValue pv1 = (PolygonValue) args.value(0);
   PolygonValue pv2 = (PolygonValue) args.value(1);
   boolean isContain = pv1.polygon().contains(pv2.polygon());
   double contain = 0;
   if (isContain) {
     contain = 1; // we don't have a boolean factory now.
   }
   return ValueFactory.create(contain);
 }
コード例 #3
0
 /** Returns the length of the array, assuming this type is an array. */
 public IntegerValue arrayLength(ValueFactory valueFactory) {
   return valueFactory.createIntegerValue();
 }