Top Description Fields Constructors Methods
com.sun.tools.xjc.api.impl.s2j

pack-priv final Class TypeAndAnnotationImpl

extends Object
implements TypeAndAnnotation
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.api.TypeAndAnnotation
Imports
jakarta.xml.bind.annotation.XmlAttachmentRef, .XmlList, com.sun.codemodel.JAnnotatable, .JPrimitiveType, .JType, com.sun.tools.xjc.api.TypeAndAnnotation, com.sun.tools.xjc.generator.annotation.spec.XmlJavaTypeAdapterWriter, com.sun.tools.xjc.model.CAdapter, .TypeUse, com.sun.tools.xjc.model.nav.NType, com.sun.tools.xjc.outline.Outline, org.glassfish.jaxb.core.v2.runtime.SwaRefAdapterMarker

TypeAndAnnotation implementation.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final Outline
private final TypeUse

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
annotate(JAnnotatable programElement)

Implements com.sun.tools.xjc.api.TypeAndAnnotation.annotate.

Annotates the given program element by additional JAXB annotations that need to be there at the point of reference.

public boolean
equals(Object o)

Overrides java.lang.Object.equals.

Implements com.sun.tools.xjc.api.TypeAndAnnotation.equals.

Two are equal if they has the same type and annotations.

public JType
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

outlineback to summary
private final Outline outline
typeUseback to summary
private final TypeUse typeUse

Constructor Detail

TypeAndAnnotationImplback to summary
public TypeAndAnnotationImpl(Outline outline, TypeUse typeUse)

Method Detail

annotateback to summary
public void annotate(JAnnotatable programElement)

Implements com.sun.tools.xjc.api.TypeAndAnnotation.annotate.

Doc from com.sun.tools.xjc.api.TypeAndAnnotation.annotate.

Annotates the given program element by additional JAXB annotations that need to be there at the point of reference.

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Implements com.sun.tools.xjc.api.TypeAndAnnotation.equals.

Doc from com.sun.tools.xjc.api.TypeAndAnnotation.equals.

Two are equal if they has the same type and annotations.

Annotations
@Override
getTypeClassback to summary
public JType getTypeClass()

Implements com.sun.tools.xjc.api.TypeAndAnnotation.getTypeClass.

Doc from com.sun.tools.xjc.api.TypeAndAnnotation.getTypeClass.

Returns the Java type.

JType is a representation of a Java type in a codeModel. If you just need the fully-qualified class name, call JType#fullName().

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override