Java Code Examples for groovy.lang.ReadOnlyPropertyException
The following examples show how to use
groovy.lang.ReadOnlyPropertyException.
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: arcusplatform Author: arcus-smart-home File: DriverScriptMetaClass.java License: Apache License 2.0 | 6 votes |
@Override public void setProperty( Class sender, Object object, String name, Object newValue, boolean useSuper, boolean fromInsideClass) { if(!frozen) { super.setProperty(sender, object, name, newValue, useSuper, fromInsideClass); } else { if(hasProperty(object, name) == null) { throw new MissingPropertyException(name); } else { throw new ReadOnlyPropertyException(name, getTheClass()); } } }
Example #2
Source Project: arcusplatform Author: arcus-smart-home File: ZigbeeConfigContext.java License: Apache License 2.0 | 5 votes |
@Override public void setProperty(String property, Object newValue) { switch (property) { case "reflex": throw new ReadOnlyPropertyException("reflex", getClass()); case "Data": throw new ReadOnlyPropertyException("reflex", getClass()); default: super.setProperty(property, newValue); break; } }
Example #3
Source Project: arcusplatform Author: arcus-smart-home File: AttributesContext.java License: Apache License 2.0 | 5 votes |
@Override public void setProperty(String property, Object newValue) { if(Utils.isNamespaced(property)) { setAttribute(property, newValue); } else { throw new ReadOnlyPropertyException(property, getClass()); } }
Example #4
Source Project: arcusplatform Author: arcus-smart-home File: DriverScriptMetaClass.java License: Apache License 2.0 | 5 votes |
@Override public void setAttribute( Class sender, Object object, String attribute, Object newValue, boolean useSuper, boolean fromInsideClass) { if(!frozen) { super.setAttribute( sender, object, attribute, newValue, useSuper, fromInsideClass); } else { throw new ReadOnlyPropertyException(attribute, getTheClass()); } }
Example #5
Source Project: pushfish-android Author: PushFish File: DefaultExtraPropertiesExtension.java License: BSD 2-Clause "Simplified" License | 4 votes |
public void setProperty(String name, Object newValue) { if (name.equals("properties")) { throw new ReadOnlyPropertyException("name", ExtraPropertiesExtension.class); } set(name, newValue); }
Example #6
Source Project: pushfish-android Author: PushFish File: DefaultExtraPropertiesExtension.java License: BSD 2-Clause "Simplified" License | 4 votes |
public void setProperty(String name, Object newValue) { if (name.equals("properties")) { throw new ReadOnlyPropertyException("name", ExtraPropertiesExtension.class); } set(name, newValue); }
Example #7
Source Project: groovy Author: apache File: ResultSetMetaDataWrapper.java License: Apache License 2.0 | 4 votes |
@Override public void setProperty(String property, Object newValue) { throw new ReadOnlyPropertyException(property, target.getClass()); }
Example #8
Source Project: groovy Author: apache File: BindingProxy.java License: Apache License 2.0 | 4 votes |
public void setProperty(String property, Object value) { throw new ReadOnlyPropertyException(property, getModel().getClass()); }
Example #9
Source Project: Pushjet-Android Author: Pushjet File: DefaultExtraPropertiesExtension.java License: BSD 2-Clause "Simplified" License | 4 votes |
public void setProperty(String name, Object newValue) { if (name.equals("properties")) { throw new ReadOnlyPropertyException("name", ExtraPropertiesExtension.class); } set(name, newValue); }
Example #10
Source Project: Pushjet-Android Author: Pushjet File: DefaultExtraPropertiesExtension.java License: BSD 2-Clause "Simplified" License | 4 votes |
public void setProperty(String name, Object newValue) { if (name.equals("properties")) { throw new ReadOnlyPropertyException("name", ExtraPropertiesExtension.class); } set(name, newValue); }