1 /* 2 * Copyright 2024 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.example; 18 19 /** Test class for integration tests. See {@code common/foo_class.rs} for how to compile and use. */ 20 public final class Foo { 21 22 public static long sfoo = 321; 23 24 public int foo; 25 smfoo()26 public static int smfoo() { 27 return 3; 28 } 29 Foo(int f)30 public Foo(int f) { 31 this.foo = f; 32 } 33 getFoo()34 public int getFoo() { 35 return foo; 36 } 37 mfoo()38 public boolean mfoo() { 39 return true; 40 } 41 nativeReturnsInt(int n)42 public native int nativeReturnsInt(int n); 43 nativeReturnsObject(int n)44 public native String nativeReturnsObject(int n); 45 } 46