org.apache.felix.utils.properties.Properties.getHeader()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.apache.felix.utils.properties.Properties.getHeader()方法的一些代码示例,展示了Properties.getHeader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Properties.getHeader()方法的具体详情如下:
包路径:org.apache.felix.utils.properties.Properties
类名称:Properties
方法名:getHeader

Properties.getHeader介绍

[英]Return the comment header.
[中]返回注释标题。

代码示例

代码示例来源:origin: org.apache.felix/org.apache.felix.fileinstall

/**
 * Return the comment header.
 *
 * @return the comment header
 */
public List<String> getHeader()
{
  return storage.getHeader();
}

代码示例来源:origin: org.apache.felix/org.apache.felix.utils

/**
 * Return the comment header.
 *
 * @return the comment header
 */
public List<String> getHeader()
{
  return storage.getHeader();
}

代码示例来源:origin: apache/felix

/**
 * Return the comment header.
 *
 * @return the comment header
 */
public List<String> getHeader()
{
  return storage.getHeader();
}

代码示例来源:origin: apache/felix

/**
 * Checks if parts of the passed in comment can be used as header comment.
 * This method checks whether a header comment can be defined (i.e. whether
 * this is the first comment in the loaded file). If this is the case, it is
 * searched for the lates blank line. This line will mark the end of the
 * header comment. The return value is the index of the first line in the
 * passed in list, which does not belong to the header comment.
 *
 * @param commentLines the comment lines
 * @return the index of the next line after the header comment
 */
private int checkHeaderComment(List<String> commentLines)
{
  if (getHeader() == null && layout.isEmpty())
  {
    // This is the first comment. Search for blank lines.
    int index = commentLines.size() - 1;
    while (index >= 0 && commentLines.get(index).length() > 0)
    {
      index--;
    }
    setHeader(new ArrayList<String>(commentLines.subList(0, index + 1)));
    return index + 1;
  }
  else
  {
    return 0;
  }
}

代码示例来源:origin: org.apache.felix/org.apache.felix.utils

/**
 * Checks if parts of the passed in comment can be used as header comment.
 * This method checks whether a header comment can be defined (i.e. whether
 * this is the first comment in the loaded file). If this is the case, it is
 * searched for the lates blank line. This line will mark the end of the
 * header comment. The return value is the index of the first line in the
 * passed in list, which does not belong to the header comment.
 *
 * @param commentLines the comment lines
 * @return the index of the next line after the header comment
 */
private int checkHeaderComment(List<String> commentLines)
{
  if (getHeader() == null && layout.isEmpty())
  {
    // This is the first comment. Search for blank lines.
    int index = commentLines.size() - 1;
    while (index >= 0 && commentLines.get(index).length() > 0)
    {
      index--;
    }
    setHeader(new ArrayList<String>(commentLines.subList(0, index + 1)));
    return index + 1;
  }
  else
  {
    return 0;
  }
}

代码示例来源:origin: org.apache.felix/org.apache.felix.fileinstall

/**
 * Checks if parts of the passed in comment can be used as header comment.
 * This method checks whether a header comment can be defined (i.e. whether
 * this is the first comment in the loaded file). If this is the case, it is
 * searched for the lates blank line. This line will mark the end of the
 * header comment. The return value is the index of the first line in the
 * passed in list, which does not belong to the header comment.
 *
 * @param commentLines the comment lines
 * @return the index of the next line after the header comment
 */
private int checkHeaderComment(List<String> commentLines)
{
  if (getHeader() == null && layout.isEmpty())
  {
    // This is the first comment. Search for blank lines.
    int index = commentLines.size() - 1;
    while (index >= 0 && commentLines.get(index).length() > 0)
    {
      index--;
    }
    setHeader(new ArrayList<String>(commentLines.subList(0, index + 1)));
    return index + 1;
  }
  else
  {
    return 0;
  }
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.apache.felix.utils

/**
 * Checks if parts of the passed in comment can be used as header comment.
 * This method checks whether a header comment can be defined (i.e. whether
 * this is the first comment in the loaded file). If this is the case, it is
 * searched for the lates blank line. This line will mark the end of the
 * header comment. The return value is the index of the first line in the
 * passed in list, which does not belong to the header comment.
 *
 * @param commentLines the comment lines
 * @return the index of the next line after the header comment
 */
private int checkHeaderComment(List<String> commentLines)
{
  if (getHeader() == null && layout.isEmpty())
  {
    // This is the first comment. Search for blank lines.
    int index = commentLines.size() - 1;
    while (index >= 0 && commentLines.get(index).length() > 0)
    {
      index--;
    }
    setHeader(new ArrayList<String>(commentLines.subList(0, index + 1)));
    return index + 1;
  }
  else
  {
    return 0;
  }
}

相关文章