Top Description Constructors Methods
io.vertx.codegen.type

public abstract Class TypeInfo

extends Object
Class Inheritance
Known Direct Subclasses
io.vertx.codegen.type.TypeVariableInfo, io.vertx.codegen.type.VoidTypeInfo, io.vertx.codegen.type.ArrayTypeInfo, io.vertx.codegen.type.ClassTypeInfo, io.vertx.codegen.type.ParameterizedTypeInfo, io.vertx.codegen.type.PrimitiveTypeInfo
Imports
java.util.Collection

Describes a java type.
Author
Julien Viet

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
collectImports(Collection<ClassTypeInfo>
the imports
imports
)

Collect the import fqcn needed by this type.

public abstract boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

pack-priv abstract String

Returns:

the representation of the type
format
(boolean
true when class fqcn should be used, otherwise simple names will be used
qualified
)

Renders the type name.

public DataObjectInfo

Returns:

the DataObjectInfo when this type can be adapted to a data object otherwise null
getDataObject
()

public TypeInfo

Returns:

the erased type of this type
getErased
()

public abstract ClassKind

Returns:

the class kind this type resolves to
getKind
()

public String

Returns:

the declaration suitable for source code represented using qualified names, for instance io.vertx.core.Handler<io.vertx.core.buffer.Buffer>
getName
()

public ClassTypeInfo

Returns:

the corresponding raw type or null
getRaw
()

public String

Returns:

the declaration suitable for source code represented using unqualified names, for instance Handler<Buffer>
getSimpleName
()

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean

Returns:

true if this type holds a DataObjectInfo
isDataObjectHolder
()

public boolean

Returns:

true if the type is nullable
isNullable
()

public boolean

Returns:

true if the type is a parameterized type
isParameterized
()

public boolean

Returns:

true if the type is a type variable
isVariable
()

public boolean

Returns:

true if the type void
isVoid
()

public String

Returns:

the @{link #getName} value of this type
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String

Returns:

the translated name
translateName
(String
the target language, for instance groovy
lang
)

Translate the current type name based on the module group package name and the specified lang parameter.

public String
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Constructor Detail

TypeInfoback to summary
public TypeInfo()

Method Detail

collectImportsback to summary
public void collectImports(Collection<ClassTypeInfo> imports)

Collect the import fqcn needed by this type.

Parameters
imports:Collection<ClassTypeInfo>

the imports

equalsback to summary
public abstract boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

formatback to summary
pack-priv abstract String format(boolean qualified)

Renders the type name.

Parameters
qualified:boolean

true when class fqcn should be used, otherwise simple names will be used

Returns:String

the representation of the type

getDataObjectback to summary
public DataObjectInfo getDataObject()
Returns:DataObjectInfo

the DataObjectInfo when this type can be adapted to a data object otherwise null

getErasedback to summary
public TypeInfo getErased()
Returns:TypeInfo

the erased type of this type

getKindback to summary
public abstract ClassKind getKind()
Returns:ClassKind

the class kind this type resolves to

getNameback to summary
public String getName()
Returns:String

the declaration suitable for source code represented using qualified names, for instance io.vertx.core.Handler<io.vertx.core.buffer.Buffer>

getRawback to summary
public ClassTypeInfo getRaw()
Returns:ClassTypeInfo

the corresponding raw type or null

getSimpleNameback to summary
public String getSimpleName()
Returns:String

the declaration suitable for source code represented using unqualified names, for instance Handler<Buffer>

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

isDataObjectHolderback to summary
public boolean isDataObjectHolder()
Returns:boolean

true if this type holds a DataObjectInfo

isNullableback to summary
public boolean isNullable()
Returns:boolean

true if the type is nullable

isParameterizedback to summary
public boolean isParameterized()
Returns:boolean

true if the type is a parameterized type

isVariableback to summary
public boolean isVariable()
Returns:boolean

true if the type is a type variable

isVoidback to summary
public boolean isVoid()
Returns:boolean

true if the type void

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

the @{link #getName} value of this type

translateNameback to summary
public String translateName(String lang)

Translate the current type name based on the module group package name and the specified lang parameter. This has effect only for ApiTypeInfo or ParameterizedTypeInfo types.

Parameters
lang:String

the target language, for instance groovy

Returns:String

the translated name

translateNameback to summary
public String translateName(TypeNameTranslator translator)