com.sun.tools.xjc.api
Class Reference

java.lang.Object
  extended by com.sun.tools.xjc.api.Reference

public final class Reference
extends Object

Reference to a JAXB type (from JAX-RPC.)

A reference is a Java type (represented as a TypeMirror) and a set of annotations (represented as a Declaration). Together they describe a root reference to a JAXB type binding.

Those two values can be supplied independently, or you can use other convenience constructors to supply two values at once.


Field Summary
 com.sun.mirror.declaration.Declaration annotations
          The declaration from which annotations for the type is read.
 com.sun.mirror.type.TypeMirror type
          The JAXB type being referenced.
 
Constructor Summary
Reference(com.sun.mirror.declaration.MethodDeclaration method)
          Creates a reference from the return type of the method and annotations on the method.
Reference(com.sun.mirror.declaration.ParameterDeclaration param)
          Creates a reference from the parameter type and annotations on the parameter.
Reference(com.sun.mirror.declaration.TypeDeclaration type, com.sun.mirror.apt.AnnotationProcessorEnvironment env)
          Creates a reference from a class declaration and its annotations.
Reference(com.sun.mirror.type.TypeMirror type, com.sun.mirror.declaration.Declaration annotations)
          Creates a reference by providing two values independently.
 
Method Summary
 boolean equals(Object o)
           
 com.sun.mirror.util.SourcePosition getPosition()
          Gets the source location that can be used to report error messages regarding this reference.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public final com.sun.mirror.type.TypeMirror type
The JAXB type being referenced. Must not be null.


annotations

public final com.sun.mirror.declaration.Declaration annotations
The declaration from which annotations for the type is read. Must not be null.

Constructor Detail

Reference

public Reference(com.sun.mirror.declaration.MethodDeclaration method)
Creates a reference from the return type of the method and annotations on the method.


Reference

public Reference(com.sun.mirror.declaration.ParameterDeclaration param)
Creates a reference from the parameter type and annotations on the parameter.


Reference

public Reference(com.sun.mirror.declaration.TypeDeclaration type,
                 com.sun.mirror.apt.AnnotationProcessorEnvironment env)
Creates a reference from a class declaration and its annotations.


Reference

public Reference(com.sun.mirror.type.TypeMirror type,
                 com.sun.mirror.declaration.Declaration annotations)
Creates a reference by providing two values independently.

Method Detail

getPosition

public com.sun.mirror.util.SourcePosition getPosition()
Gets the source location that can be used to report error messages regarding this reference.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object