OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [classpath/] [gnu/] [javax/] [print/] [PrintAttributeException.java] - Blame information for rev 769

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 769 jeremybenn
/* PrintAttributeException.java --
2
   Copyright (C) 2006 Free Software Foundation, Inc.
3
 
4
This file is part of GNU Classpath.
5
 
6
GNU Classpath is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2, or (at your option)
9
any later version.
10
 
11
GNU Classpath is distributed in the hope that it will be useful, but
12
WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with GNU Classpath; see the file COPYING.  If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
02110-1301 USA.
20
 
21
Linking this library statically or dynamically with other modules is
22
making a combined work based on this library.  Thus, the terms and
23
conditions of the GNU General Public License cover the whole
24
combination.
25
 
26
As a special exception, the copyright holders of this library give you
27
permission to link this library with independent modules to produce an
28
executable, regardless of the license terms of these independent
29
modules, and to copy and distribute the resulting executable under
30
terms of your choice, provided that you also meet, for each linked
31
independent module, the terms and conditions of the license of that
32
module.  An independent module is a module which is not derived from
33
or based on this library.  If you modify this library, you may extend
34
this exception to your version of the library, but you are not
35
obligated to do so.  If you do not wish to do so, delete this
36
exception statement from your version. */
37
 
38
 
39
package gnu.javax.print;
40
 
41
import javax.print.AttributeException;
42
import javax.print.PrintException;
43
import javax.print.attribute.Attribute;
44
 
45
/**
46
 * A <code>PrintException</code> further refining the exception
47
 * cause by providing an implementation of the print exception
48
 * interface <code>AttributeException</code>.
49
 *
50
 * @see javax.print.PrintException
51
 * @see javax.print.AttributeException
52
 *
53
 * @author Wolfgang Baer (WBaer@gmx.de)
54
 */
55
public final class PrintAttributeException extends PrintException
56
  implements AttributeException
57
{
58
  private Class[] categories;
59
  private Attribute[] values;
60
 
61
  /**
62
   * Constructs a <code>PrintAttributeException</code>
63
   * with the given unsupported attributes and/or values.
64
   *
65
   * @param unsupportedAttributes the unsupported categories,
66
   * may be <code>null</code>.
67
   * @param unsupportedValues the unsupported attribute values,
68
   * may be <code>null</code>.
69
   */
70
  public PrintAttributeException(Class[] unsupportedAttributes,
71
                                 Attribute[] unsupportedValues)
72
  {
73
    super();
74
    categories = unsupportedAttributes;
75
    values = unsupportedValues;
76
  }
77
 
78
  /**
79
   * Constructs a <code>PrintAttributeException</code>
80
   * with the given unsupported attributes and/or values.
81
   *
82
   * @param e chained exception
83
   * @param unsupportedAttributes the unsupported categories,
84
   * may be <code>null</code>.
85
   * @param unsupportedValues the unsupported attribute values,
86
   * may be <code>null</code>.
87
   */
88
  public PrintAttributeException(Exception e,
89
      Class[] unsupportedAttributes, Attribute[] unsupportedValues)
90
  {
91
    super(e);
92
    categories = unsupportedAttributes;
93
    values = unsupportedValues;
94
  }
95
 
96
  /**
97
   * Constructs a <code>PrintAttributeException</code>
98
   * with the given unsupported attributes and/or values.
99
   *
100
   * @param s detailed message
101
   * @param unsupportedAttributes the unsupported categories,
102
   * may be <code>null</code>.
103
   * @param unsupportedValues the unsupported attribute values,
104
   * may be <code>null</code>.
105
   */
106
  public PrintAttributeException(String s,
107
      Class[] unsupportedAttributes, Attribute[] unsupportedValues)
108
  {
109
    super(s);
110
    categories = unsupportedAttributes;
111
    values = unsupportedValues;
112
  }
113
 
114
  /**
115
   * Constructs a <code>PrintAttributeException</code>
116
   * with the given unsupported attributes and/or values.
117
   *
118
   * @param s detailed message
119
   * @param e chained exception
120
   * @param unsupportedAttributes the unsupported categories,
121
   * may be <code>null</code>.
122
   * @param unsupportedValues the unsupported attribute values,
123
   * may be <code>null</code>.
124
   */
125
  public PrintAttributeException(String s, Exception e,
126
      Class[] unsupportedAttributes, Attribute[] unsupportedValues)
127
  {
128
    super(s, e);
129
    categories = unsupportedAttributes;
130
    values = unsupportedValues;
131
  }
132
 
133
  /**
134
   * @see AttributeException#getUnsupportedAttributes()
135
   */
136
  public Class[] getUnsupportedAttributes()
137
  {
138
    return categories;
139
  }
140
 
141
  /**
142
   * @see AttributeException#getUnsupportedValues()
143
   */
144
  public Attribute[] getUnsupportedValues()
145
  {
146
    return values;
147
  }
148
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.