Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

JavaLangCharacterReflection.java

00001 package gov.nasa.arc.ase.jpf.jvm.reflection;
00002 
00003 import gov.nasa.arc.ase.jpf.jvm.*;
00004 import gov.nasa.arc.ase.jpf.jvm.bytecode.Instruction;
00005 
00006 public class JavaLangCharacterReflection extends Reflection {
00007   public Instruction executeStaticMethod(MethodInfo mi) {
00008     String name = mi.getFullName();
00009 
00010     if(name.equals("<clinit>()V")) {
00011       setByteStaticField("UNASSIGNED", (byte)0);
00012       setByteStaticField("UPPERCASE_LETTER", (byte)1);
00013       setByteStaticField("LOWERCASE_LETTER", (byte)2);
00014       setByteStaticField("TITLECASE_LETTER", (byte)3);
00015       setByteStaticField("MODIFIER_LETTER", (byte)4);
00016       setByteStaticField("OTHER_LETTER", (byte)5);
00017       setByteStaticField("NON_SPACING_MARK", (byte)6);
00018       setByteStaticField("ENCLOSING_MARK", (byte)7);
00019       setByteStaticField("COMBINING_SPACING_MARK", (byte)8);
00020       setByteStaticField("DECIMAL_DIGIT_NUMBER", (byte)9);
00021       setByteStaticField("LETTER_NUMBER", (byte)10);
00022       setByteStaticField("OTHER_NUMBER", (byte)11);
00023       setByteStaticField("SPACE_SEPARATOR", (byte)12);
00024       setByteStaticField("LINE_SEPARATOR", (byte)13);
00025       setByteStaticField("PARAGRAPH_SEPARATOR", (byte)14);
00026       setByteStaticField("CONTROL", (byte)15);
00027       setByteStaticField("FORMAT", (byte)16);
00028       setByteStaticField("PRIVATE_USE", (byte)18);
00029       setByteStaticField("SURROGATE", (byte)19);
00030       setByteStaticField("DASH_PUNCTUATION", (byte)20);
00031       setByteStaticField("START_PUNCTUATION", (byte)21);
00032       setByteStaticField("END_PUNCTUATION", (byte)22);
00033       setByteStaticField("CONNECTOR_PUNCTUATION", (byte)23);
00034       setByteStaticField("OTHER_PUNCTUATION", (byte)24);
00035       setByteStaticField("MATH_SYMBOL", (byte)25);
00036       setByteStaticField("CURRENCY_SYMBOL", (byte)26);
00037       setByteStaticField("MODIFIER_SYMBOL", (byte)27);
00038       setByteStaticField("OTHER_SYMBOL", (byte)28);
00039       setIntStaticField("MIN_RADIX", 2);
00040       setIntStaticField("MAX_RADIX", 36);
00041       setCharStaticField("MIN_VALUE", '\u0000');
00042       setCharStaticField("MAX_VALUE", '\uffff');
00043       setObjectStaticField("TYPE", null); // temporary
00044 
00045       return exit();
00046     }
00047 
00048     if(name.equals("isLowerCase(C)Z")) {
00049       return exit(Character.isLowerCase(getCharArgument(0)));
00050     }
00051 
00052     if(name.equals("isUpperCase(C)Z")) {
00053       return exit(Character.isUpperCase(getCharArgument(0)));
00054     }
00055 
00056     if(name.equals("isTitleCase(C)Z")) {
00057       return exit(Character.isTitleCase(getCharArgument(0)));
00058     }
00059 
00060     if(name.equals("isDigit(C)Z")) {
00061       return exit(Character.isDigit(getCharArgument(0)));
00062     }
00063 
00064     if(name.equals("isDefined(C)Z")) {
00065       return exit(Character.isDefined(getCharArgument(0)));
00066     }
00067 
00068     if(name.equals("isLetter(C)Z")) {
00069       return exit(Character.isLetter(getCharArgument(0)));
00070     }
00071 
00072     if(name.equals("isLetterOrDigit(C)Z")) {
00073       return exit(Character.isLetterOrDigit(getCharArgument(0)));
00074     }
00075 
00076     if(name.equals("isJavaLetter(C)Z")) {
00077       return exit(Character.isJavaLetter(getCharArgument(0)));
00078     }
00079 
00080     if(name.equals("isJavaLetterOrDigit(C)Z")) {
00081       return exit(Character.isJavaLetterOrDigit(getCharArgument(0)));
00082     }
00083 
00084     if(name.equals("isJavaIdentifierStart(C)Z")) {
00085       return exit(Character.isJavaIdentifierStart(getCharArgument(0)));
00086     }
00087 
00088     if(name.equals("isJavaIdentifierPart(C)Z")) {
00089       return exit(Character.isJavaIdentifierPart(getCharArgument(0)));
00090     }
00091 
00092     if(name.equals("isUnicodeIdentifierStart(C)Z")) {
00093       return exit(Character.isUnicodeIdentifierStart(getCharArgument(0)));
00094     }
00095 
00096     if(name.equals("isUnicodeIdentifierPart(C)Z")) {
00097       return exit(Character.isUnicodeIdentifierPart(getCharArgument(0)));
00098     }
00099 
00100     if(name.equals("isIdentifierIgnorable(C)Z")) {
00101       return exit(Character.isIdentifierIgnorable(getCharArgument(0)));
00102     }
00103 
00104     if(name.equals("toLowerCase(C)C")) {
00105       return exit(Character.toLowerCase(getCharArgument(0)));
00106     }
00107 
00108     if(name.equals("toUpperCase(C)C")) {
00109       return exit(Character.toUpperCase(getCharArgument(0)));
00110     }
00111 
00112     if(name.equals("toTitleCase(C)C")) {
00113       return exit(Character.toTitleCase(getCharArgument(0)));
00114     }
00115 
00116     if(name.equals("digit(CI)I")) {
00117       return exit(Character.digit(getCharArgument(0), getIntArgument(1)));
00118     }
00119 
00120     if(name.equals("getNumericValue(C)I")) {
00121       return exit(Character.getNumericValue(getCharArgument(0)));
00122     }
00123 
00124     if(name.equals("isSpace(C)Z")) {
00125       return exit(Character.isSpace(getCharArgument(0)));
00126     }
00127 
00128     if(name.equals("isSpaceChar(C)Z")) {
00129       return exit(Character.isSpaceChar(getCharArgument(0)));
00130     }
00131 
00132     if(name.equals("isWhitespace(C)Z")) {
00133       return exit(Character.isWhitespace(getCharArgument(0)));
00134     }
00135 
00136     if(name.equals("isISOControl(C)Z")) {
00137       return exit(Character.isISOControl(getCharArgument(0)));
00138     }
00139 
00140     if(name.equals("getType(C)I")) {
00141       return exit(Character.getType(getCharArgument(0)));
00142     }
00143 
00144     if(name.equals("forDigit(II)C")) {
00145       return exit(Character.forDigit(getIntArgument(0), getIntArgument(1)));
00146     }
00147 
00148     return super.executeStaticMethod(mi);
00149   }  
00150 }

Generated at Thu Feb 7 06:48:17 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001