Java Code Examples for sun.jvm.hotspot.oops.ArrayKlass

Following code examples demonstrate how to use sun.jvm.hotspot.oops.ArrayKlassfrom java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use sun.jvm.hotspot.oops.ArrayKlassand various code implementation of this class.

	public String initDescription() {
		Klass k = klass;
		if (k instanceof InstanceKlass)
			return k.getName().asString().replace('/', '.');

		if (k instanceof ArrayKlass) {
			ArrayKlass ak = (ArrayKlass) k;
			if (k instanceof TypeArrayKlass) {
				TypeArrayKlass tak = (TypeArrayKlass) ak;
				return tak.getElementTypeName() + "[]";

			if (k instanceof ObjArrayKlass) {
				ObjArrayKlass oak = (ObjArrayKlass) ak;
				Klass bottom = oak.getBottomKlass();
				StringBuilder buf = new StringBuilder(32);
				if (bottom instanceof TypeArrayKlass) {
					buf.append(((TypeArrayKlass) bottom).getElementTypeName());
				} else if (bottom instanceof InstanceKlass) {
					buf.append(bottom.getName().asString().replace('/', '.'));
				} else {
					throw new RuntimeException("should not reach here");

				int dim = (int) oak.getDimension();
				for (int i = 0; i < dim; i++) {
				return buf.toString();

		return getInternalName(k);