Lines Matching defs:openType

68     private OpenType<?> openType;
101 * specified {@code name}, {@code openType} and {@code
108 * @param openType cannot be null.
120 * description} are null or empty string, or {@code openType} is
125 OpenType<?> openType,
129 this(name, description, openType, isReadable, isWritable, isIs,
136 * specified {@code name}, {@code openType}, {@code
148 * @param openType cannot be null.
163 * description} are null or empty string, or {@code openType} is
172 OpenType<?> openType,
180 (openType==null) ? null : openType.getClassName(),
185 ImmutableDescriptor.union(descriptor, (openType==null)?null:
186 openType.getDescriptor()));
190 this.openType = openType;
193 this.defaultValue = valueFrom(descriptor, "defaultValue", openType);
194 this.legalValues = valuesFrom(descriptor, "legalValues", openType);
195 this.minValue = comparableValueFrom(descriptor, "minValue", openType);
196 this.maxValue = comparableValueFrom(descriptor, "maxValue", openType);
208 * specified {@code name}, {@code openType}, {@code description}
216 * @param openType cannot be null.
228 * openType} specified for this attribute; default value not
233 * if non-null, has the correct Java type for the given {@code openType}.
236 * description} are null or empty string, or {@code openType} is
240 * valid value for the specified {@code openType}, or {@code
241 * defaultValue} is non null and {@code openType} is an {@code
246 OpenType<T> openType,
252 this(name, description, openType, isReadable, isWritable, isIs,
260 * specified {@code name}, {@code openType}, {@code description},
273 * @param openType cannot be null.
286 * openType} specified for this attribute; default value not
291 * {@code openType} specified for this attribute; legal values
297 * correct Java type for the given {@code openType}.
300 * description} are null or empty string, or {@code openType} is
304 * valid value for the specified {@code openType}, or one value in
306 * openType}, or {@code defaultValue} is non null and {@code
307 * openType} is an {@code ArrayType} or a {@code TabularType}, or
309 * openType} is an {@code ArrayType} or a {@code TabularType}, or
315 OpenType<T> openType,
322 this(name, description, openType, isReadable, isWritable, isIs,
330 * specified {@code name}, {@code openType}, {@code description},
340 * @param openType cannot be null.
352 * openType} specified for this attribute; default value not
356 * @param minValue must be valid for the {@code openType}
360 * @param maxValue must be valid for the {@code openType}
367 * openType}.
370 * description} are null or empty string, or {@code openType} is
375 * specified {@code openType}, or {@code defaultValue} is non null
376 * and {@code openType} is an {@code ArrayType} or a {@code
387 OpenType<T> openType,
395 this(name, description, openType, isReadable, isWritable, isIs,
401 OpenType<T> openType,
411 (openType==null) ? null : openType.getClassName(),
416 makeDescriptor(openType,
419 this.openType = openType;
437 * where the Descriptors reflect the same values of openType, defaultValue,
442 OpenType<Object> xopenType = cast(openType);
447 name, description, openType,
456 OpenType<?> openType = info.getOpenType();
457 if (openType == null)
473 if (openType.isArray() || (Object)openType instanceof TabularType) {
478 if (!openType.isValue(info.getDefaultValue())) {
482 "\"] does not match the one defined in openType[\"" +
483 openType.getClassName() +"\"]";
497 if (info.hasMinValue() && !openType.isValue(info.getMinValue())) {
500 "] does not match OpenType [" + openType.getClassName() + "]";
503 if (info.hasMaxValue() && !openType.isValue(info.getMaxValue())) {
506 "] does not match OpenType [" + openType.getClassName() + "]";
540 if ((Object)openType instanceof TabularType || openType.isArray()) {
544 // Check legalValues are valid with openType
546 if (!openType.isValue(v)) {
549 "] is not a valid value for the specified openType [" +
550 openType.toString() +"]";
573 static <T> Descriptor makeDescriptor(OpenType<T> openType,
593 return openType.getDescriptor();
595 map.put("openType", openType);
600 static <T> Descriptor makeDescriptor(OpenType<T> openType,
612 return makeDescriptor(openType, defaultValue, legals, minValue, maxValue);
616 static <T> T valueFrom(Descriptor d, String name, OpenType<T> openType) {
621 return convertFrom(x, openType);
625 openType.getTypeName();
631 OpenType<T> openType) {
640 if (!openType.isValue(element)) {
659 result.add(convertFrom(element, openType));
664 OpenType<T> openType) {
665 T t = valueFrom(d, name, openType);
674 private static <T> T convertFrom(Object x, OpenType<T> openType) {
675 if (openType.isValue(x)) {
679 return convertFromStrings(x, openType);
682 private static <T> T convertFromStrings(Object x, OpenType<T> openType) {
683 if (openType instanceof ArrayType<?>)
684 return convertFromStringArray(x, openType);
686 return convertFromString((String) x, openType);
689 x.getClass().getName() + " to type " + openType.getTypeName();
693 private static <T> T convertFromString(String s, OpenType<T> openType) {
696 ReflectUtil.checkPackageAccess(openType.safeGetClassName());
697 c = cast(Class.forName(openType.safeGetClassName()));
706 // was checked before by ReflectUtil.checkPackageAccess(openType.safeGetClassName());
728 // was checked before by ReflectUtil.checkPackageAccess(openType.safeGetClassName());
745 openType.getTypeName());
755 OpenType<T> openType) {
756 ArrayType<?> arrayType = (ArrayType<?>) openType;
813 return openType;
1119 ",openType=" + info.getOpenType() +