@@ -3069,6 +3069,26 @@ public final class ${ctx.lib_name.camel} {
3069
3069
return this.eventHandler;
3070
3070
}
3071
3071
3072
+ // ----- Class methods -----
3073
+
3074
+ /**
3075
+ * Increase the reference counter of the given context.
3076
+ *
3077
+ * @param context The context to increase the reference counter of.
3078
+ */
3079
+ private static void increaseRefCounter(
3080
+ final AnalysisContext context
3081
+ ) {
3082
+ // Increase the context reference counter of the context if not null
3083
+ if(!context.reference.isNull()) {
3084
+ if(ImageInfo.inImageCode()) {
3085
+ NI_LIB.${ nat(" context_incref" )} (context.reference.ni());
3086
+ } else {
3087
+ JNI_LIB.${ nat(" context_incref" )} (context.reference.jni());
3088
+ }
3089
+ }
3090
+ }
3091
+
3072
3092
// ----- Instance methods -----
3073
3093
3074
3094
/**
@@ -3258,24 +3278,6 @@ public final class ${ctx.lib_name.camel} {
3258
3278
}
3259
3279
% endif
3260
3280
3261
- /**
3262
- * Increase the reference counter of the given context.
3263
- *
3264
- * @param context The context to increase the reference counter of.
3265
- */
3266
- private static void increaseRefCounter(
3267
- final AnalysisContext context
3268
- ) {
3269
- // Increase the context reference counter of the context if not null
3270
- if(!context.reference.isNull()) {
3271
- if(ImageInfo.inImageCode()) {
3272
- NI_LIB.${ nat(" context_incref" )} (context.reference.ni());
3273
- } else {
3274
- JNI_LIB.${ nat(" context_incref" )} (context.reference.jni());
3275
- }
3276
- }
3277
- }
3278
-
3279
3281
/** @see java.lang.AutoCloseable#close() */
3280
3282
@Override
3281
3283
public void close() {
0 commit comments