public static MemberDefinition makeProxyMember(MemberDefinition field,ClassDefinition classDef,Environment env){
  if (proxyCache == null) {
    proxyCache=new HashMap();
  }
  String key=field.toString() + "@" + classDef.toString();
  MemberDefinition proxy=(MemberDefinition)proxyCache.get(key);
  if (proxy != null)   return proxy;
  proxy=new MemberDefinition(field.getWhere(),classDef,field.getModifiers(),field.getType(),field.getName(),field.getExceptionIds(),null);
  proxy.exp=field.getExceptions(env);
  proxyCache.put(key,proxy);
  return proxy;
}

public static MemberDefinition makeProxyMember ( MemberDefinition field , ClassDefinition classDef , Environment env ) { if ( proxyCache == null ) { proxyCache = new HashMap ( ) ; } String key = field . toString ( ) + "@" + classDef . toString ( ) ; MemberDefinition proxy = ( MemberDefinition ) proxyCache . get ( key ) ; if ( proxy != null ) return proxy ; proxy = new MemberDefinition ( field . getWhere ( ) , classDef , field . getModifiers ( ) , field . getType ( ) , field . getName ( ) , field . getExceptionIds ( ) , null ) ; proxy . exp = field . getExceptions ( env ) ; proxyCache . put ( key , proxy ) ; return proxy ; }
create a member which is externally the same as ` field ' but is defined in class ` classdef ' . this is used by code in sun . tools . tree . ( methodexpression , fieldexpression ) as part of the fix for bug 4135692 . proxy members should not be added , ala addmember ( ) , to classes . they are merely " stand - ins " to produce modified methodref constant pool entries during code generation . we keep a cache of previously created proxy members not to save time or space , but to ensure uniqueness of the proxy member for any ( field , classdef ) pair . if these are not made unique then we can end up generating duplicate methodref constant pool entries during code generation .
