本文整理了Java中org.apache.felix.utils.properties.Properties.setHeader()
方法的一些代码示例,展示了Properties.setHeader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Properties.setHeader()
方法的具体详情如下:
包路径:org.apache.felix.utils.properties.Properties
类名称:Properties
方法名:setHeader
[英]Set the comment header.
[中]设置注释标题。
代码示例来源:origin: org.apache.felix/org.apache.felix.fileinstall
/**
* Set the comment header.
*
* @param header the header to use
*/
public void setHeader(List<String> header)
{
storage.setHeader(header);
}
代码示例来源:origin: org.apache.felix/org.apache.felix.utils
/**
* Set the comment header.
*
* @param header the header to use
*/
public void setHeader(List<String> header)
{
storage.setHeader(header);
}
代码示例来源:origin: apache/felix
/**
* Set the comment header.
*
* @param header the header to use
*/
public void setHeader(List<String> header)
{
storage.setHeader(header);
}
代码示例来源: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: 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.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;
}
}
代码示例来源:origin: apache/karaf
startup.setHeader(Collections.singletonList("# Bundles to be started on startup, with startlevel"));
Map<Integer, Set<String>> invertedStartupBundles = MapUtils.invert(bundles);
for (Map.Entry<Integer, Set<String>> entry : new TreeMap<>(invertedStartupBundles).entrySet()) {
代码示例来源:origin: org.apache.karaf.profile/org.apache.karaf.profile.core
startup.setHeader(Collections.singletonList("# Bundles to be started on startup, with startlevel"));
Map<Integer, Set<String>> invertedStartupBundles = MapUtils.invert(bundles);
for (Map.Entry<Integer, Set<String>> entry : new TreeMap<>(invertedStartupBundles).entrySet()) {
内容来源于网络,如有侵权,请联系作者删除!