/** * Return all tags in this comment. */ Tag[] tags() { return tagList.toArray(new Tag[tagList.length()]); }
/** * Return serialization methods in class. * * @return an array of MethodDocImpl for serialization methods in this class. */ MethodDoc[] methods() { return methods.toArray(new MethodDoc[methods.length()]); }
/** * Return serializable fields in class. <p> * * Returns either a list of default fields documented by serial tag comment or * javadoc comment<p> * Or Returns a single FieldDocImpl for serialPersistentField. There is a * serialField tag for each serializable field.<p> * * @return an array of FieldDocImpl for representing the visible * fields in this class. */ FieldDoc[] fields() { return (FieldDoc[])fields.toArray(new FieldDocImpl[fields.length()]); }
public Object[] toArray() { return toArray(new Object[size()]); }
public Object[] toArray() { return toArray(new Object[size()]); }
static private String[] toArray(Iterable<String> iter) { ListBuffer<String> result = new ListBuffer<String>(); if (iter != null) for (String s : iter) result.append(s); return result.toArray(new String[result.length()]); }
static private String[] toArray(Iterable<String> iter) { ListBuffer<String> result = new ListBuffer<String>(); if (iter != null) for (String s : iter) result.append(s); return result.toArray(new String[result.length()]); }
/** * Return throws tags in this comment. */ ThrowsTag[] throwsTags() { ListBuffer<ThrowsTag> found = new ListBuffer<ThrowsTag>(); for (Tag next : tagList) { if (next instanceof ThrowsTag) { found.append((ThrowsTag)next); } } return found.toArray(new ThrowsTag[found.length()]); }
/** * Return see also tags in this comment. */ SeeTag[] seeTags() { ListBuffer<SeeTag> found = new ListBuffer<SeeTag>(); for (Tag next : tagList) { if (next instanceof SeeTag) { found.append((SeeTag)next); } } return found.toArray(new SeeTag[found.length()]); }
/** * Return serialField tags in this comment. */ SerialFieldTag[] serialFieldTags() { ListBuffer<SerialFieldTag> found = new ListBuffer<SerialFieldTag>(); for (Tag next : tagList) { if (next instanceof SerialFieldTag) { found.append((SerialFieldTag)next); } } return found.toArray(new SerialFieldTag[found.length()]); }
/** * Classes and interfaces specified on the command line. */ public ClassDoc[] specifiedClasses() { ListBuffer<ClassDocImpl> classesToDocument = new ListBuffer<ClassDocImpl>(); for (ClassDocImpl cd : cmdLineClasses) { cd.addAllClasses(classesToDocument, true); } return (ClassDoc[])classesToDocument.toArray(new ClassDocImpl[classesToDocument.length()]); }
public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends File> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (File f: path) { try { lb.append(f.toURI().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return getClassLoader(lb.toArray(new URL[lb.size()])); }
static Option[] getOptions(OptionHelper helper, Set<OptionName> desired) { ListBuffer<Option> options = new ListBuffer<Option>(); for (Option option : getAll(helper)) if (desired.contains(option.getName())) options.append(option); return options.toArray(new Option[options.length()]); }
static Option[] getOptions(OptionHelper helper, Set<OptionName> desired) { ListBuffer<Option> options = new ListBuffer<Option>(); for (Option option : getAll(helper)) if (desired.contains(option.getName())) options.append(option); return options.toArray(new Option[options.length()]); }
static private String[] toArray(Iterable<String> flags, Iterable<String> classes) { ListBuffer<String> result = new ListBuffer<String>(); if (flags != null) for (String flag : flags) result.append(flag); if (classes != null) for (String cls : classes) result.append(cls); return result.toArray(new String[result.length()]); }
static private String[] toArray(Iterable<String> flags, Iterable<String> classes) { ListBuffer<String> result = new ListBuffer<String>(); if (flags != null) for (String flag : flags) result.append(flag); if (classes != null) for (String cls : classes) result.append(cls); return result.toArray(new String[result.length()]); }
private Attribute.Compound[] unpackContained(Attribute.Compound container) { // Pack them in an array Attribute[] contained0 = null; if (container != null) contained0 = unpackAttributes(container); ListBuffer<Attribute.Compound> compounds = new ListBuffer<>(); if (contained0 != null) { for (Attribute a : contained0) if (a instanceof Attribute.Compound) compounds = compounds.append((Attribute.Compound)a); } return compounds.toArray(new Attribute.Compound[compounds.size()]); }
private Attribute.Compound[] unpackContained(Attribute.Compound container) { // Pack them in an array Attribute[] contained0 = null; if (container != null) contained0 = unpackAttributes(container); ListBuffer<Attribute.Compound> compounds = new ListBuffer<>(); if (contained0 != null) { for (Attribute a : contained0) if (a instanceof Attribute.Compound) compounds = compounds.append((Attribute.Compound)a); } return compounds.toArray(new Attribute.Compound[compounds.size()]); }
/** * Return all classes and interfaces (including those inside * packages) to be documented. */ public ClassDoc[] classes() { ListBuffer<ClassDocImpl> classesToDocument = new ListBuffer<ClassDocImpl>(); for (ClassDocImpl cd : cmdLineClasses) { cd.addAllClasses(classesToDocument, true); } for (PackageDocImpl pd : cmdLinePackages) { pd.addAllClassesTo(classesToDocument); } return classesToDocument.toArray(new ClassDocImpl[classesToDocument.length()]); }
/** * Get included enum types in this package. * * @return included enum types in this package. */ public ClassDoc[] enums() { ListBuffer<ClassDocImpl> ret = new ListBuffer<ClassDocImpl>(); for (ClassDocImpl c : getClasses(true)) { if (c.isEnum()) { ret.append(c); } } return ret.toArray(new ClassDocImpl[ret.length()]); }