Top Description Fields Constructors Methods
com.sun.codemodel

pack-priv final Class JTypeWildcard

extends JClass
Class Inheritance
Imports
java.util.Iterator, .List

Represents a wildcard type like "? extends Foo".

Instances of this class can be obtained from JClass#wildcard()

Todo

extend this to cover "? super Integer".

Our modeling of types are starting to look really ugly. ideally it should have been done somewhat like APT, but it's too late now.

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final JClass
Inherited from com.sun.codemodel.JClass:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public JClass
_extends()

Implements abstract com.sun.codemodel.JClass._extends.

Returns the class bound of this variable.

public Iterator<JClass>
_implements()

Implements abstract com.sun.codemodel.JClass._implements.

Returns the interface bounds of this variable.

public JPackage
_package()

Implements abstract com.sun.codemodel.JClass._package.

Gets the package to which this class belongs.

public String
fullName()

Implements abstract com.sun.codemodel.JType.fullName.

Gets the full name of the type.

public void
public boolean
isAbstract()

Implements abstract com.sun.codemodel.JClass.isAbstract.

Checks if this class is an abstract class.

public boolean
isInterface()

Implements abstract com.sun.codemodel.JClass.isInterface.

Checks if this object represents an interface.

public String
name()

Implements abstract com.sun.codemodel.JClass.name.

Gets the name of this class.

protected JClass
substituteParams(JTypeVar[] variables, List<JClass> bindings)

Implements abstract com.sun.codemodel.JClass.substituteParams.

Substitutes the type variables with their actual arguments.

Inherited from com.sun.codemodel.JClass:
arrayboxifydotclasserasuregetBaseClassgetBaseClassgetPrimitiveTypegetTypeParametersisAssignableFromisParameterizednarrownarrownarrownarrownarrownarrowouterownerprintLinkstaticInvokestaticInvokestaticRefstaticReftoStringtypeParamsunboxifywildcard

Field Detail

boundback to summary
private final JClass bound

Constructor Detail

JTypeWildcardback to summary
pack-priv JTypeWildcard(JClass bound)

Method Detail

_extendsback to summary
public JClass _extends()

Implements abstract com.sun.codemodel.JClass._extends.

Returns the class bound of this variable.

If no bound is given, this method returns Object.

Annotations
@Override
_implementsback to summary
public Iterator<JClass> _implements()

Implements abstract com.sun.codemodel.JClass._implements.

Returns the interface bounds of this variable.

Annotations
@Override
_packageback to summary
public JPackage _package()

Implements abstract com.sun.codemodel.JClass._package.

Doc from com.sun.codemodel.JClass._package.

Gets the package to which this class belongs.

Todo

shall we move move this down?

Annotations
@Override
fullNameback to summary
public String fullName()

Implements abstract com.sun.codemodel.JType.fullName.

Doc from com.sun.codemodel.JType.fullName.

Gets the full name of the type. See http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#25430 for the details.

Annotations
@Override
generateback to summary
public void generate(JFormatter f)

Overrides com.sun.codemodel.JClass.generate.

Implements com.sun.codemodel.JGenerable.generate.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

Implements abstract com.sun.codemodel.JClass.isAbstract.

Doc from com.sun.codemodel.JClass.isAbstract.

Checks if this class is an abstract class.

Annotations
@Override
isInterfaceback to summary
public boolean isInterface()

Implements abstract com.sun.codemodel.JClass.isInterface.

Doc from com.sun.codemodel.JClass.isInterface.

Checks if this object represents an interface.

Annotations
@Override
nameback to summary
public String name()

Implements abstract com.sun.codemodel.JClass.name.

Doc from com.sun.codemodel.JClass.name.

Gets the name of this class.

Annotations
@Override
substituteParamsback to summary
protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings)

Implements abstract com.sun.codemodel.JClass.substituteParams.

Doc from com.sun.codemodel.JClass.substituteParams.

Substitutes the type variables with their actual arguments.

For example, when this class is Map<String,Map<V>>, (where V then doing substituteParams( V, Integer ) returns a for Map<String,Map<Integer>>.

This method needs to work recursively.

Annotations
@Override