Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Modifiers | Name | Description |
---|---|---|
static GenericsType[] |
EMPTY_GENERICS_ARRAY |
Given a parameterized type and a generic type information, aligns actual type parameters. For example, if a class uses generic type
<T,U,V>(redirectGenericTypes), is used with actual type parameters
<java.lang.String, U,V>, then a class or interface using generic types
<T,V>will be aligned to
<java.lang.String,V>
redirectGenericTypes
- the type arguments or the redirect class nodeparameterizedTypes
- the actual type arguments used on this class nodealignmentTarget
- the generic type arguments to which we want to align totransforms generics types from an old context to a new context using the given spec. This method assumes all generics types will be placeholders. WARNING: The resulting generics types may or may not be placeholders after the transformation.
genericsSpec
- the generics context information specoldPlaceHolders
- the old placeholdersGenerates a wildcard generic type in order to be used for checks against class nodes. See GenericsType#isCompatibleWith(org.codehaus.groovy.ast.ClassNode).
types
- the type to be used as the wildcard upper bound
For a given classnode, fills in the supplied map with the parameterized types it defines.
Interface class nodes retrieved from ClassNode.getInterfaces or ClassNode.getAllInterfaces are returned with generic type arguments. This method allows returning a parameterized interface given the parameterized class node which implements this interface.
hint
- the class node where generics types are parameterizedtarget
- the interface we want to parameterize generics typesInterface class nodes retrieved from ClassNode.getInterfaces or ClassNode.getAllInterfaces are returned with generic type arguments. This method allows returning a parameterized interface given the parameterized class node which implements this interface.
hint
- the class node where generics types are parameterizedtarget
- the interface we want to parameterize generics types