| // -------------------------------------------------------- |
| // Code generated by Papyrus Java |
| // -------------------------------------------------------- |
| |
| package JavaCodegenTest; |
| |
| /************************************************************/ |
| /** |
| * |
| */ |
| public class TestVisibility { |
| /** |
| * boolean value with public visibility |
| */ |
| public boolean BVal; |
| /** |
| * int value with protected visibility |
| */ |
| protected int IVal1; |
| /** |
| * int value with private visibility |
| */ |
| private int IVal2; |
| /** |
| * int value with package visibility |
| */ |
| int IVal3; |
| |
| /** |
| * Default constructor |
| */ |
| public TestVisibility() { |
| IVal1 = 0; |
| IVal2 = 0; |
| BVal = false; |
| } |
| |
| /** |
| * Constructor with parameters |
| * @param newIVal1 |
| * @param newIVal2 |
| * @param newBVal |
| */ |
| public TestVisibility(int newIVal1, int newIVal2, boolean newBVal) { |
| IVal1 = newIVal1; |
| IVal2 = newIVal2; |
| BVal = newBVal; |
| } |
| |
| /** |
| * Virtual method |
| * @param a |
| * @param b |
| * @return |
| */ |
| public double virtualOp(double a, double b) { |
| return a + b; |
| } |
| |
| /** |
| * Static method |
| */ |
| public static void staticOp() { |
| } |
| |
| /** |
| * Inline method |
| * @param a |
| * @param b |
| * @return |
| */ |
| public int inlineOp(int a, int b) { |
| return a + b; |
| } |
| |
| /** |
| * Friend method |
| */ |
| public void friendOp() { |
| } |
| |
| /** |
| * Non-static method |
| */ |
| public void nonStaticOp() { |
| } |
| |
| /** |
| * Method with in, out, inout, return parameters |
| * @param in |
| * @param out |
| * @param inout |
| * @return |
| */ |
| public int paramsOp(int in, int out, int inout) { |
| return 1; |
| } |
| |
| /** |
| * Void Method |
| * @return |
| */ |
| public void voidOp() { |
| } |
| |
| /** |
| * |
| * @param newIVal1 |
| */ |
| public void defaultValueOp(int newIVal1) { |
| } |
| |
| /** |
| * |
| * @param c1 |
| * @return |
| */ |
| public TestMainMethod classesOp(TestMainMethod c1) { |
| return c1; |
| } |
| |
| /** |
| * Const method |
| */ |
| public void constOp() { |
| System.out.println("I am a const method"); |
| } |
| } |