MCPcopy Index your code
hub / github.com/beanshell/beanshell / getArrayDimensions

Method getArrayDimensions

src/bsh/Reflect.java:807–813  ·  view source on GitHub ↗

returns the dimensionality of the Class returns 0 if the Class is not an array class

(Class arrayClass)

Source from the content-addressed store, hash-verified

805 * returns 0 if the Class is not an array class
806 */
807 public static int getArrayDimensions(Class arrayClass) {
808 if (!arrayClass.isArray()) {
809 return 0;
810 }
811
812 return arrayClass.getName().lastIndexOf('[') + 1; // why so cute?
813 }
814
815
816 /**

Callers 2

evalMethod · 0.95
normalizeClassNameMethod · 0.95

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected