Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*     */ package javassist.bytecode;
 /*     */ 
 /*     */ import java.io.ByteArrayOutputStream;
 /*     */ import java.io.DataInputStream;
 /*     */ import java.io.IOException;
 /*     */ import java.util.Map;
 /*     */ 
/*     */ public class ParameterAnnotationsAttribute extends AttributeInfo
/*     */ {
/*     */   public static final String visibleTag = "RuntimeVisibleParameterAnnotations";
/*     */   public static final String invisibleTag = "RuntimeInvisibleParameterAnnotations";
/*     */ 
/*     */   public ParameterAnnotationsAttribute(ConstPool cpString attrnamebyte[] info)
/*     */   {
/*  67 */     super(cpattrnameinfo);
/*     */   }
/*     */ 
/*     */   public ParameterAnnotationsAttribute(ConstPool cpString attrname)
/*     */   {
/*  82 */     this(cpattrnamenew byte[] { 0 });
/*     */   }
/*     */ 
/*     */   ParameterAnnotationsAttribute(ConstPool cpint nDataInputStream in)
/*     */     throws IOException
/*     */   {
/*  91 */     super(cpnin);
/*     */   }
/*     */ 
/*     */   public int numParameters()
/*     */   {
/*  98 */     return this.[0] & 0xFF;
/*     */   }
/*     */ 
/*     */   public AttributeInfo copy(ConstPool newCpMap classnames)
/*     */   {
/* 105 */     AnnotationsAttribute.Copier copier = new AnnotationsAttribute.Copier(this.this.newCpclassnames);
/*     */     try {
/* 107 */       copier.parameters();
/* 108 */       return new ParameterAnnotationsAttribute(newCpgetName(), copier.close());
/*     */     }
/*     */     catch (Exception e) {
/*     */     }
/* 112 */     throw new RuntimeException(e.toString());
/*     */   }
/*     */ 
/*     */   public Annotation[][] getAnnotations()
/*     */   {
/*     */     try
/*     */     {
/* 130 */       return new AnnotationsAttribute.Parser(this.this.).parseParameters();
/*     */     } catch (Exception e) {
/*     */     }
/* 133 */     throw new RuntimeException(e.toString());
/*     */   }
/*     */ 
/*     */   public void setAnnotations(Annotation[][] params)
/*     */   {
/* 147 */     ByteArrayOutputStream output = new ByteArrayOutputStream();
/* 148 */     AnnotationsWriter writer = new AnnotationsWriter(outputthis.);
/*     */     try {
/* 150 */       int n = params.length;
/* 151 */       writer.numParameters(n);
/* 152 */       for (int i = 0; i < ni++) {
/* 153 */         Annotation[] anno = params[i];
/* 154 */         writer.numAnnotations(anno.length);
/* 155 */         for (int j = 0; j < anno.lengthj++) {
/* 156 */           anno[j].write(writer);
/*     */         }
/*     */       }
/* 159 */       writer.close();
/*     */     }
/*     */     catch (IOException e) {
/* 162 */       throw new RuntimeException(e);
/*     */     }
/*     */ 
/* 165 */     set(output.toByteArray());
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     javassist.bytecode.ParameterAnnotationsAttribute
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X