Back to index

lightning-sunbird  0.9+nobinonly
Test1.java
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is mozilla.org code.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Sun Microsystems, Inc.
00018  * Portions created by the Initial Developer are Copyright (C) 1999
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 public class Test1 extends Test2{
00038 
00039   public final int final_int = 10;
00040   public static final int static_final_int = 11;
00041   protected int protected_int = 1;
00042   int nomodifiers_int = 1;
00043   private int int_field = 1;
00044   public int name_int = 1;
00045   public int name_int_arr[] = {1, 2, 3};
00046   public boolean name_bool = true;
00047   public long name_long = 1;
00048   public double name_double = 1;
00049   public float name_float = 0;
00050   public short name_short = 0;
00051   public byte name_byte = 0;
00052   public Object name_object = new Object();
00053   public char name_char = 'a';
00054   public static int static_name_int = 1;
00055   public static String static_name_object;
00056   static int static_name_int_nomodifiers = 1;
00057   private static int static_name_int_private =1;
00058   protected static int static_name_int_protected =1;
00059   public static boolean static_name_bool = true;
00060   public static int static_name_int_arr[] = {0, 1, 0};
00061   public static long static_name_long = 1;
00062   public static double static_name_double = 1;
00063   public static float static_name_float = 0;
00064   public static short static_name_short = 0;
00065   public static byte static_name_byte = 0;
00066   public static String static_name_string = "aaa";
00067   public static char static_name_char = 'a';
00068   public String name_string = "Test string";
00069   public Object name_obj = new Object();
00070 
00071   public Test1(int int_fld){
00072       name_int = int_fld;
00073   } 
00074 
00075   public Test1(float flt){
00076       System.out.println("name_float will be set to: "+flt);
00077       name_float = flt;
00078   } 
00079 
00080   public Test1(String str){
00081       name_string = str;
00082       System.out.println("name_string is: " + name_string);
00083   } 
00084 
00085   private Test1(){
00086      name_int = 111;
00087 
00088   }
00089 
00090   protected Test1(boolean bool){
00091      name_bool = bool;
00092   }
00093 
00094   Test1(short sh){
00095      name_short = sh;
00096   }
00097 
00098 
00099   public int Test1_test1(int i){
00100      return i;
00101   }
00102 
00103   public static void Print_static_string(String string) {
00104       System.out.println("The string is :"+string);
00105   }
00106 
00107   public void Print_string(String string) {
00108       System.out.println("The string is :"+string);
00109   }
00110 
00111   void Print_string_nomod(String string){
00112       System.out.println("The String is: "+string);
00113   }
00114 
00115   static void Print_string_nomod_static(String string){
00116       System.out.println("The String is: "+string);
00117   }
00118 
00119   protected void Print_string_protected(String string) {
00120       System.out.println("The string is :"+string);
00121   }
00122 
00123   protected static void Print_string_protected_static(String string) {
00124       System.out.println("The string is :"+string);
00125   }
00126 
00127   private void Print_string_private(String string) {
00128       System.out.println("The string is :"+string);
00129   }
00130 
00131   private static void Print_string_private_static(String string) {
00132       System.out.println("The string is :"+string);
00133   }
00134 
00135   public void Set_int_field(int field){
00136       name_int = field;
00137       System.out.println("The name_int was set to "+name_int);
00138   }
00139   
00140   public static int Get_static_int_field(){
00141       System.out.println("The name_int value is "+static_name_int);
00142       return static_name_int;
00143   }
00144 
00145   public int Get_int_field(){
00146       System.out.println("The name_int value is "+name_int);
00147       return name_int;
00148   }
00149   
00150   public void Set_bool_field(boolean field){
00151       name_bool = field;
00152       System.out.println("The name_bool was set to "+name_bool);
00153   }
00154   
00155   public static boolean Get_static_bool_field(){
00156       System.out.println("The name_bool value is "+static_name_bool);
00157       return static_name_bool;
00158   }
00159 
00160   public boolean Get_bool_field(){
00161       System.out.println("The name_bool value is "+name_bool);
00162       return name_bool;
00163   }
00164   
00165   public void Set_long_field(long field){
00166       name_long = field;
00167       System.out.println("The name_long was set to "+name_long);
00168   }
00169   
00170   public static long Get_static_long_field(){
00171       System.out.println("The name_long value is "+static_name_long);
00172       return static_name_long;
00173   }
00174 
00175   public long Get_long_field(){
00176       System.out.println("The name_long value is "+name_long);
00177       return name_long;
00178   }
00179   
00180   public void Set_double_field(double field){
00181       name_double = field;
00182       System.out.println("The name_double was set to "+name_double);
00183   }
00184   
00185   public static double Get_static_double_field(){
00186       System.out.println("The name_double value is "+static_name_double);
00187       return static_name_double;
00188   }
00189   
00190   public double Get_double_field(){
00191       System.out.println("The name_double value is "+name_double);
00192       return name_double;
00193   }
00194   
00195   public void Set_float_field(float field){
00196       name_float = field;
00197       System.out.println("The name_float was set to "+name_float);
00198   }
00199   
00200   public static float Get_static_float_field(){
00201       System.out.println("The name_float value is "+static_name_float);
00202       return static_name_float;
00203   }
00204 
00205   public float Get_float_field(){
00206       System.out.println("The name_float value is "+name_float);
00207       return name_float;
00208   }
00209   
00210   public void Set_short_field(short field){
00211       name_short = field;
00212       System.out.println("The name_short was set to "+name_short);
00213   }
00214 
00215   public static short Get_static_short_field(){
00216       System.out.println("The name_short value is "+static_name_short);
00217       return static_name_short;
00218   }
00219   
00220   public short Get_short_field(){
00221       System.out.println("The name_short value is "+name_short);
00222       return name_short;
00223   }
00224   
00225   public void Set_byte_field(byte field){
00226       name_byte = field;
00227       System.out.println("The name_byte was set to "+name_byte);
00228   }
00229   
00230   public static byte Get_static_byte_field(){
00231       System.out.println("The name_byte value is "+static_name_byte);
00232       return static_name_byte;
00233   }
00234 
00235   public byte Get_byte_field(){
00236       System.out.println("The name_byte value is "+name_byte);
00237       return name_byte;
00238   }
00239   
00240   public void Set_object_field(Object field){
00241       name_object = field;
00242       System.out.println("The name_object was set to "+name_object);
00243   }
00244   
00245   public Object Get_object_field(){
00246       System.out.println("The name_object value is "+name_object);
00247       return name_object;
00248   }
00249 
00250   public static String Get_static_string_object(){
00251       System.out.println("String is: "+static_name_string);
00252       return static_name_string;
00253   }
00254   
00255   public void Set_char_field(char field){
00256       name_char = field;
00257       System.out.println("The name_char was set to "+name_char);
00258   }
00259   
00260   public static char Get_static_char_field(){
00261       System.out.println("The name_char value is "+static_name_char);
00262       return static_name_char;
00263   }
00264   
00265   public char Get_char_field(){
00266       System.out.println("The name_char value is "+name_char);
00267       return name_char;
00268   }
00269   
00270   public void Test1_method1(){
00271       System.out.println("Test1_method1 passed!");
00272   }
00273 
00274   public void Test1_method2(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00275       System.out.println("Test1_method2 passed!");
00276   }
00277 
00278   public static void Test1_method2_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00279       System.out.println("Test1_method2_static passed!");
00280   }
00281 
00282   public boolean Test1_method_bool(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00283       System.out.println("Test1_method_bool passed!");
00284       return bb;
00285   }
00286 
00287   public static boolean Test1_method_bool_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00288       System.out.println("Test1_method_bool_static passed!");
00289       return bb;
00290   }
00291 
00292   public byte Test1_method_byte(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00293       System.out.println("Test1_method_byte passed!");
00294       return by;
00295   }
00296 
00297   public static byte Test1_method_byte_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00298       System.out.println("Test1_method_byte_static passed!");
00299       return by;
00300   }
00301 
00302   public char Test1_method_char(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00303       System.out.println("Test1_method_char passed!");
00304       return ch;
00305   }
00306 
00307   public static char Test1_method_char_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00308       System.out.println("Test1_method_char_static passed!");
00309       return ch;
00310   }
00311 
00312   public short Test1_method_short(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00313       System.out.println("Test1_method_short passed!");
00314       return sh;
00315   }
00316 
00317   public static short Test1_method_short_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00318       System.out.println("Test1_method_short_static passed!");
00319       return sh;
00320   }
00321 
00322   public int Test1_method_int(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00323       System.out.println("Test1_method_int passed!");
00324       return in;
00325   }
00326 
00327   public static int Test1_method_int_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00328       System.out.println("Test1_method_int_static passed!");
00329       return in;
00330   }
00331 
00332   public long Test1_method_long(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00333       System.out.println("Test1_method_long passed!");
00334       return lg;
00335   }
00336 
00337   public static long Test1_method_long_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00338       System.out.println("Test1_method_long_static passed!");
00339       return lg;
00340   }
00341 
00342   public float Test1_method_float(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00343       System.out.println("Test1_method_float passed!");
00344       return fl;
00345   }
00346 
00347   public static float Test1_method_float_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00348       System.out.println("Test1_method_float_static passed!");
00349       return fl;
00350   }
00351 
00352   public double Test1_method_double(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00353       System.out.println("Test1_method_double passed!");
00354       return db;
00355   }
00356 
00357   public static double Test1_method_double_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00358       System.out.println("Test1_method_double_static passed!");
00359       return db;
00360   }
00361 
00362   public String Test1_method_string(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00363       System.out.println("Test1_method_string passed!");
00364       return str;
00365   }
00366 
00367   public static String Test1_method_string_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00368       System.out.println("Test1_method_string_static passed!");
00369       return str;
00370   }
00371 
00372   public void Test1_method7(boolean bb, byte by, char ch, short sh, int in, long lg, float fl){
00373       System.out.println("Test1_method2 passed!");
00374   }
00375 
00376   public int Test1_method3(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00377       System.out.println("Test1_method3 passed!");
00378       return 121;
00379   }
00380 
00381   public int Test1_method3_override(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00382       System.out.println("Test1_method3 passed!");
00383       return 121;
00384   }
00385 
00386   private int Test1_method31(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00387       System.out.println("Test1_method31 passed!");
00388       return 121;
00389   }
00390 
00391   private static int Test1_method31_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00392       System.out.println("Test1_method31_static passed!");
00393       return 121;
00394   }
00395 
00396   protected int Test1_method32(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00397       System.out.println("Test1_method32 passed!");
00398       return 121;
00399   }
00400 
00401   protected static int Test1_method32_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00402       System.out.println("Test1_method32_static passed!");
00403       return 121;
00404   }
00405 
00406   int Test1_method33(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00407       System.out.println("Test1_method33 passed!");
00408       return 121;
00409   }
00410 
00411   static int Test1_method33_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00412       System.out.println("Test1_method33_static passed!");
00413       return 121;
00414   }
00415 
00416   public final int Test1_method3_final(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00417       System.out.println("Test1_method3_final passed!");
00418       return 121;
00419   }
00420 
00421   public static final int Test1_method3_final_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00422       System.out.println("Test1_method3_final_static passed!");
00423       return 121;
00424   }
00425 
00426   public synchronized int Test1_method3_sync(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00427       System.out.println("Test1_method3_sync passed!");
00428       return 121;
00429   }
00430 
00431   public static synchronized int Test1_method3_sync_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00432       System.out.println("Test1_method3_sync_static passed!");
00433       return 121;
00434   }
00435 
00436   public String Test1_method4(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00437       System.out.println("Test1_method4 passed!");
00438       return "test";
00439   }
00440 
00441   public String[] Test1_method5(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00442       System.out.println("Test1_method5 passed!");
00443       return strarr;
00444   }
00445 
00446   public static void Test1_method1_static(){
00447       System.out.println("Test1_method1_static passed!");
00448   }
00449 
00450   public static void Test1_method7_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl){
00451       System.out.println("Test1_method7_static passed!");
00452   }
00453 
00454   public static int Test1_method3_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00455       System.out.println("Test1_method3_static passed!");
00456       return 121;
00457   }
00458 
00459   public static String Test1_method4_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00460       System.out.println("Test1_method4_static passed!");
00461       return "test";
00462   }
00463 
00464   public static String[] Test1_method5_static(boolean bb, byte by, char ch, short sh, int in, long lg, float fl, double db, String str, String strarr[]){
00465       System.out.println("Test1_method5_static passed!");
00466       return strarr;
00467   }
00468 
00469   public final int Test1_public_final(int i){
00470       return i;
00471   }
00472 
00473   public static final int Test1_public_final_static(int i){
00474       return i;
00475   }
00476 
00477   public synchronized int Test1_public_sinc(int i){
00478       return i;
00479   }
00480 
00481   public static synchronized int Test1_public_sinc_static(int i){
00482       return i;
00483   }
00484 
00485   public int Test2_override(int i){
00486        return i+1;
00487   }
00488 
00489   public static int Test2_override_static(int i){
00490        return i+1;
00491   }
00492 
00493   public int Test1_thrown_excp(int i){
00494       int a[] = new int[2];
00495       a[4] = i;
00496       return 2+i;
00497   }
00498 
00499   public static int Test1_thrown_excp_static(int i){
00500       int a[] = new int[2];
00501       a[4] = i;
00502       return 2+i;
00503   }
00504 }
00505