package com.github.legioth.propertysource.rebind;

import com.github.legioth.propertysource.client.DynamicPropertySource.PropertyProxy;
import com.google.gwt.core.ext.BadPropertyValueException;
import com.google.gwt.core.ext.PropertyOracle;
import com.google.gwt.core.ext.TreeLogger;
import java.util.List;
import java.util.Set;

class PropertyProxyImpl
  implements PropertyProxy
{
  private final TreeLogger logger;
  private final PropertyOracle oracle;
  private final Set<String> usedSelectionProperties;

  public PropertyProxyImpl( final TreeLogger logger,
                            final PropertyOracle oracle,
                            final Set<String> usedSelectionProperties )
  {
    this.logger = logger;
    this.oracle = oracle;
    this.usedSelectionProperties = usedSelectionProperties;
  }

  @Override
  public String getSelectionPropertyValue( final String name )
  {
    try
    {
      usedSelectionProperties.add( name );
      return oracle.getSelectionProperty( logger, name ).getCurrentValue();
    }
    catch ( BadPropertyValueException e )
    {
      throw new RuntimeException( e );
    }
  }

  @Override
  public String getSelectionPropertyFallback( final String name )
  {
    try
    {
      usedSelectionProperties.add( name );
      return oracle.getSelectionProperty( logger, name ).getFallbackValue();
    }
    catch ( BadPropertyValueException e )
    {
      throw new RuntimeException( e );
    }
  }

  @Override
  public List<String> getConfigurationPropertyValues( final String name )
  {
    try
    {
      return oracle.getConfigurationProperty( name ).getValues();
    }
    catch ( BadPropertyValueException e )
    {
      throw new RuntimeException( e );
    }
  }
}

@@ -399,24 +399,25 @@
  TreeLogger 
+_
 logger;%0A  pr
@@ -439,25 +439,34 @@
 pertyOracle 
-o
+_propertyO
 racle;%0A  pri
@@ -480,32 +480,33 @@
 nal Set%3CString%3E 
+_
 usedSelectionPro
@@ -617,17 +617,25 @@
 yOracle 
-o
+propertyO
 racle,%0A 
@@ -713,21 +713,17 @@
   %7B%0A    
-this.
+_
 logger =
@@ -739,23 +739,35 @@
     
-this.oracle = o
+_propertyOracle = propertyO
 racl
@@ -777,13 +777,9 @@
     
-this.
+_
 used
@@ -921,32 +921,33 @@
 try%0A    %7B%0A      
+_
 usedSelectionPro
@@ -972,33 +972,42 @@
 );%0A      return 
-o
+_propertyO
 racle.getSelecti
@@ -1010,32 +1010,33 @@
 ectionProperty( 
+_
 logger, name ).g
@@ -1259,16 +1259,17 @@
 %7B%0A      
+_
 usedSele
@@ -1302,33 +1302,42 @@
 );%0A      return 
-o
+_propertyO
 racle.getSelecti
@@ -1348,16 +1348,17 @@
 operty( 
+_
 logger, 
@@ -1605,17 +1605,26 @@
  return 
-o
+_propertyO
 racle.ge

Rename fields