Java 类org.eclipse.jdt.core.util.IMethodInfo 实例源码

项目:eclipse.jdt.ls    文件:SerialVersionHashOperation.java   
private static IMethodInfo[] getSortedMethods(IClassFileReader cfReader) {
    IMethodInfo[] allMethods = cfReader.getMethodInfos();
    Arrays.sort(allMethods, new Comparator<IMethodInfo>() {
        @Override
        public int compare(IMethodInfo mi1, IMethodInfo mi2) {
            if (mi1.isConstructor() != mi2.isConstructor()) {
                return mi1.isConstructor() ? -1 : 1;
            } else if (mi1.isConstructor()) {
                return 0;
            }
            int res = CharOperation.compareTo(mi1.getName(), mi2.getName());
            if (res != 0) {
                return res;
            }
            return CharOperation.compareTo(mi1.getDescriptor(), mi2.getDescriptor());
        }
    });
    return allMethods;
}
项目:Eclipse-Postfix-Code-Completion    文件:SerialVersionHashOperation.java   
private static IMethodInfo[] getSortedMethods(IClassFileReader cfReader) {
    IMethodInfo[] allMethods= cfReader.getMethodInfos();
    Arrays.sort(allMethods, new Comparator<IMethodInfo>() {
        public int compare(IMethodInfo mi1, IMethodInfo mi2) {
            if (mi1.isConstructor() != mi2.isConstructor()) {
                return mi1.isConstructor() ? -1 : 1;
            } else if (mi1.isConstructor()) {
                return 0;
            }
            int res= CharOperation.compareTo(mi1.getName(), mi2.getName());
            if (res != 0) {
                return res;
            }
            return CharOperation.compareTo(mi1.getDescriptor(), mi2.getDescriptor());
        }
    });
    return allMethods;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SerialVersionHashOperation.java   
private static IMethodInfo[] getSortedMethods(IClassFileReader cfReader) {
    IMethodInfo[] allMethods= cfReader.getMethodInfos();
    Arrays.sort(allMethods, new Comparator<IMethodInfo>() {
        public int compare(IMethodInfo mi1, IMethodInfo mi2) {
            if (mi1.isConstructor() != mi2.isConstructor()) {
                return mi1.isConstructor() ? -1 : 1;
            } else if (mi1.isConstructor()) {
                return 0;
            }
            int res= CharOperation.compareTo(mi1.getName(), mi2.getName());
            if (res != 0) {
                return res;
            }
            return CharOperation.compareTo(mi1.getDescriptor(), mi2.getDescriptor());
        }
    });
    return allMethods;
}
项目:eclipse.jdt.ls    文件:SerialVersionHashOperation.java   
private static boolean hasStaticClassInitializer(IClassFileReader cfReader) {
    IMethodInfo[] methodInfos = cfReader.getMethodInfos();
    for (int i = 0; i < methodInfos.length; i++) {
        if (methodInfos[i].isClinit()) {
            return true;
        }
    }
    return false;
}
项目:che    文件:Util.java   
public static IClassFileAttribute getAttribute(IMethodInfo methodInfo, char[] attributeName) {
  IClassFileAttribute[] attributes = methodInfo.getAttributes();
  for (int i = 0, max = attributes.length; i < max; i++) {
    if (CharOperation.equals(attributes[i].getAttributeName(), attributeName)) {
      return attributes[i];
    }
  }
  return null;
}
项目:Eclipse-Postfix-Code-Completion    文件:SerialVersionHashOperation.java   
private static boolean hasStaticClassInitializer(IClassFileReader cfReader) {
    IMethodInfo[] methodInfos= cfReader.getMethodInfos();
    for (int i= 0; i < methodInfos.length; i++) {
        if (methodInfos[i].isClinit()) {
            return true;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:CheckDebugAttributes.java   
private boolean checkClassFile(IClassFileReader classFileReader) {
    IMethodInfo[] methodInfos = classFileReader.getMethodInfos();
    for (int i = 0, max = methodInfos.length; i < max; i++) {
        ICodeAttribute codeAttribute = methodInfos[i].getCodeAttribute();
        if (codeAttribute != null && codeAttribute.getLineNumberAttribute() != null) {
            return true;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:Util.java   
public static IClassFileAttribute getAttribute(IMethodInfo methodInfo, char[] attributeName) {
    IClassFileAttribute[] attributes = methodInfo.getAttributes();
    for (int i = 0, max = attributes.length; i < max; i++) {
        if (CharOperation.equals(attributes[i].getAttributeName(), attributeName)) {
            return attributes[i];
        }
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SerialVersionHashOperation.java   
private static boolean hasStaticClassInitializer(IClassFileReader cfReader) {
    IMethodInfo[] methodInfos= cfReader.getMethodInfos();
    for (int i= 0; i < methodInfos.length; i++) {
        if (methodInfos[i].isClinit()) {
            return true;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CheckDebugAttributes.java   
private boolean checkClassFile(IClassFileReader classFileReader) {
    IMethodInfo[] methodInfos = classFileReader.getMethodInfos();
    for (int i = 0, max = methodInfos.length; i < max; i++) {
        ICodeAttribute codeAttribute = methodInfos[i].getCodeAttribute();
        if (codeAttribute != null && codeAttribute.getLineNumberAttribute() != null) {
            return true;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:Util.java   
public static IClassFileAttribute getAttribute(IMethodInfo methodInfo, char[] attributeName) {
    IClassFileAttribute[] attributes = methodInfo.getAttributes();
    for (int i = 0, max = attributes.length; i < max; i++) {
        if (CharOperation.equals(attributes[i].getAttributeName(), attributeName)) {
            return attributes[i];
        }
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion    文件:ClassFileReader.java   
/**
 * @see IClassFileReader#getMethodInfos()
 */
public IMethodInfo[] getMethodInfos() {
    return this.methods;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ClassFileReader.java   
/**
 * @see IClassFileReader#getMethodInfos()
 */
public IMethodInfo[] getMethodInfos() {
    return this.methods;
}