Top Fields Constructors Methods
io.vertx.codegen

public Class MethodInfo

extends Object
implements Comparable<MethodInfo>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
io.vertx.codegen.doc.Doc, .Text, io.vertx.codegen.format.CamelCase, .Case, io.vertx.codegen.type.ClassKind, .ClassTypeInfo, .ParameterizedTypeInfo, .TypeInfo, .TypeVariableInfo, java.util.*

Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private boolean
private String
private boolean
private boolean
private Text
private Doc
private boolean
private boolean
private String
private Set<ClassTypeInfo>
private List<ParamInfo>
private Text
private TypeInfo
private boolean
private List<TypeParamInfo.Method>
private boolean

Constructor Summary

AccessConstructor and Description
public
MethodInfo(Set<ClassTypeInfo> ownerTypes, String name, TypeInfo returnType, Text returnDescription, boolean fluent, boolean cacheReturn, List<ParamInfo> params, String comment, Doc doc, boolean staticMethod, boolean defaultMethod, List<TypeParamInfo.Method> typeParams, boolean deprecated, Text deprecatedDesc, boolean useFutures, boolean methodOverride)

Method Summary

Modifier and TypeMethod and Description
public void
public int
compareTo(MethodInfo
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

private static boolean
public MethodInfo

Returns:

a copy of this object
copy
()

public TypeInfo

Returns:

the callback type or null when the method is not a callback method
getCallbackType
()

public String
public Text

Returns:

the description of deprecated
getDeprecatedDesc
()

public Doc
public MethodKind
public String
public String
getName(Case _case)

public Set<ClassTypeInfo>
public ParamInfo
getParam(int index)

public List<ParamInfo>
public Text
public TypeInfo
public Signature

Returns:

the method signature
getSignature
()

Returns the method signature, the returned object is freely modifiable.

public List<TypeParamInfo.Method>
public boolean
public boolean

Returns:

whether the method is annotated with io.vertx.codegen.annotations.GenIgnore
isContainingAnyJavaType
()

public boolean
public boolean

Returns:

true if the method has a @Deprecated annotation
isDeprecated
()

public boolean
public boolean
public boolean

Returns:

true if the method has a nullable return
isNullableReturn
()

public boolean

Returns:

true when this method is owned by the owner argument
isOwnedBy
(ClassTypeInfo
the tested type
owner
)

Return true if the provided type is the sole owner of this method, i.e this method is only declared by the provided type.

public boolean
public boolean
public void
public ParamInfo

Returns:

the matching method parameter or null
resolveClassTypeParam
(TypeVariableInfo
the type variable to check
typeVar
)

Resolve the method parameter that is of kind ClassKind#CLASS_TYPE and that matches the specified type variable e.g: <U> Map.Entry<String, U> getEntry(String s, Class<U> type); returns for <U> the second method parameter.

public TypeArgExpression
public MethodInfo
setCacheReturn(boolean cacheReturn)

public MethodInfo
setComment(String comment)

public MethodInfo
setDefaultMethod(boolean defaultMethod)

public MethodInfo
setDeprecated(boolean deprecated)

public MethodInfo
setDeprecatedDesc(Text deprecatedDesc)

public MethodInfo
setDoc(Doc doc)

public MethodInfo
setFluent(boolean fluent)

public MethodInfo
public MethodInfo
public MethodInfo
public MethodInfo
setReturnDescription(Text returnDescription)

public MethodInfo
setReturnType(TypeInfo returnType)

public MethodInfo
setStaticMethod(boolean staticMethod)

public MethodInfo
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cacheReturnback to summary
private boolean cacheReturn
commentback to summary
private String comment
defaultMethodback to summary
private boolean defaultMethod
deprecatedback to summary
private boolean deprecated
deprecatedDescback to summary
private Text deprecatedDesc
docback to summary
private Doc doc
fluentback to summary
private boolean fluent
methodOverrideback to summary
private boolean methodOverride
nameback to summary
private String name
ownerTypesback to summary
private Set<ClassTypeInfo> ownerTypes
paramsback to summary
private List<ParamInfo> params
returnDescriptionback to summary
private Text returnDescription
returnTypeback to summary
private TypeInfo returnType
staticMethodback to summary
private boolean staticMethod
typeParamsback to summary
private List<TypeParamInfo.Method> typeParams
useFuturesback to summary
private boolean useFutures

Constructor Detail

MethodInfoback to summary
public MethodInfo(Set<ClassTypeInfo> ownerTypes, String name, TypeInfo returnType, Text returnDescription, boolean fluent, boolean cacheReturn, List<ParamInfo> params, String comment, Doc doc, boolean staticMethod, boolean defaultMethod, List<TypeParamInfo.Method> typeParams, boolean deprecated, Text deprecatedDesc, boolean useFutures, boolean methodOverride)

Method Detail

collectImportsback to summary
public void collectImports(Collection<ClassTypeInfo> imports)
compareToback to summary
public int compareTo(MethodInfo o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:MethodInfo

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
containsAnyJavaTypeback to summary
private static boolean containsAnyJavaType(TypeInfo type)
copyback to summary
public MethodInfo copy()
Returns:MethodInfo

a copy of this object

getCallbackTypeback to summary
public TypeInfo getCallbackType()
Returns:TypeInfo

the callback type or null when the method is not a callback method

getCommentback to summary
public String getComment()
getDeprecatedDescback to summary
public Text getDeprecatedDesc()
Returns:Text

the description of deprecated

getDocback to summary
public Doc getDoc()
getKindback to summary
public MethodKind getKind()
getNameback to summary
public String getName()
getNameback to summary
public String getName(Case _case)
getOwnerTypesback to summary
public Set<ClassTypeInfo> getOwnerTypes()
getParamback to summary
public ParamInfo getParam(int index)
getParamsback to summary
public List<ParamInfo> getParams()
getReturnDescriptionback to summary
public Text getReturnDescription()
getReturnTypeback to summary
public TypeInfo getReturnType()
getSignatureback to summary
public Signature getSignature()

Returns the method signature, the returned object is freely modifiable.

Returns:Signature

the method signature

getTypeParamsback to summary
public List<TypeParamInfo.Method> getTypeParams()
isCacheReturnback to summary
public boolean isCacheReturn()
isContainingAnyJavaTypeback to summary
public boolean isContainingAnyJavaType()
Returns:boolean

whether the method is annotated with io.vertx.codegen.annotations.GenIgnore

isDefaultMethodback to summary
public boolean isDefaultMethod()
isDeprecatedback to summary
public boolean isDeprecated()
Returns:boolean

true if the method has a @Deprecated annotation

isFluentback to summary
public boolean isFluent()
isMethodOverrideback to summary
public boolean isMethodOverride()
isNullableReturnback to summary
public boolean isNullableReturn()
Returns:boolean

true if the method has a nullable return

isOwnedByback to summary
public boolean isOwnedBy(ClassTypeInfo owner)

Return true if the provided type is the sole owner of this method, i.e this method is only declared by the provided type.

Parameters
owner:ClassTypeInfo

the tested type

Returns:boolean

true when this method is owned by the owner argument

isStaticMethodback to summary
public boolean isStaticMethod()
isUseFuturesback to summary
public boolean isUseFutures()
mergeTypeParamsback to summary
public void mergeTypeParams(List<TypeParamInfo.Method> mergedTypeParams) throws IllegalArgumentException
resolveClassTypeParamback to summary
public ParamInfo resolveClassTypeParam(TypeVariableInfo typeVar)

Resolve the method parameter that is of kind ClassKind#CLASS_TYPE and that matches the specified type variable e.g:

<U> Map.Entry<String, U> getEntry(String s, Class<U> type);

returns for <U> the second method parameter.

Parameters
typeVar:TypeVariableInfo

the type variable to check

Returns:ParamInfo

the matching method parameter or null

resolveTypeArgback to summary
public TypeArgExpression resolveTypeArg(TypeVariableInfo typeVar)
setCacheReturnback to summary
public MethodInfo setCacheReturn(boolean cacheReturn)
setCommentback to summary
public MethodInfo setComment(String comment)
setDefaultMethodback to summary
public MethodInfo setDefaultMethod(boolean defaultMethod)
setDeprecatedback to summary
public MethodInfo setDeprecated(boolean deprecated)
setDeprecatedDescback to summary
public MethodInfo setDeprecatedDesc(Text deprecatedDesc)
setDocback to summary
public MethodInfo setDoc(Doc doc)
setFluentback to summary
public MethodInfo setFluent(boolean fluent)
setNameback to summary
public MethodInfo setName(String name)
setOwnerTypesback to summary
public MethodInfo setOwnerTypes(Set<ClassTypeInfo> ownerTypes)
setParamsback to summary
public MethodInfo setParams(List<ParamInfo> params)
setReturnDescriptionback to summary
public MethodInfo setReturnDescription(Text returnDescription)
setReturnTypeback to summary
public MethodInfo setReturnType(TypeInfo returnType)
setStaticMethodback to summary
public MethodInfo setStaticMethod(boolean staticMethod)
setTypeParamsback to summary
public MethodInfo setTypeParams(List<TypeParamInfo.Method> typeParams)
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

a string representation of the object

Annotations
@Override