org.mule.devkit.model.code
Class NullType

java.lang.Object
  extended by org.mule.devkit.model.code.Type
      extended by org.mule.devkit.model.code.TypeReference
          extended by org.mule.devkit.model.code.NullType
All Implemented Interfaces:
Comparable<Type>, Generable

public final class NullType
extends TypeReference

Special class object that represents the type of "null".

Use this class with care.

Author:
Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Field Summary
 
Fields inherited from class org.mule.devkit.model.code.TypeReference
EMPTY_ARRAY
 
Method Summary
 TypeReference _extends()
          Gets the super class of this class.
 Iterator<TypeReference> _implements()
          Iterates all super interfaces directly implemented by this class/interface.
 GeneratedPackage _package()
          Gets the package to which this class belongs.
 String fullName()
          Gets the full name of the type.
 boolean isAbstract()
          Checks if this class is an abstract class.
 boolean isInterface()
          Checks if this object represents an interface.
 String name()
          Gets the name of this class.
protected  TypeReference substituteParams(TypeVariable[] variables, List<TypeReference> bindings)
          Substitutes the type variables with their actual arguments.
 
Methods inherited from class org.mule.devkit.model.code.TypeReference
array, array, boxify, erasure, generate, getBaseClass, getBaseClass, getPrimitiveType, getTypeParameters, isAssignableFrom, isParameterized, narrow, narrow, narrow, narrow, narrow, narrow, outer, owner, staticInvoke, staticInvoke, staticRef, staticRef, toString, typeParams, unboxify, wildcard
 
Methods inherited from class org.mule.devkit.model.code.Type
binaryName, compareTo, dotclass, elementType, equals, hashCode, isArray, isPrimitive, isReference, parse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

name

public String name()
Description copied from class: TypeReference
Gets the name of this class.

Specified by:
name in class TypeReference
Returns:
name of this class, without any qualification. For example, this method returns "String" for java.lang.String.

fullName

public String fullName()
Description copied from class: Type
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.

Specified by:
fullName in class Type
Returns:
Strings like "int", "java.lang.String", "java.io.File[]". Never null.

_package

public GeneratedPackage _package()
Description copied from class: TypeReference
Gets the package to which this class belongs. TODO: shall we move move this down?

Specified by:
_package in class TypeReference

_extends

public TypeReference _extends()
Description copied from class: TypeReference
Gets the super class of this class.

Specified by:
_extends in class TypeReference
Returns:
Returns the TypeReference representing the superclass of the entity (class or interface) represented by this TypeReference. Even if no super class is given explicitly or this TypeReference is not a class, this method still returns TypeReference for Object. If this TypeReference represents Object, return null.

_implements

public Iterator<TypeReference> _implements()
Description copied from class: TypeReference
Iterates all super interfaces directly implemented by this class/interface.

Specified by:
_implements in class TypeReference
Returns:
A non-null valid iterator that iterates all TypeReference objects that represents those interfaces implemented by this object.

isInterface

public boolean isInterface()
Description copied from class: TypeReference
Checks if this object represents an interface.

Specified by:
isInterface in class TypeReference

isAbstract

public boolean isAbstract()
Description copied from class: TypeReference
Checks if this class is an abstract class.

Specified by:
isAbstract in class TypeReference

substituteParams

protected TypeReference substituteParams(TypeVariable[] variables,
                                         List<TypeReference> bindings)
Description copied from class: TypeReference
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 TypeReference for Map<String,Map<Integer>>.

This method needs to work recursively.

Specified by:
substituteParams in class TypeReference


Copyright © 2010-2013 MuleSoft, Inc.. All Rights Reserved.