Stay organized with collections
Save and categorize content based on your preferences.
com.google.api.server.spi.config
Annotation Type ApiReference
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface ApiReference
Annotation to specify that the annotated class should use the same Api configuration
information as the referenced class. This referenced configuration is used instead of any
configuration inherited from Api annotations or other ApiReference annotations
on super classes.
If a single class is annotated with both Api and ApiReference annotations,
configuration is first retrieved using the ApiReference annotation and is then overridden
with configuration from the Api annotation.
The class to which this ApiReference annotation will act as a reference.
Element Detail
value
public abstract java.lang.Class<?> value
The class to which this ApiReference annotation will act as a reference. The referenced class
or an inherited superclass of the referenced class must have API configuration provided
from an Api annotation or another ApiReference annotation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eApiReference\u003c/code\u003e is an annotation used to specify that a class should use the same \u003ccode\u003eApi\u003c/code\u003e configuration as a referenced class.\u003c/p\u003e\n"],["\u003cp\u003eThe referenced \u003ccode\u003eApi\u003c/code\u003e configuration overrides any \u003ccode\u003eApi\u003c/code\u003e or \u003ccode\u003eApiReference\u003c/code\u003e configurations inherited from superclasses.\u003c/p\u003e\n"],["\u003cp\u003eIf a class has both \u003ccode\u003eApi\u003c/code\u003e and \u003ccode\u003eApiReference\u003c/code\u003e annotations, the \u003ccode\u003eApiReference\u003c/code\u003e configuration is used first and then overridden by the \u003ccode\u003eApi\u003c/code\u003e configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evalue\u003c/code\u003e element of \u003ccode\u003eApiReference\u003c/code\u003e specifies the class to which the annotation refers, which must have an \u003ccode\u003eApi\u003c/code\u003e or another \u003ccode\u003eApiReference\u003c/code\u003e annotation.\u003c/p\u003e\n"]]],[],null,["# ApiReference\n\ncom.google.api.server.spi.config\n\nAnnotation Type ApiReference\n----------------------------\n\n-\n\n *** ** * ** ***\n\n \u003cbr /\u003e\n\n ```\n @Retention(value=RUNTIME)\n @Target(value=TYPE)\n public @interface ApiReference\n ``` \nAnnotation to specify that the annotated class should use the same [`Api`](../../../../../../com/google/api/server/spi/config/Api.html \"annotation in com.google.api.server.spi.config\") configuration information as the referenced class. This referenced configuration is used instead of any configuration inherited from [`Api`](../../../../../../com/google/api/server/spi/config/Api.html \"annotation in com.google.api.server.spi.config\") annotations or other `ApiReference` annotations on super classes. If a single class is annotated with both [`Api`](../../../../../../com/google/api/server/spi/config/Api.html \"annotation in com.google.api.server.spi.config\") and [`ApiReference`](../../../../../../com/google/api/server/spi/config/ApiReference.html \"annotation in com.google.api.server.spi.config\") annotations, configuration is first retrieved using the [`ApiReference`](../../../../../../com/google/api/server/spi/config/ApiReference.html \"annotation in com.google.api.server.spi.config\") annotation and is then overridden with configuration from the [`Api`](../../../../../../com/google/api/server/spi/config/Api.html \"annotation in com.google.api.server.spi.config\") annotation. \n-\n -\n\n ### Required Element Summary\n\n-\n -\n\n ### Element Detail\n\n\n -\n\n #### value\n\n ```\n public abstract java.lang.Class\u003c?\u003e value\n ``` \n The class to which this ApiReference annotation will act as a reference. The referenced class or an inherited superclass of the referenced class must have API configuration provided from an [`Api`](../../../../../../com/google/api/server/spi/config/Api.html \"annotation in com.google.api.server.spi.config\") annotation or another [`ApiReference`](../../../../../../com/google/api/server/spi/config/ApiReference.html \"annotation in com.google.api.server.spi.config\") annotation."]]