00001 /*! 00002 * @file jlString.c 00003 * 00004 * @brief Native implementation of @c @b java.lang.String 00005 * 00006 * @todo Perform intelligent check on input parameter 00007 * @b objhash range for all functions. 00008 * 00009 * 00010 * @section Control 00011 * 00012 * \$URL: https://svn.apache.org/path/name/jlString.c $ \$Id: jlString.c 0 09/28/2005 dlydick $ 00013 * 00014 * Copyright 2005 The Apache Software Foundation 00015 * or its licensors, as applicable. 00016 * 00017 * Licensed under the Apache License, Version 2.0 ("the License"); 00018 * you may not use this file except in compliance with the License. 00019 * You may obtain a copy of the License at 00020 * 00021 * http://www.apache.org/licenses/LICENSE-2.0 00022 * 00023 * Unless required by applicable law or agreed to in writing, 00024 * software distributed under the License is distributed on an 00025 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 00026 * either express or implied. 00027 * 00028 * See the License for the specific language governing permissions 00029 * and limitations under the License. 00030 * 00031 * @version \$LastChangedRevision: 0 $ 00032 * 00033 * @date \$LastChangedDate: 09/28/2005 $ 00034 * 00035 * @author \$LastChangedBy: dlydick $ 00036 * Original code contributed by Daniel Lydick on 09/28/2005. 00037 * 00038 * @section Reference 00039 * 00040 */ 00041 00042 #include "arch.h" 00043 ARCH_COPYRIGHT_APACHE(jlString, c, "$URL: https://svn.apache.org/path/name/jlString.c $ $Id: jlString.c 0 09/28/2005 dlydick $"); 00044 00045 00046 #include "jvmcfg.h" 00047 #include "classfile.h" 00048 #include "jvm.h" 00049 00050 00051 /*! 00052 * @name Native implementation of class static functions. 00053 * 00054 * The class index of the current class is always passed 00055 * as the first parameter. 00056 * 00057 * @note These @c @b java.lang.String methods are unusual in that 00058 * they does not require a @c @b jobject (in parlance of this 00059 * implementation, a @link #jvm_object_hash jvm_object_hash@endlink) 00060 * to run because they are declared as @c @b static methods. As 00061 * implemented here, the usual @b objhashthis parameter is therefore 00062 * replaced by * @b clsidxthis. The thread context is located in 00063 * @link #CURRENT_THREAD CURRENT_THREAD@endlink. 00064 * 00065 */ 00066 00067 /*@{ */ /* Begin grouped definitions */ 00068 00069 /*@} */ /* End of grouped definitions */ 00070 00071 00072 /*! 00073 * @name Native implementation of object instance functions. 00074 * 00075 * The object hash of @c @b this object is always passed 00076 * as the first parameter. 00077 * 00078 */ 00079 00080 /*@{ */ /* Begin grouped definitions */ 00081 00082 /*! 00083 * @brief Native implementation 00084 * of @c @b java.lang.String.intern() 00085 * 00086 * 00087 * @param objhashthis Object table hash of @c @b this object. 00088 * 00089 * 00090 * @returns Object hash for this @c @b java.lang.String (same 00091 * as input object hash, in this particular implementation) 00092 * 00093 */ 00094 00095 jvm_object_hash jlString_intern(jvm_object_hash objhashthis) 00096 { 00097 if (jvm_object_hash_null == objhashthis) 00098 { 00099 return(jvm_object_hash_null); 00100 } 00101 00102 /*! @todo Is this correct? */ 00103 return(objhashthis); 00104 00105 } /* END of jlString_intern() */ 00106 00107 /*@} */ /* End of grouped definitions */ 00108 00109 00110 /* EOF */ 00111