/** * A utility method which returns the Class from the given Class name * using the current type context's class loader with * createASObjectForMissingType=false. * * @param className the class name. * @return a Class object for the named class. */ public static Class getClassFromClassName(String className) { return getClassFromClassName(className, false); }
protected void setCloneFieldsFrom(AbstractProxy source) { setDescriptor(source.getDescriptor()); setDefaultInstance(source.getDefaultInstance()); context = source.context; includeReadOnly = source.includeReadOnly; } }
/** {@inheritDoc} */ public List getPropertyNames() { return getPropertyNames(getDefaultInstance()); }
/** {@inheritDoc} */ public Object getValue(String propertyName) { return getValue(getDefaultInstance(), propertyName); }
/** {@inheritDoc} */ public void setValue(String propertyName, Object value) { setValue(getDefaultInstance(), propertyName, value); }
/** {@inheritDoc} */ public Class getType(String propertyName) { return getType(getDefaultInstance(), propertyName); }
/** {@inheritDoc} */ public Object clone() { try { AbstractProxy clonedProxy= (AbstractProxy) super.clone(); clonedProxy.setCloneFieldsFrom(this); return clonedProxy; } catch (CloneNotSupportedException e) { if (Log.isError()) { Logger log = Log.getLogger(LOG_CATEGORY); log.error("Failed to clone a property proxy: " + toString()); } MessageException ex = new MessageException(); ex.setMessage(CONVERSION_ERROR); throw ex; } }
/** {@inheritDoc} */ public Object createInstance(String className) { Object instance; if (className == null || className.length() == 0) { instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/); } else if (className.startsWith(">")) // Handle [RemoteClass] (no server alias) { instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/); ((ASObject)instance).setType(className); } else { if (getSerializationContext().instantiateTypes || className.startsWith("flex.")) return createInstanceFromClassName(className); // Just return type info with an ASObject... instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/); ((ASObject)instance).setType(className); } return instance; }
/** {@inheritDoc} */ public boolean getIncludeReadOnly() { if (includeReadOnly) { return true; } return getSerializationContext().includeReadOnly; }
/** {@inheritDoc} */ public Object getValue(String propertyName) { return getValue(getDefaultInstance(), propertyName); }
/** {@inheritDoc} */ public void setValue(String propertyName, Object value) { setValue(getDefaultInstance(), propertyName, value); }
/** {@inheritDoc} */ public Class getType(String propertyName) { return getType(getDefaultInstance(), propertyName); }
/** {@inheritDoc} */ @Override public Object clone() { try { AbstractProxy clonedProxy= (AbstractProxy) super.clone(); clonedProxy.setCloneFieldsFrom(this); return clonedProxy; } catch (CloneNotSupportedException e) { if (Log.isError()) { Logger log = Log.getLogger(LOG_CATEGORY); log.error("Failed to clone a property proxy: " + toString()); } MessageException ex = new MessageException(); ex.setMessage(CONVERSION_ERROR); throw ex; } }
/** {@inheritDoc} */ public Object createInstance(String className) { Object instance; if (className == null || className.length() == 0) { instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/); } else if (className.startsWith(">")) // Handle [RemoteClass] (no server alias) { instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/); ((ASObject)instance).setType(className); } else { if (getSerializationContext().instantiateTypes || className.startsWith("flex.")) return createInstanceFromClassName(className); // Just return type info with an ASObject... instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/); ((ASObject)instance).setType(className); } return instance; }
/** {@inheritDoc} */ public boolean getIncludeReadOnly() { if (includeReadOnly) { return true; } return getSerializationContext().includeReadOnly; }
protected void setCloneFieldsFrom(AbstractProxy source) { setDescriptor(source.getDescriptor()); setDefaultInstance(source.getDefaultInstance()); context = source.context; includeReadOnly = source.includeReadOnly; } }
/** {@inheritDoc} */ public List getPropertyNames() { return getPropertyNames(getDefaultInstance()); }
/** {@inheritDoc} */ public Object getValue(String propertyName) { return getValue(getDefaultInstance(), propertyName); }
/** {@inheritDoc} */ public void setValue(String propertyName, Object value) { setValue(getDefaultInstance(), propertyName, value); }
/** {@inheritDoc} */ public Class getType(String propertyName) { return getType(getDefaultInstance(), propertyName); }