ClassGen->ClassFile, ClassGen.FieldOrMethodRef->MemberRef
[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 MemberRef {
11     /** Create a reference to field <i>name</i> of class <i>c</i> with the type <i>t</i>  */    
12     public FieldRef(Type.Class c, String name, Type t) { super(c, name, t.getDescriptor()); }
13     /** Equivalent to FieldRef(new Type.Class(s), ...)
14         @see #FieldRef(Type.Class, String, Type, )
15     */
16     public FieldRef(String s, String name, Type t) { this(Type.instance(s).asClass(), name, t); }
17 }