MCPcopy Index your code
hub / github.com/apache/groovy / makeArray

Method makeArray

src/main/java/org/codehaus/groovy/ast/ClassNode.java:1968–1981  ·  view source on GitHub ↗

Returns a ClassNode representing an array of the type represented by this.

()

Source from the content-addressed store, hash-verified

1966 * Returns a {@code ClassNode} representing an array of the type represented by this.
1967 */
1968 public ClassNode makeArray() {
1969 ClassNode node;
1970 if (redirect != null) {
1971 node = redirect.makeArray();
1972 node.componentType = this;
1973 } else if (clazz != null) {
1974 Class<?> type = Array.newInstance(clazz, 0).getClass();
1975 // don't use the ClassHelper here!
1976 node = new ClassNode(type, this);
1977 } else {
1978 node = new ClassNode(this);
1979 }
1980 return node;
1981 }
1982
1983 /**
1984 * Returns the component type of this array ClassNode.

Callers 14

configureGenericArrayMethod · 0.95
resolveMethod · 0.95
completeEnumMethod · 0.95
addMethodsMethod · 0.95
doAssignmentToArrayMethod · 0.95
makeMethod · 0.95
makeWithoutCachingMethod · 0.95
getNextSuperClassMethod · 0.95
nonGenericMethod · 0.95
makeArrayMethod · 0.95

Calls 3

getClassMethod · 0.80
makeArrayMethod · 0.65
newInstanceMethod · 0.65

Tested by

no test coverage detected