ClassIntrospector build(){
  if ((methodAppearanceFineTuner == null || methodAppearanceFineTuner instanceof SingletonCustomizer) && (methodSorter == null || methodSorter instanceof SingletonCustomizer)) {
    ClassIntrospector instance;
synchronized (INSTANCE_CACHE) {
      Reference instanceRef=(Reference)INSTANCE_CACHE.get(this);
      instance=instanceRef != null ? (ClassIntrospector)instanceRef.get() : null;
      if (instance == null) {
        ClassIntrospectorBuilder thisClone=(ClassIntrospectorBuilder)clone();
        instance=new ClassIntrospector(thisClone,new Object(),true,true);
        INSTANCE_CACHE.put(thisClone,new WeakReference(instance,INSTANCE_CACHE_REF_QUEUE));
      }
    }
    removeClearedReferencesFromInstanceCache();
    return instance;
  }
 else {
    return new ClassIntrospector(this,new Object(),true,false);
  }
}

ClassIntrospector build ( ) { if ( ( methodAppearanceFineTuner == null || methodAppearanceFineTuner instanceof SingletonCustomizer ) && ( methodSorter == null || methodSorter instanceof SingletonCustomizer ) ) { ClassIntrospector instance ; synchronized ( INSTANCE_CACHE ) { Reference instanceRef = ( Reference ) INSTANCE_CACHE . get ( this ) ; instance = instanceRef != null ? ( ClassIntrospector ) instanceRef . get ( ) : null ; if ( instance == null ) { ClassIntrospectorBuilder thisClone = ( ClassIntrospectorBuilder ) clone ( ) ; instance = new ClassIntrospector ( thisClone , new Object ( ) , true , true ) ; INSTANCE_CACHE . put ( thisClone , new WeakReference ( instance , INSTANCE_CACHE_REF_QUEUE ) ) ; } } removeClearedReferencesFromInstanceCache ( ) ; return instance ; } else { return new ClassIntrospector ( this , new Object ( ) , true , false ) ; } }
returns an instance that is possibly shared ( singleton ) . note that this comes with its own " shared lock " , since everyone who uses this object will have to lock with that common object .
