throws NullPointerException, PropertyNotFoundException,
PropertyNotWritableException, ELException
{
if (SeamMockELResolverTest.property.equals(property))
{
throw new PropertyNotWritableException();
}
}
};
resolvers[1] = new ELResolver() {
@Override
public Class<?> getCommonPropertyType(ELContext arg0, Object arg1)
{
return null;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext arg0, Object arg1)
{
return null;
}
@Override
public Class<?> getType(ELContext arg0, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException
{
return null;
}
@Override
public Object getValue(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException
{
if (base != null && "className".equals(property))
{
context.setPropertyResolved(true);
return base.getClass().getSimpleName();
}
return null;
}
@Override
public boolean isReadOnly(ELContext arg0, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException
{
return true;
}
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
throws NullPointerException, PropertyNotFoundException,
PropertyNotWritableException, ELException
{
throw new PropertyNotWritableException();
}
};
return resolvers;
}