Gets the HTML file with the same name as the provided Class.
350620
public static InputStream getHTMLInputStream(Class<?> clazz) throws IOException {
		return HTMLInputStreamPage.class.getResourceAsStream('/'+clazz.getName().replace('.', '/')+".html");
	}
1300008
public static File getFile(NodeList fileNodes) {
    File file = null;
    for (int i = 0; i < fileNodes.getLength(); i++) {
      Element e = (Element) fileNodes.item(i);
      String type = e.getAttribute("type");

      try {
        // URL, File, or Resource
        if (type.equals("url")) {
          URL url = new URL(e.getTextContent());
          file = new File(url.toURI());
        } else if (type.equals("file")) {
          file = new File(e.getTextContent());
        } else if (type.equals("resource")) {
          ClassLoader cl = Thread.currentThread()
                  .getContextClassLoader();
          file = new File(cl.getResource(e.getTextContent())
                  .getFile());
        } else {
          System.out
                  .println("Incorrect file reference:  Unknown type!");
        }
      } catch (Exception exception) {
        System.err.println("Error getting file. "
                + exception.getMessage());
        jlogger.log( SEVERE,
                "Error getting file. " + exception.getMessage(), e);

        return null;
      }
    }
    return file;
  }
470844
protected Content getNavLinkClassUse() {
        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel);
        return li;
    }
524239
function htmlRenamer () {
  return (file) => {
    if (path.extname(file.info.dest) === '.html') {
      const filenameWithoutExtension = path.basename(file.info.dest).replace('.html', '')
      const rootPath = path.dirname(file.info.dest)
      return file.clone({
        info: file.info.clone({
          dest: filenameWithoutExtension === 'index' ? file.info.dest : path.join(rootPath, filenameWithoutExtension, 'index.html')
        })
      })
    } else {
      return file
    }
  }
}
182491
public static File jarFile(Class<?> clazz) throws IOException {
        return jarFile(classFileUrl(clazz), clazz.getName().replace('.', '/') + ".class");
    }
11952
protected Content getClassName(Content classStr) {
        Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
                getTableCaption(classStr));
        table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
        return table;
    }
1370837
private function html()
    {
        $filename = $this->getFilename($this->key);
        if (!$filename) return false;
        return @file_put_contents($filename, ob_get_contents(), LOCK_EX);
    }
1157706
String getJsFilename(String classname, String fwk) {
		String path = classname.replaceAll("\\.", File.separator);
		if (null != fwk) {
			return File.separator + path + "." + fwk + Constants.JS;
		}
		return File.separator + path + Constants.JS;
	}
1173596
def get_html(self):
        """"""
        if self.__htmltree is not None:
            return self.__htmltree
        else:
            self.__make_tree()
            return self.__htmltree
91250
protected InputStream getClassInputStream(String classInternalName) {
        if (classInternalName == null || "".equals(classInternalName)) {
            return null;
        }

        InputStream inputStream = null;
        try {
            for (File jarFile : jarFiles) {
                ZipFile zipFile = new ZipFile(jarFile);
                ZipEntry zipEntry = zipFile.getEntry(classInternalName + ".class");
                if (zipEntry != null) {
                    InputStream zis = zipFile.getInputStream(zipEntry);
                    byte[] bytecode = toByteArray(zis);
                    if (isStreamForClass(new ByteArrayInputStream(bytecode), classInternalName)) {
                        inputStream = new ByteArrayInputStream(bytecode);
                    }
                    zis.close();
                }
                zipFile.close();

                if (inputStream != null) {
                    return inputStream;
                }
            }

            String fileName = classInternalName + ".class";
            fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
            for (File classFile : classFiles) {
                if (classFile.getName().equals(fileName)) {
                    FileInputStream fis = new FileInputStream(classFile);
                    byte[] bytecode = toByteArray(fis);
                    if (isStreamForClass(new ByteArrayInputStream(bytecode), classInternalName)) {
                        inputStream = new ByteArrayInputStream(bytecode);
                    }
                    fis.close();
                }
                if (inputStream != null) {
                    return inputStream;
                }
            }
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
        return null;
    }
754000
private static InputStream getStreamFromClasspath(String fileName)
    {
        String path = fileName;
        InputStream dtdStream = PersistenceXMLLoader.class.getClassLoader().getResourceAsStream(path);
        return dtdStream;
    }
1316514
public static Object getAttribute(String name)
  {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();

    return getAttribute(name, loader);
  }
561070
def to_html(self):
        """"""
        id, classes, kvs = self.id, self.classes, self.kvs
        id_str = 'id="{}"'.format(id) if id else ''
        class_str = 'class="{}"'.format(' '.join(classes)) if classes else ''
        key_str = ' '.join('{}={}'.format(k, v) for k, v in kvs.items())
        return ' '.join((id_str, class_str, key_str)).strip()
1122047
def get_file_view_cls(self, filename):
        
        if filename is None:
            return self.default_view_class
        for pattern, cls in self.view_class_files_map:
            if pattern.match(filename):
                return cls
        return self.default_view_class
46634
public static File getWebRoot() {
		final String classPath = ClassUtil.getClassPath();
		if (StrUtil.isNotBlank(classPath)) {
			return getParent(file(classPath), 2);
		}
		return null;
	}
476675
public String buildSelectCopyFileMode(String htmlAttributes) {

        List<String> options = new ArrayList<String>(2);
        options.add(key(Messages.GUI_PREF_COPY_AS_SIBLING_0));
        options.add(key(Messages.GUI_COPY_AS_NEW_0));
        List<String> values = new ArrayList<String>(2);
        values.add(CmsResource.COPY_AS_SIBLING.toString());
        values.add(CmsResource.COPY_AS_NEW.toString());
        int selectedIndex = values.indexOf(getParamTabDiCopyFileMode());
        return buildSelect(htmlAttributes, options, values, selectedIndex);
    }
1176032
private static String getSource(final String className) {
		String sourceName = '/' + className.replace('.', '/') + ".java";

		InputStream stream = null;

		try {
			stream = ExampleSection.class.getResourceAsStream(sourceName);

			if (stream != null) {
				byte[] sourceBytes = StreamUtil.getBytes(stream);

				// we need to do some basic formatting of the source now.
				return new String(sourceBytes, "UTF-8");
			}
		} catch (IOException e) {
			LOG.warn("Unable to read source code for class " + className, e);
		} finally {
			if (stream != null) {
				try {
					stream.close();
				} catch (IOException e) {
					LOG.error("Error closing stream", e);
				}
			}
		}

		return null;
	}