/[classpath]/classpath/java/lang/TypeNotPresentException.java
ViewVC logotype

Diff of /classpath/java/lang/TypeNotPresentException.java

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

revision 1.1.2.1 by tromey, Fri Aug 27 00:05:03 2004 UTC revision 1.1.2.2 by gnu_andrew, Sun Feb 20 21:10:35 2005 UTC
# Line 1  Line 1 
1  /* TypeNotPresentException.java  /* TypeNotPresentException.java -- Thrown when a string-based type is missing
2     Copyright (C) 2004 Free Software Foundation, Inc.     Copyright (C) 2004, 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;  package java.lang;
40    
41  public class TypeNotPresentException extends RuntimeException  /**
42     * <p>
43     * Thrown when a type is accessed using a <code>String</code>-based
44     * representation, but no definition of the supplied type is found.
45     * This is effectively an unchecked equivalent of the existing
46     * <code>ClassNotFound</code> exception.  
47     * </p>
48     * <p>
49     * It may occur due to an attempt to load a missing class, interface or
50     * annotation, or when an undefined type variable is accessed.
51     * </p>
52     *
53     * @author Tom Tromey (tromey@redhat.com)
54     * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
55     * @see ClassNotFoundException
56     * @since 1.5
57     */
58    public class TypeNotPresentException
59      extends RuntimeException
60  {  {
61      
62      /**
63       * Constructs a <code>TypeNotPresentException</code> for
64       * the supplied type.  The specified cause <code>Throwable</code>
65       * may be used to provide additional history, with regards to the
66       * root of the problem.  It is perfectly valid for this to be null,
67       * if the cause of the problem is unknown.
68       *
69       * @param typeName the name of the missing type.
70       * @param cause the cause of this exception, or null if the cause
71       *              is unknown.
72       */
73    public TypeNotPresentException(String typeName, Throwable cause)    public TypeNotPresentException(String typeName, Throwable cause)
74    {    {
75      super("type \"" + typeName + "\" not found", cause);      super("type \"" + typeName + "\" not found", cause);
76      this.typeName = typeName;      this.typeName = typeName;
77    }    }
78    
79      /**
80       * Returns the name of the missing type.
81       *
82       * @return the missing type's name.
83       */
84    public String typeName()    public String typeName()
85    {    {
86      return typeName;      return typeName;
87    }    }
88    
89      /**
90       * The name of the missing type.
91       *
92       * @serial the missing type's name.
93       */
94    // Name fixed by serialization.    // Name fixed by serialization.
95    private String typeName;    private String typeName;
96    
97  }  }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

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