Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * JBoss, Home of Professional Open Source
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site:
 package org.jboss.managed.plugins;
An extension of ManagedPropertyImpl.

$Revision: 79872 $
    private static final long serialVersionUID = 1;

The meta value factory
    private transient MetaValueFactory valueFactory;
The managed object factory
    private transient ManagedObjectFactory objectFactory;
    public WritethroughManagedPropertyImpl(Fields fields)
    public WritethroughManagedPropertyImpl(ManagedObject managedObjectFields fields)
    public WritethroughManagedPropertyImpl(Fields fieldsMetaValueFactory valueFactoryManagedObjectFactory objectFactory)
       this. = valueFactory;
       this. = objectFactory;
       if ( == null)
           = ManagedObjectFactoryBuilder.create();
       return ;
    protected MetaValueFactory getValueFactory()
       if ( == null)
           = MetaValueFactoryBuilder.create();
       return ;

Write the value back to the attachment if there is a PropertyInfo in the Fields.PROPERTY_INFO field.
    public void setValue(Serializable value)
       PropertyInfo propertyInfo = getField(.PropertyInfo.class);
       if (propertyInfo != null)
          Object attachment = getManagedObject().getAttachment();
          if (attachment != null)
            MetaValue metaValue;
            if (value instanceof MetaValue == false)
               metaValue = getValueFactory().create(valuepropertyInfo.getType());
               metaValue = (MetaValue)value;
            InstanceClassFactory icf = getObjectFactory().getInstanceClassFactory(attachment.getClass());
            BeanInfo beanInfo = propertyInfo.getBeanInfo();

Expose only plain ManangedPropertyImpl.

simpler ManagedPropertyImpl
Throws: for any error
   private Object writeReplace() throws ObjectStreamException
      ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
      return managedProperty;
New to GrepCode? Check out our FAQ X