added Type.Array
[org.ibex.classgen.git] / src / org / ibex / classgen / FieldRef.java
1 package org.ibex.classgen;
2
3 /** This class represents Field references. It is used as an argument to the 
4 GETFIELD, PUTFIELD, GETSTATIC, and PUTSTATCI bytecodes 
5 @see CGConst#GETFIELD
6 @see CGConst#PUTFIELD
7 @see CGConst#GETSTATIC
8 @see CGConst#PUTSTATIC
9 */
10 public class FieldRef extends ClassGen.FieldOrMethodRef {
11     /** Create a reference to field <i>name</i> of class <i>c</i> with the type <i>t</i>  */    
12     public FieldRef(Type.Object c, String name, Type t) { super(c,name,t.getDescriptor()); }
13     /** Equivalent to FieldRef(new Type.Object(s),...)
14         @see #FieldRef(Type.Object,String,Type,)
15     */
16     public FieldRef(String s, String name, Type t) { this(Type.fromDescriptor(s).asObject(), name, t); }
17 }