Logo Search packages:      
Sourcecode: japitools version File versions  Download package

static boolean net::wuffies::japi::Japize::checkIncluded ( String  cname  )  [inline, static]

Check a class name against the global 'roots' and 'exclusions' sets to see if it should be included. A class should be included if it is inside a package that has a roots entry, and not inside a deeper package that has an exclusions entry.

Parameters:
cname the name of the class to check.
Returns:
true if the class should be included, false if not.

Definition at line 1253 of file Japize.java.

References exclusions, and roots.

                                                    {

    if (roots.contains(cname)) return true;
    if (exclusions.contains(cname)) return false;
    
    // Loop backwards over the "."s in the class's name.
    int i = cname.indexOf(',');
    while (i >= 0) {
      cname = cname.substring(0, i);
      String mangled = cname + ',';

      // Check whether there is an entry for the package name up to the ".".
      // If so we know what to do so we return the result; otherwise we
      // continue at the next ".".
      if (roots.contains(mangled)) return true;
      if (exclusions.contains(mangled)) return false;
      i = cname.lastIndexOf('.');
    }

    // If we ran out of dots before finding a match, we need to check the root
    // package.
    return roots.contains(",");
  }


Generated by  Doxygen 1.6.0   Back to index