public TypeDesc toArrayType() { if (mArrayType == null) { int length = mDescriptor.length(); char[] buf = new char[length + 1]; buf[0] = '['; mDescriptor.getChars(0, length, buf, 1); mArrayType = intern(new ArrayType(new String(buf), this)); } return mArrayType; }
private Class arrayClass(Class clazz) { if (clazz == null) { return null; } int dim = getDimensions(); try { if (dim == 1) { return Array.newInstance(clazz, 0).getClass(); } else { return Array.newInstance(clazz, new int[dim]).getClass(); } } catch (IllegalArgumentException e) { return null; } } }
private Class arrayClass(Class clazz) { if (clazz == null) { return null; } int dim = getDimensions(); try { if (dim == 1) { return Array.newInstance(clazz, 0).getClass(); } else { return Array.newInstance(clazz, new int[dim]).getClass(); } } catch (IllegalArgumentException e) { return null; } } }
public TypeDesc toArrayType() { if (mArrayType == null) { int length = mDescriptor.length(); char[] buf = new char[length + 1]; buf[0] = '['; mDescriptor.getChars(0, length, buf, 1); mArrayType = intern(new ArrayType(new String(buf), this)); } return mArrayType; }
public TypeDesc toArrayType() { if (mArrayType == null) { char[] buf = new char[2]; buf[0] = '['; buf[1] = mDescriptor.charAt(0); mArrayType = intern(new ArrayType(new String(buf), this)); } return mArrayType; }
public Class toClass(ClassLoader loader) { if (loader == null) { return arrayClass(getRootComponentType().toClass()); } else { return arrayClass(getRootComponentType().toClass(loader)); } }
public Class toClass(ClassLoader loader) { if (loader == null) { return arrayClass(getRootComponentType().toClass()); } else { return arrayClass(getRootComponentType().toClass(loader)); } }
public TypeDesc toArrayType() { if (mArrayType == null) { char[] buf = new char[2]; buf[0] = '['; buf[1] = mDescriptor.charAt(0); mArrayType = intern(new ArrayType(new String(buf), this)); } return mArrayType; }