Class MethodInterfaceDescription
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.component.information.method.MethodInterfaceDescription
-
@Entity public class MethodInterfaceDescription extends MyDataEntity
Describes an interface of a method. Contains of a name, a list of parameters and a return type.- Author:
- Fraunhofer IESE
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdescriptionA description of the method.protected LongidThe component_id.protected @NotBlank StringmethodNameThe name of the method.protected PepComponentInformationpepComponentInformationprotected PipComponentInformationpipComponentInformationprotected PxpComponentInformationpxpComponentInformationprotected @NotBlank StringreturnTypeThe return type of the method.
-
Constructor Summary
Constructors Constructor Description MethodInterfaceDescription(String methodName, Class<?> returnType, String description)Instantiates a new interface description.MethodInterfaceDescription(String methodName, Class<?> returnType, String description, InputParameterDescription... parameters)Instantiates a new interface description.MethodInterfaceDescription(String methodName, Class<?> returnType, String description, List<InputParameterDescription> parameters)Instantiates a new interface description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(InputParameterDescription param)Adds the parameter.booleanequals(Object obj)List<InputParameterDescription>getParameters()Class<?>getReturnTypeClass()Gets the return type of the method.inthashCode()voidsetParameters(List<InputParameterDescription> parameters)voidsetReturnType(Class<?> clazz)-
Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
-
-
-
-
Field Detail
-
id
protected Long id
The component_id.
-
methodName
@NotBlank protected @NotBlank String methodName
The name of the method.
-
description
protected String description
A description of the method.
-
returnType
@NotBlank protected @NotBlank String returnType
The return type of the method.
-
pipComponentInformation
protected PipComponentInformation pipComponentInformation
-
pepComponentInformation
protected PepComponentInformation pepComponentInformation
-
pxpComponentInformation
protected PxpComponentInformation pxpComponentInformation
-
-
Constructor Detail
-
MethodInterfaceDescription
public MethodInterfaceDescription(String methodName, Class<?> returnType, String description)
Instantiates a new interface description.- Parameters:
methodName- name of the methodreturnType- return type of the methoddescription- description of the method
-
MethodInterfaceDescription
public MethodInterfaceDescription(String methodName, Class<?> returnType, String description, InputParameterDescription... parameters)
Instantiates a new interface description.- Parameters:
methodName- name of the methodreturnType- return type of the methoddescription- description of the methodparameters- a list of parameters for the method
-
MethodInterfaceDescription
public MethodInterfaceDescription(String methodName, Class<?> returnType, String description, @Nonnull List<InputParameterDescription> parameters)
Instantiates a new interface description.- Parameters:
methodName- name of the methodreturnType- return type of the methoddescription- description of the methodparameters- a list of parameters for the method
-
-
Method Detail
-
addParameter
public void addParameter(@Nonnull InputParameterDescription param)Adds the parameter.- Parameters:
param- the param
-
getReturnTypeClass
public Class<?> getReturnTypeClass() throws ClassNotFoundException
Gets the return type of the method.- Returns:
- the return type of the method
- Throws:
ClassNotFoundException
-
setReturnType
public void setReturnType(Class<?> clazz)
- Parameters:
clazz-
-
getParameters
public List<InputParameterDescription> getParameters()
- Returns:
- the list of inputparametersdescription elements
-
setParameters
public void setParameters(@Nonnull List<InputParameterDescription> parameters)- Parameters:
parameters-
-
-