All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.lang.reflect.MetaPropertyInfoDelegate Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
/*
 * Copyright 2014 Guidewire Software, Inc.
 */

package gw.lang.reflect;

public class MetaPropertyInfoDelegate extends PropertyInfoDelegate implements ITypeInfoPropertyInfo
{
  public MetaPropertyInfoDelegate( ITypeInfo container, IPropertyInfo source )
  {
    super( container, source );
  }

  public boolean isStatic()
  {
    return !getSource().isStatic();
  }

  public IPropertyAccessor getAccessor()
  {
    return new Accessor();
  }

  @Override
  public IPropertyInfo getBackingPropertyInfo()
  {
    return getDelegatePI();
  }

  private class Accessor implements IPropertyAccessor
  {
    public Object getValue( Object ctx )
    {
      return getSource().getAccessor().getValue( ctx );
    }

    public void setValue( Object ctx, Object value )
    {
      getSource().getAccessor().setValue( ctx, value );
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy