Esempio n. 1
0
 public static String getSignature(IFunctionDeclaration func) {
   StringBuffer sig = new StringBuffer(func.getElementName());
   sig.append(getParameterClause(func.getParameterTypes()));
   try {
     if (func.isConst()) sig.append(" const"); // $NON-NLS-1$
     if (func.isVolatile()) {
       sig.append(" volatile"); // $NON-NLS-1$
     }
   } catch (CModelException e) {
   }
   return sig.toString();
 }
 private void appendParameters(StringBuffer sb, IFunctionDeclaration fd) {
   String[] params = fd.getParameterTypes();
   sb.append('(');
   for (int i = 0; i < params.length; ++i) {
     sb.append(params[i]);
     if (i != params.length - 1) sb.append(',');
   }
   sb.append(')');
 }
Esempio n. 3
0
 public static boolean equals(IFunctionDeclaration lhs, IFunctionDeclaration rhs) {
   return CElement.equals(lhs, rhs)
       && Util.equalArraysOrNull(lhs.getParameterTypes(), rhs.getParameterTypes())
       && lhs.getReturnType().equals(rhs.getReturnType());
 }