Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package com.sun.xml.bind.v2.runtime.reflect;
 /*    */ 
 /*    */ 
 /*    */ public class NullSafeAccessor<B, V, P> extends Accessor<B, V>
 /*    */ {
 /*    */   private final Accessor<B, V> core;
 /*    */   private final Lister<B, V, ?, P> lister;
 /*    */ 
/*    */   public NullSafeAccessor(Accessor<B, V> coreLister<B, V, ?, P> lister)
/*    */   {
/* 55 */     super(core.getValueType());
/* 56 */     this.core = core;
/* 57 */     this.lister = lister;
/*    */   }
/*    */ 
/*    */   public V get(B beanthrows AccessorException {
/* 61 */     Object v = this.core.get(bean);
/* 62 */     if (v == null)
/*    */     {
/* 64 */       Object pack = this.lister.startPacking(bean, this.core);
/* 65 */       this.lister.endPacking(pack, bean, this.core);
/* 66 */       v = this.core.get(bean);
/*    */     }
/* 68 */     return v;
/*    */   }
/*    */ 
/*    */   public void set(B bean, V valuethrows AccessorException {
/* 72 */     this.core.set(bean, value);
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     com.sun.xml.bind.v2.runtime.reflect.NullSafeAccessor
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X