/[classpath]/classpath/vm/reference/java/lang/reflect/Field.java
ViewVC logotype

Diff of /classpath/vm/reference/java/lang/reflect/Field.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9.2.3 by gnu_andrew, Wed Sep 28 17:50:22 2005 UTC revision 1.9.2.4 by jfrijters, Sat Oct 1 10:02:47 2005 UTC
# Line 1  Line 1 
1  /* java.lang.reflect.Field - reflection of Java fields  /* java.lang.reflect.Field - reflection of Java fields
2     Copyright (C) 1998, 2001 Free Software Foundation, Inc.     Copyright (C) 1998, 2001, 2005 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package java.lang.reflect;  package java.lang.reflect;
40    
41    import gnu.java.lang.reflect.FieldSignatureParser;
42    
43  /**  /**
44   * The Field class represents a member variable of a class. It also allows   * The Field class represents a member variable of a class. It also allows
45   * dynamic access to a member, via reflection. This works for both   * dynamic access to a member, via reflection. This works for both
# Line 586  extends AccessibleObject implements Memb Line 588  extends AccessibleObject implements Memb
588     */     */
589    public native void setDouble(Object o, double value)    public native void setDouble(Object o, double value)
590      throws IllegalAccessException;      throws IllegalAccessException;
591    
592      /**
593       * Return the generic type of the field. If the field type is not a generic
594       * type, the method returns the same as <code>getType()</code>.
595       *
596       * @throws GenericSignatureFormatError if the generic signature does
597       *         not conform to the format specified in the Virtual Machine
598       *         specification, version 3.
599       * @since 1.5
600       */
601      public Type getGenericType()
602      {
603        String signature = getSignature();
604        if (signature == null)
605          return getType();
606        FieldSignatureParser p = new FieldSignatureParser(getDeclaringClass(),
607                                                          signature);
608        return p.getFieldType();
609      }
610    
611      /**
612       * Return the String in the Signature attribute for this field. If there
613       * is no Signature attribute, return null.
614       */
615      private native String getSignature();
616  }  }

Legend:
Removed from v.1.9.2.3  
changed lines
  Added in v.1.9.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26