1. /*
  2. * @(#)Attribute.java 1.5 04/05/05
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.print.attribute;
  8. import java.io.Serializable;
  9. /**
  10. * Interface Attribute is the base interface implemented by any and every
  11. * printing attribute class to indicate that the class represents a
  12. * printing attribute. All printing attributes are serializable.
  13. * <P>
  14. *
  15. * @author David Mendenhall
  16. * @author Alan Kaminsky
  17. */
  18. public interface Attribute extends Serializable {
  19. /**
  20. * Get the printing attribute class which is to be used as the "category"
  21. * for this printing attribute value when it is added to an attribute set.
  22. *
  23. * @return Printing attribute class (category), an instance of class
  24. * {@link java.lang.Class java.lang.Class}.
  25. */
  26. public Class<? extends Attribute> getCategory();
  27. /**
  28. * Get the name of the category of which this attribute value is an
  29. * instance.
  30. * <P>
  31. * <I>Note:</I> This method is intended to provide a default, nonlocalized
  32. * string for the attribute's category. If two attribute objects return the
  33. * same category from the <CODE>getCategory()</CODE> method, they should
  34. * return the same name from the <CODE>getName()</CODE> method.
  35. *
  36. * @return Attribute category name.
  37. */
  38. public String getName();
  39. }