Package io.sundr.model
Class MethodFluent<A extends MethodFluent<A>>
- java.lang.Object
-
- io.sundr.builder.BaseFluent<A>
-
- io.sundr.model.AttributeSupportFluent<A>
-
- io.sundr.model.ModifierSupportFluent<A>
-
- io.sundr.model.MethodFluent<A>
-
- Direct Known Subclasses:
MethodBuilder,TypeDefFluent.ConstructorsNested,TypeDefFluent.MethodsNested
public class MethodFluent<A extends MethodFluent<A>> extends ModifierSupportFluent<A>
Generated
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMethodFluent.AnnotationsNested<N>classMethodFluent.ArgumentsNested<N>classMethodFluent.BlockNested<N>classMethodFluent.ClassRefReturnTypeNested<N>classMethodFluent.ExceptionsNested<N>classMethodFluent.ParametersNested<N>classMethodFluent.PrimitiveRefReturnTypeNested<N>classMethodFluent.TypeParamRefReturnTypeNested<N>classMethodFluent.VoidRefReturnTypeNested<N>classMethodFluent.WildcardRefReturnTypeNested<N>-
Nested classes/interfaces inherited from class io.sundr.model.ModifierSupportFluent
ModifierSupportFluent.ModifiersNested<N>
-
-
Constructor Summary
Constructors Constructor Description MethodFluent()MethodFluent(io.sundr.model.Method instance)
-
Method Summary
-
Methods inherited from class io.sundr.model.ModifierSupportFluent
buildModifiers, copyInstance, editModifiers, editOrNewModifiers, editOrNewModifiersLike, hasModifiers, withModifiers, withNewModifiers, withNewModifiersLike
-
Methods inherited from class io.sundr.model.AttributeSupportFluent
addToAttributes, addToAttributes, copyInstance, getAttributes, hasAttributes, removeFromAttributes, removeFromAttributes, withAttributes
-
-
-
-
Method Detail
-
copyInstance
protected void copyInstance(io.sundr.model.Method instance)
-
addAllToComments
public A addAllToComments(Collection<String> items)
-
removeAllFromComments
public A removeAllFromComments(Collection<String> items)
-
getComment
public String getComment(int index)
-
getFirstComment
public String getFirstComment()
-
getLastComment
public String getLastComment()
-
hasComments
public boolean hasComments()
-
addToAnnotations
public A addToAnnotations(int index, io.sundr.model.AnnotationRef item)
-
setToAnnotations
public A setToAnnotations(int index, io.sundr.model.AnnotationRef item)
-
addToAnnotations
public A addToAnnotations(io.sundr.model.AnnotationRef... items)
-
addAllToAnnotations
public A addAllToAnnotations(Collection<io.sundr.model.AnnotationRef> items)
-
removeFromAnnotations
public A removeFromAnnotations(io.sundr.model.AnnotationRef... items)
-
removeAllFromAnnotations
public A removeAllFromAnnotations(Collection<io.sundr.model.AnnotationRef> items)
-
removeMatchingFromAnnotations
public A removeMatchingFromAnnotations(Predicate<AnnotationRefBuilder> predicate)
-
buildAnnotations
public List<io.sundr.model.AnnotationRef> buildAnnotations()
-
buildAnnotation
public io.sundr.model.AnnotationRef buildAnnotation(int index)
-
buildFirstAnnotation
public io.sundr.model.AnnotationRef buildFirstAnnotation()
-
buildLastAnnotation
public io.sundr.model.AnnotationRef buildLastAnnotation()
-
buildMatchingAnnotation
public io.sundr.model.AnnotationRef buildMatchingAnnotation(Predicate<AnnotationRefBuilder> predicate)
-
hasMatchingAnnotation
public boolean hasMatchingAnnotation(Predicate<AnnotationRefBuilder> predicate)
-
withAnnotations
public A withAnnotations(io.sundr.model.AnnotationRef... annotations)
-
hasAnnotations
public boolean hasAnnotations()
-
addNewAnnotation
public MethodFluent.AnnotationsNested<A> addNewAnnotation()
-
addNewAnnotationLike
public MethodFluent.AnnotationsNested<A> addNewAnnotationLike(io.sundr.model.AnnotationRef item)
-
setNewAnnotationLike
public MethodFluent.AnnotationsNested<A> setNewAnnotationLike(int index, io.sundr.model.AnnotationRef item)
-
editAnnotation
public MethodFluent.AnnotationsNested<A> editAnnotation(int index)
-
editFirstAnnotation
public MethodFluent.AnnotationsNested<A> editFirstAnnotation()
-
editLastAnnotation
public MethodFluent.AnnotationsNested<A> editLastAnnotation()
-
editMatchingAnnotation
public MethodFluent.AnnotationsNested<A> editMatchingAnnotation(Predicate<AnnotationRefBuilder> predicate)
-
addToParameters
public A addToParameters(int index, io.sundr.model.TypeParamDef item)
-
setToParameters
public A setToParameters(int index, io.sundr.model.TypeParamDef item)
-
addToParameters
public A addToParameters(io.sundr.model.TypeParamDef... items)
-
addAllToParameters
public A addAllToParameters(Collection<io.sundr.model.TypeParamDef> items)
-
removeFromParameters
public A removeFromParameters(io.sundr.model.TypeParamDef... items)
-
removeAllFromParameters
public A removeAllFromParameters(Collection<io.sundr.model.TypeParamDef> items)
-
removeMatchingFromParameters
public A removeMatchingFromParameters(Predicate<TypeParamDefBuilder> predicate)
-
buildParameters
public List<io.sundr.model.TypeParamDef> buildParameters()
-
buildParameter
public io.sundr.model.TypeParamDef buildParameter(int index)
-
buildFirstParameter
public io.sundr.model.TypeParamDef buildFirstParameter()
-
buildLastParameter
public io.sundr.model.TypeParamDef buildLastParameter()
-
buildMatchingParameter
public io.sundr.model.TypeParamDef buildMatchingParameter(Predicate<TypeParamDefBuilder> predicate)
-
hasMatchingParameter
public boolean hasMatchingParameter(Predicate<TypeParamDefBuilder> predicate)
-
withParameters
public A withParameters(io.sundr.model.TypeParamDef... parameters)
-
hasParameters
public boolean hasParameters()
-
addNewParameter
public MethodFluent.ParametersNested<A> addNewParameter()
-
addNewParameterLike
public MethodFluent.ParametersNested<A> addNewParameterLike(io.sundr.model.TypeParamDef item)
-
setNewParameterLike
public MethodFluent.ParametersNested<A> setNewParameterLike(int index, io.sundr.model.TypeParamDef item)
-
editParameter
public MethodFluent.ParametersNested<A> editParameter(int index)
-
editFirstParameter
public MethodFluent.ParametersNested<A> editFirstParameter()
-
editLastParameter
public MethodFluent.ParametersNested<A> editLastParameter()
-
editMatchingParameter
public MethodFluent.ParametersNested<A> editMatchingParameter(Predicate<TypeParamDefBuilder> predicate)
-
getName
public String getName()
-
hasName
public boolean hasName()
-
buildReturnType
public io.sundr.model.TypeRef buildReturnType()
-
withReturnType
public A withReturnType(io.sundr.model.TypeRef returnType)
-
hasReturnType
public boolean hasReturnType()
-
withNewClassRefReturnType
public MethodFluent.ClassRefReturnTypeNested<A> withNewClassRefReturnType()
-
withNewClassRefReturnTypeLike
public MethodFluent.ClassRefReturnTypeNested<A> withNewClassRefReturnTypeLike(io.sundr.model.ClassRef item)
-
withNewPrimitiveRefReturnType
public MethodFluent.PrimitiveRefReturnTypeNested<A> withNewPrimitiveRefReturnType()
-
withNewPrimitiveRefReturnTypeLike
public MethodFluent.PrimitiveRefReturnTypeNested<A> withNewPrimitiveRefReturnTypeLike(io.sundr.model.PrimitiveRef item)
-
withNewVoidRefReturnType
public MethodFluent.VoidRefReturnTypeNested<A> withNewVoidRefReturnType()
-
withNewVoidRefReturnTypeLike
public MethodFluent.VoidRefReturnTypeNested<A> withNewVoidRefReturnTypeLike(io.sundr.model.VoidRef item)
-
withNewTypeParamRefReturnType
public MethodFluent.TypeParamRefReturnTypeNested<A> withNewTypeParamRefReturnType()
-
withNewTypeParamRefReturnTypeLike
public MethodFluent.TypeParamRefReturnTypeNested<A> withNewTypeParamRefReturnTypeLike(io.sundr.model.TypeParamRef item)
-
withNewWildcardRefReturnType
public MethodFluent.WildcardRefReturnTypeNested<A> withNewWildcardRefReturnType()
-
withNewWildcardRefReturnTypeLike
public MethodFluent.WildcardRefReturnTypeNested<A> withNewWildcardRefReturnTypeLike(io.sundr.model.WildcardRef item)
-
addToArguments
public A addToArguments(int index, io.sundr.model.Property item)
-
setToArguments
public A setToArguments(int index, io.sundr.model.Property item)
-
addToArguments
public A addToArguments(io.sundr.model.Property... items)
-
addAllToArguments
public A addAllToArguments(Collection<io.sundr.model.Property> items)
-
removeFromArguments
public A removeFromArguments(io.sundr.model.Property... items)
-
removeAllFromArguments
public A removeAllFromArguments(Collection<io.sundr.model.Property> items)
-
removeMatchingFromArguments
public A removeMatchingFromArguments(Predicate<PropertyBuilder> predicate)
-
buildArguments
public List<io.sundr.model.Property> buildArguments()
-
buildArgument
public io.sundr.model.Property buildArgument(int index)
-
buildFirstArgument
public io.sundr.model.Property buildFirstArgument()
-
buildLastArgument
public io.sundr.model.Property buildLastArgument()
-
buildMatchingArgument
public io.sundr.model.Property buildMatchingArgument(Predicate<PropertyBuilder> predicate)
-
hasMatchingArgument
public boolean hasMatchingArgument(Predicate<PropertyBuilder> predicate)
-
withArguments
public A withArguments(io.sundr.model.Property... arguments)
-
hasArguments
public boolean hasArguments()
-
addNewArgument
public MethodFluent.ArgumentsNested<A> addNewArgument()
-
addNewArgumentLike
public MethodFluent.ArgumentsNested<A> addNewArgumentLike(io.sundr.model.Property item)
-
setNewArgumentLike
public MethodFluent.ArgumentsNested<A> setNewArgumentLike(int index, io.sundr.model.Property item)
-
editArgument
public MethodFluent.ArgumentsNested<A> editArgument(int index)
-
editFirstArgument
public MethodFluent.ArgumentsNested<A> editFirstArgument()
-
editLastArgument
public MethodFluent.ArgumentsNested<A> editLastArgument()
-
editMatchingArgument
public MethodFluent.ArgumentsNested<A> editMatchingArgument(Predicate<PropertyBuilder> predicate)
-
isVarArgPreferred
public boolean isVarArgPreferred()
-
withVarArgPreferred
public A withVarArgPreferred(boolean varArgPreferred)
-
hasVarArgPreferred
public boolean hasVarArgPreferred()
-
addToExceptions
public A addToExceptions(int index, io.sundr.model.ClassRef item)
-
setToExceptions
public A setToExceptions(int index, io.sundr.model.ClassRef item)
-
addToExceptions
public A addToExceptions(io.sundr.model.ClassRef... items)
-
addAllToExceptions
public A addAllToExceptions(Collection<io.sundr.model.ClassRef> items)
-
removeFromExceptions
public A removeFromExceptions(io.sundr.model.ClassRef... items)
-
removeAllFromExceptions
public A removeAllFromExceptions(Collection<io.sundr.model.ClassRef> items)
-
removeMatchingFromExceptions
public A removeMatchingFromExceptions(Predicate<ClassRefBuilder> predicate)
-
buildExceptions
public List<io.sundr.model.ClassRef> buildExceptions()
-
buildException
public io.sundr.model.ClassRef buildException(int index)
-
buildFirstException
public io.sundr.model.ClassRef buildFirstException()
-
buildLastException
public io.sundr.model.ClassRef buildLastException()
-
buildMatchingException
public io.sundr.model.ClassRef buildMatchingException(Predicate<ClassRefBuilder> predicate)
-
hasMatchingException
public boolean hasMatchingException(Predicate<ClassRefBuilder> predicate)
-
withExceptions
public A withExceptions(io.sundr.model.ClassRef... exceptions)
-
hasExceptions
public boolean hasExceptions()
-
addNewException
public MethodFluent.ExceptionsNested<A> addNewException()
-
addNewExceptionLike
public MethodFluent.ExceptionsNested<A> addNewExceptionLike(io.sundr.model.ClassRef item)
-
setNewExceptionLike
public MethodFluent.ExceptionsNested<A> setNewExceptionLike(int index, io.sundr.model.ClassRef item)
-
editException
public MethodFluent.ExceptionsNested<A> editException(int index)
-
editFirstException
public MethodFluent.ExceptionsNested<A> editFirstException()
-
editLastException
public MethodFluent.ExceptionsNested<A> editLastException()
-
editMatchingException
public MethodFluent.ExceptionsNested<A> editMatchingException(Predicate<ClassRefBuilder> predicate)
-
isDefaultMethod
public boolean isDefaultMethod()
-
withDefaultMethod
public A withDefaultMethod(boolean defaultMethod)
-
hasDefaultMethod
public boolean hasDefaultMethod()
-
buildBlock
public io.sundr.model.Block buildBlock()
-
withBlock
public A withBlock(io.sundr.model.Block block)
-
hasBlock
public boolean hasBlock()
-
withNewBlock
public MethodFluent.BlockNested<A> withNewBlock()
-
withNewBlockLike
public MethodFluent.BlockNested<A> withNewBlockLike(io.sundr.model.Block item)
-
editBlock
public MethodFluent.BlockNested<A> editBlock()
-
editOrNewBlock
public MethodFluent.BlockNested<A> editOrNewBlock()
-
editOrNewBlockLike
public MethodFluent.BlockNested<A> editOrNewBlockLike(io.sundr.model.Block item)
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classModifierSupportFluent<A extends MethodFluent<A>>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classModifierSupportFluent<A extends MethodFluent<A>>
-
toString
public String toString()
- Overrides:
toStringin classModifierSupportFluent<A extends MethodFluent<A>>
-
builder
protected static <T> io.sundr.builder.VisitableBuilder<T,?> builder(Object item)
-
withVarArgPreferred
public A withVarArgPreferred()
-
withDefaultMethod
public A withDefaultMethod()
-
-