@@ -0,0 +1,2670 @@
+/*%0A * Copyright 2022 Google LLC%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are%0A * met:%0A *%0A *     * Redistributions of source code must retain the above copyright%0A * notice, this list of conditions and the following disclaimer.%0A *     * Redistributions in binary form must reproduce the above%0A * copyright notice, this list of conditions and the following disclaimer%0A * in the documentation and/or other materials provided with the%0A * distribution.%0A *     * Neither the name of Google LLC nor the names of its%0A * contributors may be used to endorse or promote products derived from%0A * this software without specific prior written permission.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage com.google.api.gax.nativeimage;%0A%0Aimport static com.google.api.gax.nativeimage.NativeImageUtils.registerForReflectiveInstantiation;%0A%0Aimport com.oracle.svm.core.annotate.AutomaticFeature;%0Aimport org.graalvm.nativeimage.hosted.Feature;%0A%0A/** Registers reflection usage in OpenCensus libraries. */%0A@AutomaticFeature%0Afinal class OpenCensusFeature implements Feature %7B%0A%0A  private static final String TAGS_COMPONENT_CLASS = %22io.opencensus.impl.tags.TagsComponentImpl%22;%0A  private static final String STATS_COMPONENT_CLASS = %22io.opencensus.impl.stats.StatsComponentImpl%22;%0A%0A  @Override%0A  public void beforeAnalysis(BeforeAnalysisAccess access) %7B%0A    if (access.findClassByName(STATS_COMPONENT_CLASS) != null) %7B%0A      registerForReflectiveInstantiation(access, STATS_COMPONENT_CLASS);%0A    %7D%0A    if (access.findClassByName(TAGS_COMPONENT_CLASS) != null) %7B%0A      registerForReflectiveInstantiation(access, %22io.opencensus.impl.metrics.MetricsComponentImpl%22);%0A      registerForReflectiveInstantiation(access, TAGS_COMPONENT_CLASS);%0A      registerForReflectiveInstantiation(access, %22io.opencensus.impl.trace.TraceComponentImpl%22);%0A    %7D%0A  %7D%0A%7D%0A

relocate Opencensus configurations from java-core to gax (#1646)