Package org.mule.metadata.api.model.impl
Class DefaultFunctionType
- java.lang.Object
-
- org.mule.metadata.api.model.impl.BaseMetadataType
-
- org.mule.metadata.api.model.impl.DefaultFunctionType
-
- All Implemented Interfaces:
FieldsComparable,FunctionType,MetadataType
public class DefaultFunctionType extends BaseMetadataType implements FunctionType
-
-
Field Summary
-
Fields inherited from class org.mule.metadata.api.model.impl.BaseMetadataType
annotations
-
-
Constructor Summary
Constructors Constructor Description DefaultFunctionType(MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations, Optional<MetadataType> returnType, List<FunctionParameter> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(MetadataTypeVisitor visitor)Dispatches in a reflective way to the method with prefix "visit" with the specific type as argument.Object[]getFieldValues()A list of the fields that define the identity of this class.List<FunctionParameter>getParameters()Returns the list of parameters expected by this functionOptional<MetadataType>getReturnType()The return type of the function.-
Methods inherited from class org.mule.metadata.api.model.impl.BaseMetadataType
equals, getAnnotation, getAnnotations, getDescription, getMetadataFormat, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mule.metadata.api.model.MetadataType
getAnnotation, getAnnotations, getDescription, getMetadataFormat
-
-
-
-
Constructor Detail
-
DefaultFunctionType
public DefaultFunctionType(MetadataFormat metadataFormat, Map<Class<? extends TypeAnnotation>,TypeAnnotation> annotations, Optional<MetadataType> returnType, List<FunctionParameter> parameters)
-
-
Method Detail
-
getFieldValues
public Object[] getFieldValues()
Description copied from interface:FieldsComparableA list of the fields that define the identity of this class. These fields can be used to compare if instances of a class are equal, or to generate a hash code for it.Have in mind not exposing fields of class
Pattern, for example, that only check for reference equality (If that is not the desired behaviour).- Specified by:
getFieldValuesin interfaceFieldsComparable- Overrides:
getFieldValuesin classBaseMetadataType
-
getParameters
public List<FunctionParameter> getParameters()
Description copied from interface:FunctionTypeReturns the list of parameters expected by this function- Specified by:
getParametersin interfaceFunctionType- Returns:
- The parameters
-
getReturnType
public Optional<MetadataType> getReturnType()
Description copied from interface:FunctionTypeThe return type of the function. If the function does not return a value it returns empty.- Specified by:
getReturnTypein interfaceFunctionType- Returns:
- The return type of the function.
-
accept
public void accept(MetadataTypeVisitor visitor)
Description copied from interface:MetadataTypeDispatches in a reflective way to the method with prefix "visit" with the specific type as argument. ExamplevisitObject(ObjectType objectType)will be called when this type is an ObjectType.- Specified by:
acceptin interfaceMetadataType- Parameters:
visitor- The visitor
-
-