FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> { @Override public Object clone() throws CloneNotSupportedException{ FunctionDesc desc = (FunctionDesc)super.clone(); desc.signature = signature.clone(); desc.supplement = supplement.clone(); desc.invocation = this.invocation; return desc; } FunctionDesc();  FunctionDesc(String signature, Class<? extends Function> clazz,
      FunctionType funcType, DataType retType, @NotNull DataType [] params);  FunctionDesc(FunctionDescProto proto);  FunctionDesc(String signature, String className, FunctionType type,
                      DataType retType,
                      @NotNull DataType... argTypes);  FunctionDesc(FunctionSignature signature, FunctionInvocation invocation, FunctionSupplement supplement); FunctionSignature getSignature(); FunctionInvocation getInvocation(); FunctionSupplement getSupplement(); Function newInstance(); FunctionType getFuncType(); String getFunctionName(); DataType [] getParamTypes(); DataType getReturnType(); @SuppressWarnings("unchecked") Class<? extends Function> getLegacyFuncClass(); String getDescription(); String getDetail(); String getExample(); void setDescription(String description); void setDetail(String detail); void setExample(String example); @Override int hashCode(); @Override boolean equals(Object obj); @Override Object clone(); @Override FunctionDescProto getProto(); @Override String toString(); String toJson(); String getHelpSignature(); @Override int compareTo(FunctionDesc o);  }
@Test public void testClone() throws CloneNotSupportedException { FunctionDesc desc = new FunctionDesc("sum", TestSum.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.INT4), CatalogUtil.newSimpleDataTypeArray(Type.INT4, Type.INT8)); FunctionDesc cloned = (FunctionDesc)desc.clone(); assertTrue("reference chk" , !(desc == cloned)); assertTrue("getClass() chk", desc.getClass() == cloned.getClass()); assertTrue("equals() chk", desc.equals(cloned)); }