Java Code Examples for com.sun.javadoc.Doc#isIncluded()
The following examples show how to use
com.sun.javadoc.Doc#isIncluded() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RootDocProcessor.java From hadoop with Apache License 2.0 | 4 votes |
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); if (target instanceof Doc) { if (methodName.equals("isIncluded")) { Doc doc = (Doc) target; return !exclude(doc) && doc.isIncluded(); } if (target instanceof RootDoc) { if (methodName.equals("classes")) { return filter(((RootDoc) target).classes(), ClassDoc.class); } else if (methodName.equals("specifiedClasses")) { return filter(((RootDoc) target).specifiedClasses(), ClassDoc.class); } else if (methodName.equals("specifiedPackages")) { return filter(((RootDoc) target).specifiedPackages(), PackageDoc.class); } } else if (target instanceof ClassDoc) { if (isFiltered(args)) { if (methodName.equals("methods")) { return filter(((ClassDoc) target).methods(true), MethodDoc.class); } else if (methodName.equals("fields")) { return filter(((ClassDoc) target).fields(true), FieldDoc.class); } else if (methodName.equals("innerClasses")) { return filter(((ClassDoc) target).innerClasses(true), ClassDoc.class); } else if (methodName.equals("constructors")) { return filter(((ClassDoc) target).constructors(true), ConstructorDoc.class); } } } else if (target instanceof PackageDoc) { if (methodName.equals("allClasses")) { if (isFiltered(args)) { return filter(((PackageDoc) target).allClasses(true), ClassDoc.class); } else { return filter(((PackageDoc) target).allClasses(), ClassDoc.class); } } else if (methodName.equals("annotationTypes")) { return filter(((PackageDoc) target).annotationTypes(), AnnotationTypeDoc.class); } else if (methodName.equals("enums")) { return filter(((PackageDoc) target).enums(), ClassDoc.class); } else if (methodName.equals("errors")) { return filter(((PackageDoc) target).errors(), ClassDoc.class); } else if (methodName.equals("exceptions")) { return filter(((PackageDoc) target).exceptions(), ClassDoc.class); } else if (methodName.equals("interfaces")) { return filter(((PackageDoc) target).interfaces(), ClassDoc.class); } else if (methodName.equals("ordinaryClasses")) { return filter(((PackageDoc) target).ordinaryClasses(), ClassDoc.class); } } } if (args != null) { if (methodName.equals("compareTo") || methodName.equals("equals") || methodName.equals("overrides") || methodName.equals("subclassOf")) { args[0] = unwrap(args[0]); } } try { return process(method.invoke(target, args), method.getReturnType()); } catch (InvocationTargetException e) { throw e.getTargetException(); } }
Example 2
Source File: RootDocProcessor.java From big-c with Apache License 2.0 | 4 votes |
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); if (target instanceof Doc) { if (methodName.equals("isIncluded")) { Doc doc = (Doc) target; return !exclude(doc) && doc.isIncluded(); } if (target instanceof RootDoc) { if (methodName.equals("classes")) { return filter(((RootDoc) target).classes(), ClassDoc.class); } else if (methodName.equals("specifiedClasses")) { return filter(((RootDoc) target).specifiedClasses(), ClassDoc.class); } else if (methodName.equals("specifiedPackages")) { return filter(((RootDoc) target).specifiedPackages(), PackageDoc.class); } } else if (target instanceof ClassDoc) { if (isFiltered(args)) { if (methodName.equals("methods")) { return filter(((ClassDoc) target).methods(true), MethodDoc.class); } else if (methodName.equals("fields")) { return filter(((ClassDoc) target).fields(true), FieldDoc.class); } else if (methodName.equals("innerClasses")) { return filter(((ClassDoc) target).innerClasses(true), ClassDoc.class); } else if (methodName.equals("constructors")) { return filter(((ClassDoc) target).constructors(true), ConstructorDoc.class); } } } else if (target instanceof PackageDoc) { if (methodName.equals("allClasses")) { if (isFiltered(args)) { return filter(((PackageDoc) target).allClasses(true), ClassDoc.class); } else { return filter(((PackageDoc) target).allClasses(), ClassDoc.class); } } else if (methodName.equals("annotationTypes")) { return filter(((PackageDoc) target).annotationTypes(), AnnotationTypeDoc.class); } else if (methodName.equals("enums")) { return filter(((PackageDoc) target).enums(), ClassDoc.class); } else if (methodName.equals("errors")) { return filter(((PackageDoc) target).errors(), ClassDoc.class); } else if (methodName.equals("exceptions")) { return filter(((PackageDoc) target).exceptions(), ClassDoc.class); } else if (methodName.equals("interfaces")) { return filter(((PackageDoc) target).interfaces(), ClassDoc.class); } else if (methodName.equals("ordinaryClasses")) { return filter(((PackageDoc) target).ordinaryClasses(), ClassDoc.class); } } } if (args != null) { if (methodName.equals("compareTo") || methodName.equals("equals") || methodName.equals("overrides") || methodName.equals("subclassOf")) { args[0] = unwrap(args[0]); } } try { return process(method.invoke(target, args), method.getReturnType()); } catch (InvocationTargetException e) { throw e.getTargetException(); } }