package org.andnav.osm;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;

public class ResourceProxyImpl implements ResourceProxy {

	private final Context mContext;
	
	public ResourceProxyImpl(final Context pContext) {
		mContext = pContext;
	}

	@Override
	public String getString(string pResId) {
		switch(pResId) {
		case osmarender : return mContext.getString(R.string.osmarender);
		case mapnik : return mContext.getString(R.string.mapnik);
		case cyclemap : return mContext.getString(R.string.cyclemap);
		case openareal_sat : return mContext.getString(R.string.openareal_sat);
		case base : return mContext.getString(R.string.base);
		case topo : return mContext.getString(R.string.topo);
		case hills : return mContext.getString(R.string.hills);
		case cloudmade_small : return mContext.getString(R.string.cloudmade_small);
		case cloudmade_standard : return mContext.getString(R.string.cloudmade_standard);
		case unknown : return mContext.getString(R.string.unknown);
		default : throw new IllegalArgumentException();
		}
	}

	@Override
	public Bitmap getBitmap(bitmap pResId) {
		switch(pResId) {
		case center : return BitmapFactory.decodeResource(mContext.getResources(), R.drawable.center);
		case direction_arrow : return BitmapFactory.decodeResource(mContext.getResources(), R.drawable.direction_arrow);
		case navto_small : return BitmapFactory.decodeResource(mContext.getResources(), R.drawable.navto_small);
		case next : return BitmapFactory.decodeResource(mContext.getResources(), R.drawable.next);
		case person : return BitmapFactory.decodeResource(mContext.getResources(), R.drawable.person);
		case previous : return BitmapFactory.decodeResource(mContext.getResources(), R.drawable.previous);
		default : throw new IllegalArgumentException();
		}
	}

	@Override
	public Drawable getDrawable(drawable pResId) {
		switch(pResId) {
		case marker_default : return mContext.getResources().getDrawable(R.drawable.marker_default);
		case marker_default_focused_base : return mContext.getResources().getDrawable(R.drawable.marker_default_focused_base);
		default : throw new IllegalArgumentException();
		}
	}
}

@@ -207,19 +207,23 @@
 mpl 
-implement
+extend
 s 
+Default
 Reso
@@ -231,16 +231,20 @@
 rceProxy
+Impl
  %7B%0D%0A%0D%0A%09p
@@ -1122,43 +1122,37 @@
 t : 
-throw new IllegalArgumentException(
+return super.getString(pResId
 );%0D%0A
@@ -1869,43 +1869,37 @@
 t : 
-throw new IllegalArgumentException(
+return super.getBitmap(pResId
 );%0D%0A
@@ -2224,43 +2224,39 @@
 t : 
-throw new IllegalArgumentException(
+return super.getDrawable(pResId
 );%0D%0A

Make ResourceProxyImpl extend DefaultResourceProxyImpl and return super for default case