MCPcopy Create free account
hub / github.com/antlr/codebuff / newParameterizedTypeWithOwner

Method newParameterizedTypeWithOwner

output/java_guava/1.4.18/Types.java:90–98  ·  view source on GitHub ↗

Returns a type where rawType is parameterized by arguments and is owned by ownerType.

(@Nullable Type ownerType, Class<?> rawType, Type... arguments)

Source from the content-addressed store, hash-verified

88
89
90 static ParameterizedType newParameterizedTypeWithOwner(@Nullable Type ownerType, Class<?> rawType, Type... arguments) {
91 if (ownerType == null) {
92 return newParameterizedType(rawType, arguments);
93 }
94 // ParameterizedTypeImpl constructor already checks, but we want to throw NPE before IAE
95 checkNotNull(arguments);
96 checkArgument(rawType.getEnclosingClass() != null, "Owner type for unenclosed %s", rawType);
97 return new ParameterizedTypeImpl(ownerType, rawType, arguments);
98 }
99
100 /**
101 * Returns a type where {@code rawType} is parameterized by {@code arguments}.

Callers 3

toGenericTypeMethod · 0.95
captureMethod · 0.95

Calls 3

newParameterizedTypeMethod · 0.95
checkNotNullMethod · 0.45
checkArgumentMethod · 0.45

Tested by

no test coverage detected