本文整理匯總了Java中org.eclipse.jdt.core.IType.getMethods方法的典型用法代碼示例。如果您正苦於以下問題:Java IType.getMethods方法的具體用法?Java IType.getMethods怎麽用?Java IType.getMethods使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jdt.core.IType
的用法示例。
在下文中一共展示了IType.getMethods方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ClassDetails
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
public ClassDetails(IClassFile classFile, String jarFileName, String packageName, boolean isUserDefined) {
LOGGER.debug("Extracting methods from "+classFile.getElementName());
try {
this.javaDoc=getJavaDoc(classFile);
intialize(classFile,jarFileName,packageName, isUserDefined);
for (IJavaElement iJavaElement : classFile.getChildren()) {
if (iJavaElement instanceof IType) {
IType iType = (IType) iJavaElement;
for (IMethod iMethod : iType.getMethods()) {
addMethodsToClass(iMethod);
}
}
}
} catch (JavaModelException e) {
LOGGER.error("Error occurred while fetching methods from class"+cName);
}
}
示例2: handleType
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
private void handleType(IType type, IFile file, List<ServiceImplementation> serviceImplementations) throws JavaModelException {
/* Parcourt les méthodes. */
for (IMethod method : type.getMethods()) {
/* Filtre pour ne garder que les méthodes publiques d'instance */
if (method.isConstructor() || Flags.isStatic(method.getFlags()) || Flags.isPrivate(method.getFlags())) {
continue;
}
/* Créé le ServiceImplementation. */
String javaName = method.getElementName();
ISourceRange nameRange = method.getNameRange();
FileRegion fileRegion = new FileRegion(file, nameRange.getOffset(), nameRange.getLength());
ServiceImplementation serviceImplementation = new ServiceImplementation(fileRegion, javaName);
serviceImplementations.add(serviceImplementation);
}
}
示例3: handleType
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
private void handleType(IType type, IFile file, List<DaoImplementation> daoImplementations) throws JavaModelException {
/* Parcourt les méthodes. */
for (IMethod method : type.getMethods()) {
/* Filtre pour ne garder que les méthodes publiques d'instance */
if (method.isConstructor() || Flags.isStatic(method.getFlags()) || Flags.isPrivate(method.getFlags())) {
continue;
}
/* Créé le DaoImplementation. */
String javaName = method.getElementName();
ISourceRange nameRange = method.getNameRange();
FileRegion fileRegion = new FileRegion(file, nameRange.getOffset(), nameRange.getLength());
DaoImplementation daoImplementation = new DaoImplementation(fileRegion, javaName);
daoImplementations.add(daoImplementation);
}
}
示例4: handleType
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
private void handleType(IType type, IFile file, List<WsRoute> wsRoutes) {
try {
String pathPrefix = getPathPrefix(type);
/* Parcourt les méthodes du contrôleur de web services. */
for (IMethod method : type.getMethods()) {
handleMethod(method, pathPrefix, file, wsRoutes);
}
} catch (JavaModelException e) {
ErrorUtils.handle(e);
}
}
示例5: parseVertigoDtoFields
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
public static List<DtoField> parseVertigoDtoFields(IType type) {
List<DtoField> fields = new ArrayList<>();
try {
for (IMethod method : type.getMethods()) {
parseVertigoDtoField(method, fields);
}
} catch (JavaModelException e) {
ErrorUtils.handle(e);
}
return fields;
}
示例6: parseKasper5DtoFields
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
public static List<DtoField> parseKasper5DtoFields(IType type) {
List<DtoField> fields = new ArrayList<>();
try {
/* Extraire le type parent */
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
IType superclass = hierarchy.getSuperclass(type);
for (IMethod method : superclass.getMethods()) {
parseKasper5DtoField(method, fields);
}
} catch (JavaModelException e) {
ErrorUtils.handle(e);
}
return fields;
}
示例7: parseKasper3BeanFields
import org.eclipse.jdt.core.IType; //導入方法依賴的package包/類
private static void parseKasper3BeanFields(IType type, List<DtoField> fields) throws JavaModelException {
/* Extraire le type parent Abstract. */
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
IType superclass = hierarchy.getSuperclass(type);
for (IMethod method : superclass.getMethods()) {
DtoField field = parseKasper3BeanFieldGetter(method);
if (field != null) {
fields.add(field);
}
}
}