@Test public void testCanWriteNonExt() throws AccessException { boolean canWrite = accessor.canWrite(evalContext, obj, "name"); Assert.assertFalse(canWrite); }
@Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { if (target instanceof BaseObjectWithExts && name != null) { for (PropertyAccessor accessor : context.getPropertyAccessors()) { if (accessor instanceof ReflectivePropertyAccessor) { return !accessor.canWrite(context, target, name); } } } return false; }
ExtendedAttributePropertyAccessor implements PropertyAccessor { @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { if (target instanceof BaseObjectWithExts && name != null) { for (PropertyAccessor accessor : context.getPropertyAccessors()) { if (accessor instanceof ReflectivePropertyAccessor) { return !accessor.canWrite(context, target, name); } } } return false; } }
ExtendedAttributePropertyAccessor implements PropertyAccessor { @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { if (target instanceof BaseObjectWithExts && name != null) { for (PropertyAccessor accessor : context.getPropertyAccessors()) { if (accessor instanceof ReflectivePropertyAccessor) { return !accessor.canWrite(context, target, name); } } } return false; }  }
ExtendedAttributePropertyAccessor implements PropertyAccessor { @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { if (target instanceof BaseObjectWithExts && name != null) { for (PropertyAccessor accessor : context.getPropertyAccessors()) { if (accessor instanceof ReflectivePropertyAccessor) { return !accessor.canWrite(context, target, name); } } } return false; }  @Override Class<?>[] getSpecificTargetClasses(); @Override boolean canRead(EvaluationContext context, Object target, String name); @Override TypedValue read(EvaluationContext context, Object target, String name); @Override boolean canWrite(EvaluationContext context, Object target, String name); @Override void write(EvaluationContext context, Object target, String name, Object newValue); }
ExtendedAttributePropertyAccessor implements PropertyAccessor { @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { if (target instanceof BaseObjectWithExts && name != null) { for (PropertyAccessor accessor : context.getPropertyAccessors()) { if (accessor instanceof ReflectivePropertyAccessor) { return !accessor.canWrite(context, target, name); } } } return false; }  @Override Class<?>[] getSpecificTargetClasses(); @Override boolean canRead(EvaluationContext context, Object target, String name); @Override TypedValue read(EvaluationContext context, Object target, String name); @Override boolean canWrite(EvaluationContext context, Object target, String name); @Override void write(EvaluationContext context, Object target, String name, Object newValue);  }