Here you can find the source of genSignature(IProgramElement node)
public static String genSignature(IProgramElement node)
//package com.java2s; /* ******************************************************************* * Copyright (c) 2003 Contributors./*from ww w . j a va 2 s. c o m*/ * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Mik Kersten initial implementation * ******************************************************************/ import java.util.Iterator; import org.aspectj.asm.IProgramElement; public class Main { public static String genSignature(IProgramElement node) { StringBuffer sb = new StringBuffer(); String accessibility = node.getAccessibility().toString(); if (!accessibility.equals("package")) { sb.append(accessibility); sb.append(' '); } String modifiers = ""; for (Iterator modIt = node.getModifiers().iterator(); modIt.hasNext();) { modifiers += modIt.next() + " "; } if (node.getKind().equals(IProgramElement.Kind.METHOD) || node.getKind().equals(IProgramElement.Kind.FIELD)) { sb.append(node.getCorrespondingType()); sb.append(' '); } if (node.getKind().equals(IProgramElement.Kind.CLASS)) { sb.append("class "); } else if (node.getKind().equals(IProgramElement.Kind.INTERFACE)) { sb.append("interface "); } sb.append(node.getName()); if (node.getParameterTypes() != null) { sb.append('('); for (int i = 0; i < node.getParameterTypes().size(); i++) { sb.append(String.valueOf(node.getParameterTypes().get(i))); sb.append(' '); sb.append((String) node.getParameterNames().get(i)); if (i < node.getParameterTypes().size() - 1) { sb.append(", "); } } sb.append(')'); } return sb.toString(); } }