array.c

来自「linux下建立JAVA虚拟机的源码KAFFE」· C语言 代码 · 共 43 行

C
43
字号
/*      * java.lang.reflect.Array.c * * Copyright (c) 1996, 1997 *	Transvirtual Technologies, Inc.  All rights reserved. * * See the file "license.terms" for information on usage and redistribution  * of this file.  */#include "config.h"#include "config-std.h"#include "config-mem.h"#include "object.h"#include "classMethod.h"#include "baseClasses.h"#include "itypes.h"#include "soft.h"#include "exception.h"#include "java_lang_reflect_Array.h"#include <native.h>#include "defs.h"jintjava_lang_reflect_Array_getLength(struct Hjava_lang_Object* obj){	if (!CLASS_IS_ARRAY(OBJECT_CLASS(obj)))		SignalError("java.lang.IllegalArgumentException", "");	return (obj_length((HArrayOfObject*)obj));}struct Hjava_lang_Object*java_lang_reflect_Array_newArray(struct Hjava_lang_Class* clazz, jint size){	if (size < 0) {		SignalError("java.lang.NegativeArraySizeException", "");	}	return (newArray(clazz, (jsize) size));}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?