Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.parser.java.v2.model
Interface JavaIsGeneric

All Superinterfaces:
Element, JavaElement, JavaHasAnnotations, JavaHasName, JavaHasType, JavaMember
All Known Subinterfaces:
JavaClass, JavaMethod, JavaType, JavaTypeVariable, JavaWildcardType, SourceClass, SourceMethod, SourceTypeParameter
All Known Implementing Classes:
AbstractClass, AbstractMethod, AbstractType, BaseFileProvider.BaseClass, CastedMethod, oracle.javatools.parser.java.v2.classfile.ClClass, PrimitiveType, QuickComponent, QuickMethod, WrapperClass, WrapperMethod

public interface JavaIsGeneric
extends JavaMember

A generic declaration declares type parameters. Both types and methods (constructors too) may declare type parameters. A bound declaration may be created from a generic declaration.


Field Summary

 

Fields inherited from interface oracle.javatools.parser.java.v2.model.JavaMember
EMPTY_ARRAY

 

Method Summary
 java.util.Collection<JavaType> getActualTypeArguments()
          Get the type arguments, if any
 JavaTypeVariable getTypeParameter(java.lang.String name)
           
 java.util.Collection<JavaTypeVariable> getTypeParameters()
           
 boolean hasActualTypeArguments()
          Determine if this type or member has explicit or implicit (in the case of the diamond syntax) type arguments, e.g.
 boolean hasTypeParameters()
           

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMember
getOwningClass, getUniqueIdentifier, isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType
getResolvedType, getUnresolvedType

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasName
getName

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasAnnotations
getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo

 

Method Detail

hasTypeParameters

boolean hasTypeParameters()
Returns:
True if this member has type parameters.

getTypeParameters

java.util.Collection<JavaTypeVariable> getTypeParameters()
Returns:
The array of type parameters for this generic type. Zero-length if this type is not of generic type. Returns a Collection of JavaTypeVariable's.

getTypeParameter

JavaTypeVariable getTypeParameter(java.lang.String name)
Returns:
The matching type parameter. Null means no match.

hasActualTypeArguments

boolean hasActualTypeArguments()
Determine if this type or member has explicit or implicit (in the case of the diamond syntax) type arguments, e.g. will return true for 'Type' in 'new Type<Integer>()' and in 'new Type<>()' and false for 'Type' in 'new Type()'
Returns:
True if this member has explicit or implicit type arguments.

getActualTypeArguments

java.util.Collection<JavaType> getActualTypeArguments()
Get the type arguments, if any
Returns:
The array of actual type arguments this type or member is bound to. Zero-length if this type is not generic or is not bound or is a type with implied type arguments, such as from the diamond syntax for new class expressions. Returns a Collection of JavaType's.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.