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 SourceTypeReference

All Superinterfaces:
Element, JavaElement, JavaHasType, SourceElement, SourceHasName

public interface SourceTypeReference
extends SourceElement, SourceHasName, JavaHasType

A type reference.


Field Summary
static SourceTypeReference[] EMPTY_ARRAY
           

 

Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT

 

Method Summary
 int getArrayDimension()
          Gets the array dimension.
 SourceTypeReference getQualifyingType()
          If this type refers to "OuterClass<Argument>.InnerClass", then this will return the type for "OuterClass<Argument>".
 java.util.List<SourceTypeArgument> getTypeArguments()
          Gets the list of type arguments.
 boolean isArray()
          True if this is an array type reference.
 boolean isGeneric()
          Determine if this is a generic type or a raw type.
 boolean isPrimitive()
          True if this is a primitive type (including "void").
 void setTypeArguments(java.util.List<SourceTypeArgument> typeArguments)
          Change the type arguments.
 void simplifyType()
          Attempts to simplify this type.

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasName
getName, getNameElement, setName, setNameElement

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, hasErrors, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf

 

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

 

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

 

Field Detail

EMPTY_ARRAY

static final SourceTypeReference[] EMPTY_ARRAY

Method Detail

simplifyType

void simplifyType()
Attempts to simplify this type.

isPrimitive

boolean isPrimitive()
True if this is a primitive type (including "void"). Array types of primitives return false.

getQualifyingType

SourceTypeReference getQualifyingType()
If this type refers to "OuterClass<Argument>.InnerClass", then this will return the type for "OuterClass<Argument>".
Returns:
The qualifying type, null if none.

getTypeArguments

java.util.List<SourceTypeArgument> getTypeArguments()
Gets the list of type arguments.
Returns:
The array of type arguments. Returns a collection of SourceTypeArgument's.

setTypeArguments

void setTypeArguments(java.util.List<SourceTypeArgument> typeArguments)
Change the type arguments.
Parameters:
typeArguments - If typeArguments == null, remove any current type arguments, making this effectively a raw type. If typeArguments is an empty List, remove any current type arguments and add empty angle brackets to this type (add the diamond syntax). Otherwise remove any current typeArguments and add the incoming typeArguments

isGeneric

boolean isGeneric()
Determine if this is a generic type or a raw type. For a raw type, getTypeArguments() will always return an empty List. For a generic type, getTypeArguments() will return a non-empty List if there are actual type arguments, or an empty list IFF the type has an empty type argument list ('diamond syntax'), as in 'new List<>();'.
Returns:
False if this is a raw type, true if this is a generic type with either implicit or explicit type arguments

isArray

boolean isArray()
True if this is an array type reference.
Returns:
True if getArrayDimension() > 0.

getArrayDimension

int getArrayDimension()
Gets the array dimension. Implicitly includes an array dimension increment of 1 IF this is the type of a variable-length argument.
Returns:
0 means not an array.

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.