/** * Akin to {@link #getPropertyType(Object,String)} but never returns null. * @throws AssertionError in case the field cannot be found * @since 1.492 */ public @Nonnull PropertyType getPropertyTypeOrDie(@Nonnull Object instance, @Nonnull String field) { PropertyType propertyType = getPropertyType(instance, field); if (propertyType != null) { return propertyType; } else if (instance == this) { throw new AssertionError(getClass().getName() + " has no property " + field); } else { throw new AssertionError(clazz.getName() + " has no property " + field); } }
/** * Used by Jelly to abstract away the handling of global.jelly vs config.jelly databinding difference. */ public @CheckForNull PropertyType getPropertyType(@Nonnull Object instance, @Nonnull String field) { // in global.jelly, instance==descriptor return instance==this ? getGlobalPropertyType(field) : getPropertyType(field); }
public PropertyType superGetPropertyType(String field) { return super.getPropertyType(field); }
public PropertyType superGetPropertyType(@Nonnull Object instance, @Nonnull String field) { return super.getPropertyType(instance, field); }
/** * Used by Jelly to abstract away the handlign of global.jelly vs config.jelly databinding difference. */ public PropertyType getPropertyType(Object instance, String field) { // in global.jelly, instance==descriptor return instance==this ? getGlobalPropertyType(field) : getPropertyType(field); }
/** * Used by Jelly to abstract away the handling of global.jelly vs config.jelly databinding difference. */ public @CheckForNull PropertyType getPropertyType(@Nonnull Object instance, @Nonnull String field) { // in global.jelly, instance==descriptor return instance==this ? getGlobalPropertyType(field) : getPropertyType(field); }
/** * Akin to {@link #getPropertyType(Object,String)} but never returns null. * @throws AssertionError in case the field cannot be found * @since 1.492 */ public @Nonnull PropertyType getPropertyTypeOrDie(@Nonnull Object instance, @Nonnull String field) { PropertyType propertyType = getPropertyType(instance, field); if (propertyType != null) { return propertyType; } else if (instance == this) { throw new AssertionError(getClass().getName() + " has no property " + field); } else { throw new AssertionError(clazz.getName() + " has no property " + field); } }
/** * Used by Jelly to abstract away the handlign of global.jelly vs config.jelly databinding difference. */ public PropertyType getPropertyType(Object instance, String field) { // in global.jelly, instance==descriptor return instance==this ? getGlobalPropertyType(field) : getPropertyType(field); }
/** * Used by Jelly to abstract away the handlign of global.jelly vs config.jelly databinding difference. */ public PropertyType getPropertyType(Object instance, String field) { // in global.jelly, instance==descriptor return instance==this ? getGlobalPropertyType(field) : getPropertyType(field); }
/** * Used by Jelly to abstract away the handlign of global.jelly vs * config.jelly databinding difference. */ public PropertyType getPropertyType(Object instance, String field) { // in global.jelly, instance==descriptor return instance == this ? getGlobalPropertyType(field) : getPropertyType(field); }
@Override public @CheckForNull PropertyType getPropertyType(@Nonnull Object instance, @Nonnull String field) { initPython(); if (pexec.isImplemented(6)) { return (PropertyType) pexec.execPython("get_property_type", instance, field); } else { return super.getPropertyType(instance, field); } }
@Override public PropertyType getPropertyType(String field) { initPython(); if (pexec.isImplemented(8)) { return (PropertyType) pexec.execPython("get_property_type", field); } else { return super.getPropertyType(field); } }