Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.aop.array;
 /*    */ 
 /*    */ import java.util.ArrayList;
 /*    */ import java.util.List;
 /*    */ 
 /*    */ public class ArrayReferenceImpl
 /*    */   implements ArrayReference
 /*    */ {
 /*    */   Object root;
/*    */   String rootField;
/*    */ 
/*    */   public ArrayReferenceImpl(Object rootString rootField)
/*    */   {
/* 40 */     this.root = root;
/* 41 */     this.rootField = rootField;
/*    */   }
/*    */ 
/*    */   public Object getRootObject()
/*    */   {
/* 46 */     return this.root;
/*    */   }
/*    */ 
/*    */   public String getRootField()
/*    */   {
/* 51 */     return this.rootField;
/*    */   }
/*    */ 
/*    */   public void addNestedArrayIndex(Integer index)
/*    */   {
/* 56 */     if (this.nestedArrayIndices == null)
/*    */     {
/* 58 */       this.nestedArrayIndices = new ArrayList();
/*    */     }
/* 60 */     this.nestedArrayIndices.add(index);
/*    */   }
/*    */ 
/*    */   public List<IntegergetNestedArrayIndices()
/*    */   {
/* 65 */     return this.nestedArrayIndices;
/*    */   }
/*    */ 
/*    */   public String toString()
/*    */   {
/* 70 */     StringBuffer sb = new StringBuffer();
/* 71 */     sb.append(this.root + "." + this.rootField);
/*    */ 
/* 73 */     if ((this.nestedArrayIndices != null) && (this.nestedArrayIndices.size() > 0))
/*    */     {
/* 75 */       for (Integer index : this.nestedArrayIndices)
/*    */       {
/* 77 */         sb.append("[" + index + "]");
/*    */       }
/*    */     }
/*    */ 
/* 81 */     return sb.toString();
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.aop.array.ArrayReferenceImpl
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X