public class MethodInfo extends Object implements Comparable<MethodInfo>
Constructor and Description |
---|
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) |
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)
public String getName()
public MethodInfo setName(String name)
public TypeInfo getCallbackType()
null
when the method is not a callback methodpublic MethodKind getKind()
public TypeInfo getReturnType()
public MethodInfo setReturnType(TypeInfo returnType)
public boolean isContainingAnyJavaType()
GenIgnore
public ParamInfo resolveClassTypeParam(TypeVariableInfo typeVar)
ClassKind.CLASS_TYPE
and that matches the specified type variable e.g:<U> Map.Entry<String, U> getEntry(String s, Class<U> type);
<U>
the second method parameter.typeVar
- the type variable to checkpublic TypeArgExpression resolveTypeArg(TypeVariableInfo typeVar)
public Text getReturnDescription()
public MethodInfo setReturnDescription(Text returnDescription)
public Set<ClassTypeInfo> getOwnerTypes()
public MethodInfo setOwnerTypes(Set<ClassTypeInfo> ownerTypes)
public Signature getSignature()
public boolean isOwnedBy(ClassTypeInfo owner)
owner
- the tested typeowner
argumentpublic boolean isFluent()
public MethodInfo setFluent(boolean fluent)
public boolean isCacheReturn()
public MethodInfo setCacheReturn(boolean cacheReturn)
public boolean isNullableReturn()
public MethodInfo setParams(List<ParamInfo> params)
public ParamInfo getParam(int index)
public String getComment()
public MethodInfo setComment(String comment)
public Doc getDoc()
public MethodInfo setDoc(Doc doc)
public boolean isStaticMethod()
public MethodInfo setStaticMethod(boolean staticMethod)
public boolean isDefaultMethod()
public MethodInfo setDefaultMethod(boolean defaultMethod)
public boolean isDeprecated()
true
if the method has a @Deprecated
annotationpublic MethodInfo setDeprecated(boolean deprecated)
public boolean isUseFutures()
public boolean isMethodOverride()
public Text getDeprecatedDesc()
public MethodInfo setDeprecatedDesc(Text deprecatedDesc)
public List<TypeParamInfo.Method> getTypeParams()
public MethodInfo setTypeParams(List<TypeParamInfo.Method> typeParams)
public void mergeTypeParams(List<TypeParamInfo.Method> mergedTypeParams) throws IllegalArgumentException
IllegalArgumentException
public void collectImports(Collection<ClassTypeInfo> imports)
public MethodInfo copy()
public int compareTo(MethodInfo o)
compareTo
in interface Comparable<MethodInfo>
Copyright © 2023 Eclipse. All rights reserved.