id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4,100 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CThreadContext.java | CThreadContext.getInstance | public static final CThreadContext getInstance() {
SoftReference ref = (SoftReference)CThreadContext.contextLocal
.get(Thread.currentThread());
CThreadContext context = null;
if ((ref == null) || (ref.get() == null)) {
context = new CThreadContext();
ref = new SoftReference(context);
CThreadContext.c... | java | public static final CThreadContext getInstance() {
SoftReference ref = (SoftReference)CThreadContext.contextLocal
.get(Thread.currentThread());
CThreadContext context = null;
if ((ref == null) || (ref.get() == null)) {
context = new CThreadContext();
ref = new SoftReference(context);
CThreadContext.c... | [
"public",
"static",
"final",
"CThreadContext",
"getInstance",
"(",
")",
"{",
"SoftReference",
"ref",
"=",
"(",
"SoftReference",
")",
"CThreadContext",
".",
"contextLocal",
".",
"get",
"(",
"Thread",
".",
"currentThread",
"(",
")",
")",
";",
"CThreadContext",
"... | Return a thread context
@return a thread context | [
"Return",
"a",
"thread",
"context"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CThreadContext.java#L48-L60 |
4,101 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CThreadContext.java | CThreadContext.get | public final Object get(String key) {
try {
this.mutex.acquire();
return this.valueMap.get(key);
} finally {
try {
this.mutex.release();
} catch (Exception ignore) {
}
}
} | java | public final Object get(String key) {
try {
this.mutex.acquire();
return this.valueMap.get(key);
} finally {
try {
this.mutex.release();
} catch (Exception ignore) {
}
}
} | [
"public",
"final",
"Object",
"get",
"(",
"String",
"key",
")",
"{",
"try",
"{",
"this",
".",
"mutex",
".",
"acquire",
"(",
")",
";",
"return",
"this",
".",
"valueMap",
".",
"get",
"(",
"key",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"this",
"."... | Get the value with the given key from this context
@param key
the key to lookup
@return the value with the given key from this context | [
"Get",
"the",
"value",
"with",
"the",
"given",
"key",
"from",
"this",
"context"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CThreadContext.java#L74-L85 |
4,102 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CThreadContext.java | CThreadContext.set | public final void set(String key, Object value) {
try {
this.mutex.acquire();
if (value == null) {
this.valueMap.remove(key);
} else {
this.valueMap.put(key, value);
}
} finally {
try {
this.mutex.release();
} catch (Exception ignore) {
}
}
} | java | public final void set(String key, Object value) {
try {
this.mutex.acquire();
if (value == null) {
this.valueMap.remove(key);
} else {
this.valueMap.put(key, value);
}
} finally {
try {
this.mutex.release();
} catch (Exception ignore) {
}
}
} | [
"public",
"final",
"void",
"set",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"try",
"{",
"this",
".",
"mutex",
".",
"acquire",
"(",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"this",
".",
"valueMap",
".",
"remove",
"(",
"k... | Set a value in this context
@param key
the key to save the value on
@param value
the value to set | [
"Set",
"a",
"value",
"in",
"this",
"context"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CThreadContext.java#L95-L109 |
4,103 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.replaceExpr | public final String replaceExpr(
String message,
String type
) {
message = decode(message);
List mapFilter = getFilter(type);
if (mapFilter == null)
return message;
Iterator it = mapFilter.iterator();
while (it.hasNext()) {
Object v... | java | public final String replaceExpr(
String message,
String type
) {
message = decode(message);
List mapFilter = getFilter(type);
if (mapFilter == null)
return message;
Iterator it = mapFilter.iterator();
while (it.hasNext()) {
Object v... | [
"public",
"final",
"String",
"replaceExpr",
"(",
"String",
"message",
",",
"String",
"type",
")",
"{",
"message",
"=",
"decode",
"(",
"message",
")",
";",
"List",
"mapFilter",
"=",
"getFilter",
"(",
"type",
")",
";",
"if",
"(",
"mapFilter",
"==",
"null",... | Replace the input message using the rules 'type' found in the xml
configuration file
@param message message to replace
@param type rule type
@return the replaced message | [
"Replace",
"the",
"input",
"message",
"using",
"the",
"rules",
"type",
"found",
"in",
"the",
"xml",
"configuration",
"file"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1109-L1148 |
4,104 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.getInstance | public static final CPadawan getInstance() {
try {
mutex.acquire();
CPadawan toReturn =
(handle == null)
? (handle = new CPadawan())
: handle;
toReturn.init();
return toReturn;
} finally {
try {... | java | public static final CPadawan getInstance() {
try {
mutex.acquire();
CPadawan toReturn =
(handle == null)
? (handle = new CPadawan())
: handle;
toReturn.init();
return toReturn;
} finally {
try {... | [
"public",
"static",
"final",
"CPadawan",
"getInstance",
"(",
")",
"{",
"try",
"{",
"mutex",
".",
"acquire",
"(",
")",
";",
"CPadawan",
"toReturn",
"=",
"(",
"handle",
"==",
"null",
")",
"?",
"(",
"handle",
"=",
"new",
"CPadawan",
"(",
")",
")",
":",
... | Return an instance of the padawan
@return may the force be with you ! | [
"Return",
"an",
"instance",
"of",
"the",
"padawan"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1192-L1209 |
4,105 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.getFilter | private final List getFilter(String type) {
try {
mutex.acquire();
return (List) mapFilter.get(type + ".filter");
}
finally {
try{mutex.release();}catch(Throwable ignore){}
}
} | java | private final List getFilter(String type) {
try {
mutex.acquire();
return (List) mapFilter.get(type + ".filter");
}
finally {
try{mutex.release();}catch(Throwable ignore){}
}
} | [
"private",
"final",
"List",
"getFilter",
"(",
"String",
"type",
")",
"{",
"try",
"{",
"mutex",
".",
"acquire",
"(",
")",
";",
"return",
"(",
"List",
")",
"mapFilter",
".",
"get",
"(",
"type",
"+",
"\".filter\"",
")",
";",
"}",
"finally",
"{",
"try",
... | return the filters of type 'type'
@param type type of filters to get
@return the filters of type 'type' | [
"return",
"the",
"filters",
"of",
"type",
"type"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1218-L1226 |
4,106 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.validate | public final String validate(
String in,
String type
) {
CShaniDomParser parser = new CShaniDomParser();
Document doc =
parser.parse(
new StringReader(in),
getTags(type),
getMerge(type)
);
if (doc != nu... | java | public final String validate(
String in,
String type
) {
CShaniDomParser parser = new CShaniDomParser();
Document doc =
parser.parse(
new StringReader(in),
getTags(type),
getMerge(type)
);
if (doc != nu... | [
"public",
"final",
"String",
"validate",
"(",
"String",
"in",
",",
"String",
"type",
")",
"{",
"CShaniDomParser",
"parser",
"=",
"new",
"CShaniDomParser",
"(",
")",
";",
"Document",
"doc",
"=",
"parser",
".",
"parse",
"(",
"new",
"StringReader",
"(",
"in",... | validate for xml the string in using the rules type 'type'
@param in the string to validate
@param type rule type
@return the validated string | [
"validate",
"for",
"xml",
"the",
"string",
"in",
"using",
"the",
"rules",
"type",
"type"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1469-L1485 |
4,107 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.createEntityDeclaration | public final String createEntityDeclaration()
throws UnsupportedEncodingException {
StringBuffer buffer = new StringBuffer();
buffer.append("<!DOCTYPE padawan [\n");
for (int i = 0; i < entity.length; i++) {
buffer.append(
"<!ENTITY " + entity[i][1] + " '" + ... | java | public final String createEntityDeclaration()
throws UnsupportedEncodingException {
StringBuffer buffer = new StringBuffer();
buffer.append("<!DOCTYPE padawan [\n");
for (int i = 0; i < entity.length; i++) {
buffer.append(
"<!ENTITY " + entity[i][1] + " '" + ... | [
"public",
"final",
"String",
"createEntityDeclaration",
"(",
")",
"throws",
"UnsupportedEncodingException",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"<!DOCTYPE padawan [\\n\"",
")",
";",
"for",
"(",
... | Create the padawan doctype
@return the padawan doctype
@throws UnsupportedEncodingException should not happen | [
"Create",
"the",
"padawan",
"doctype"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1494-L1508 |
4,108 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.getEntityDeclaration | public final String getEntityDeclaration() {
if (entityDecl == null)
try {
entityDecl = createEntityDeclaration();
} catch (Exception e) {
entityDecl = null;
}
return entityDecl;
} | java | public final String getEntityDeclaration() {
if (entityDecl == null)
try {
entityDecl = createEntityDeclaration();
} catch (Exception e) {
entityDecl = null;
}
return entityDecl;
} | [
"public",
"final",
"String",
"getEntityDeclaration",
"(",
")",
"{",
"if",
"(",
"entityDecl",
"==",
"null",
")",
"try",
"{",
"entityDecl",
"=",
"createEntityDeclaration",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"entityDecl",
"=",
"null... | return the padawan doctype
@return the padawan doctype | [
"return",
"the",
"padawan",
"doctype"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1515-L1524 |
4,109 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.decode | public final String decode(String toDecode) {
CEntityCoDec codec = new CEntityCoDec(new HashMap());
return codec.decode(toDecode);
} | java | public final String decode(String toDecode) {
CEntityCoDec codec = new CEntityCoDec(new HashMap());
return codec.decode(toDecode);
} | [
"public",
"final",
"String",
"decode",
"(",
"String",
"toDecode",
")",
"{",
"CEntityCoDec",
"codec",
"=",
"new",
"CEntityCoDec",
"(",
"new",
"HashMap",
"(",
")",
")",
";",
"return",
"codec",
".",
"decode",
"(",
"toDecode",
")",
";",
"}"
] | decode entity in the string
@param toDecode the string to decode
@return the decoded string | [
"decode",
"entity",
"in",
"the",
"string"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1533-L1537 |
4,110 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.stringReplace | public final String stringReplace(
String toBeReplaced,
String toReplace,
String replacement
) {
Pattern pattern = Pattern.compile(toReplace);
Matcher match = pattern.matcher(toBeReplaced);
while (match.find()) {
toBeReplaced = match.replaceAll(replacemen... | java | public final String stringReplace(
String toBeReplaced,
String toReplace,
String replacement
) {
Pattern pattern = Pattern.compile(toReplace);
Matcher match = pattern.matcher(toBeReplaced);
while (match.find()) {
toBeReplaced = match.replaceAll(replacemen... | [
"public",
"final",
"String",
"stringReplace",
"(",
"String",
"toBeReplaced",
",",
"String",
"toReplace",
",",
"String",
"replacement",
")",
"{",
"Pattern",
"pattern",
"=",
"Pattern",
".",
"compile",
"(",
"toReplace",
")",
";",
"Matcher",
"match",
"=",
"pattern... | A replace string method
@param toBeReplaced string to replace
@param toReplace regex to match
@param replacement string replacement for each match
@return the replaced string | [
"A",
"replace",
"string",
"method"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1559-L1573 |
4,111 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.isAlone | private final boolean isAlone(
String tagName,
String aloneTags[]
) {
if (aloneTags == null)
return false;
if (tagName == null)
return false;
for (int i = 0; i < aloneTags.length; i++) {
if (tagName.equalsIgnoreCase(aloneTags[i]))
... | java | private final boolean isAlone(
String tagName,
String aloneTags[]
) {
if (aloneTags == null)
return false;
if (tagName == null)
return false;
for (int i = 0; i < aloneTags.length; i++) {
if (tagName.equalsIgnoreCase(aloneTags[i]))
... | [
"private",
"final",
"boolean",
"isAlone",
"(",
"String",
"tagName",
",",
"String",
"aloneTags",
"[",
"]",
")",
"{",
"if",
"(",
"aloneTags",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"tagName",
"==",
"null",
")",
"return",
"false",
";",
"for... | return true if the given tag name is an empty tag
@param tagName tag name to lookup
@param aloneTags a string array of empty tags
@return true if the given tag name is an empty tag | [
"return",
"true",
"if",
"the",
"given",
"tag",
"name",
"is",
"an",
"empty",
"tag"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1950-L1966 |
4,112 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.escapeAttribute | public final String escapeAttribute(String in) {
in = escape(in);
in = in.replaceAll(
"\"",
"""
);
return in;
} | java | public final String escapeAttribute(String in) {
in = escape(in);
in = in.replaceAll(
"\"",
"""
);
return in;
} | [
"public",
"final",
"String",
"escapeAttribute",
"(",
"String",
"in",
")",
"{",
"in",
"=",
"escape",
"(",
"in",
")",
";",
"in",
"=",
"in",
".",
"replaceAll",
"(",
"\"\\\"\"",
",",
"\""\"",
")",
";",
"return",
"in",
";",
"}"
] | Escape the given string to be a valid content for an xml attribute
@param in the string to escape
@return the escaped string | [
"Escape",
"the",
"given",
"string",
"to",
"be",
"a",
"valid",
"content",
"for",
"an",
"xml",
"attribute"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1975-L1983 |
4,113 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java | CPadawan.escape | public final String escape(String in) {
if (in == null)
return "";
if (in.trim()
.equals(""))
return in;
if (in.trim()
.length() == 0)
return in;
in = in.replaceAll(
"&",
"&"
... | java | public final String escape(String in) {
if (in == null)
return "";
if (in.trim()
.equals(""))
return in;
if (in.trim()
.length() == 0)
return in;
in = in.replaceAll(
"&",
"&"
... | [
"public",
"final",
"String",
"escape",
"(",
"String",
"in",
")",
"{",
"if",
"(",
"in",
"==",
"null",
")",
"return",
"\"\"",
";",
"if",
"(",
"in",
".",
"trim",
"(",
")",
".",
"equals",
"(",
"\"\"",
")",
")",
"return",
"in",
";",
"if",
"(",
"in",... | Escape the given string to be a valid content for an xml text node
content
@param in the string to escape
@return the escaped string | [
"Escape",
"the",
"given",
"string",
"to",
"be",
"a",
"valid",
"content",
"for",
"an",
"xml",
"text",
"node",
"content"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/utils/CPadawan.java#L1993-L2042 |
4,114 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.createLoader | private static final CClassLoader createLoader(final ClassLoader parent,
final String name) {
try {
return new CClassLoader(parent, name);
} catch (final Exception ignore) {
return null;
}
} | java | private static final CClassLoader createLoader(final ClassLoader parent,
final String name) {
try {
return new CClassLoader(parent, name);
} catch (final Exception ignore) {
return null;
}
} | [
"private",
"static",
"final",
"CClassLoader",
"createLoader",
"(",
"final",
"ClassLoader",
"parent",
",",
"final",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"new",
"CClassLoader",
"(",
"parent",
",",
"name",
")",
";",
"}",
"catch",
"(",
"final",
"E... | Create a new loader
@param parent
a reference to the parent loader
@param name
loader name
@return a new loader | [
"Create",
"a",
"new",
"loader"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L125-L132 |
4,115 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.createMemoryURL | public static URL createMemoryURL(final String entryName, final byte[] entry) {
try {
final Class c = ClassLoader.getSystemClassLoader().loadClass(
"org.allcolor.yahp.converter.CMemoryURLHandler");
final Method m = c.getDeclaredMethod("createMemoryURL",
new Class[] { String.class, byte[].class });
... | java | public static URL createMemoryURL(final String entryName, final byte[] entry) {
try {
final Class c = ClassLoader.getSystemClassLoader().loadClass(
"org.allcolor.yahp.converter.CMemoryURLHandler");
final Method m = c.getDeclaredMethod("createMemoryURL",
new Class[] { String.class, byte[].class });
... | [
"public",
"static",
"URL",
"createMemoryURL",
"(",
"final",
"String",
"entryName",
",",
"final",
"byte",
"[",
"]",
"entry",
")",
"{",
"try",
"{",
"final",
"Class",
"c",
"=",
"ClassLoader",
".",
"getSystemClassLoader",
"(",
")",
".",
"loadClass",
"(",
"\"or... | Creates and allocates a memory URL
@param entryName
name of the entry
@param entry
byte array of the entry
@return the created URL or null if an error occurs. | [
"Creates",
"and",
"allocates",
"a",
"memory",
"URL"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L143-L155 |
4,116 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getClasses | private static List getClasses(final File current, final List list) {
if (current.isDirectory()) {
try {
list.add(current.toURI().toURL());
} catch (final Exception ignore) {
}
final File children[] = current.listFiles();
for (int i = 0; i < children.length; i++) {
final File element = childr... | java | private static List getClasses(final File current, final List list) {
if (current.isDirectory()) {
try {
list.add(current.toURI().toURL());
} catch (final Exception ignore) {
}
final File children[] = current.listFiles();
for (int i = 0; i < children.length; i++) {
final File element = childr... | [
"private",
"static",
"List",
"getClasses",
"(",
"final",
"File",
"current",
",",
"final",
"List",
"list",
")",
"{",
"if",
"(",
"current",
".",
"isDirectory",
"(",
")",
")",
"{",
"try",
"{",
"list",
".",
"add",
"(",
"current",
".",
"toURI",
"(",
")",
... | Return a list of classes and jar files
@param current
currently inspected file
@param list
list of url to classes and jar files
@return list of url to classes and jar files | [
"Return",
"a",
"list",
"of",
"classes",
"and",
"jar",
"files"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L643-L673 |
4,117 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getLoader | public static final CClassLoader getLoader(final String fpath) {
String path = fpath;
CClassLoader currentLoader = CClassLoader.rootLoader;
if (path == null) {
return CClassLoader.getRootLoader();
}
if (path.startsWith(CClassLoader.ROOT_LOADER)) {
path = path.substring(10);
}
final StringTokenize... | java | public static final CClassLoader getLoader(final String fpath) {
String path = fpath;
CClassLoader currentLoader = CClassLoader.rootLoader;
if (path == null) {
return CClassLoader.getRootLoader();
}
if (path.startsWith(CClassLoader.ROOT_LOADER)) {
path = path.substring(10);
}
final StringTokenize... | [
"public",
"static",
"final",
"CClassLoader",
"getLoader",
"(",
"final",
"String",
"fpath",
")",
"{",
"String",
"path",
"=",
"fpath",
";",
"CClassLoader",
"currentLoader",
"=",
"CClassLoader",
".",
"rootLoader",
";",
"if",
"(",
"path",
"==",
"null",
")",
"{",... | return the loader with the given path
@param fpath
the path to lookup
@return the loader with the given path | [
"return",
"the",
"loader",
"with",
"the",
"given",
"path"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L689-L709 |
4,118 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getRootLoader | public static final CClassLoader getRootLoader() {
if (CClassLoader.rootLoader == null) {
CClassLoader.rootLoader = CClassLoader.createLoader(
CClassLoader.class.getClassLoader(),
CClassLoader.ROOT_LOADER);
}
return CClassLoader.rootLoader;
} | java | public static final CClassLoader getRootLoader() {
if (CClassLoader.rootLoader == null) {
CClassLoader.rootLoader = CClassLoader.createLoader(
CClassLoader.class.getClassLoader(),
CClassLoader.ROOT_LOADER);
}
return CClassLoader.rootLoader;
} | [
"public",
"static",
"final",
"CClassLoader",
"getRootLoader",
"(",
")",
"{",
"if",
"(",
"CClassLoader",
".",
"rootLoader",
"==",
"null",
")",
"{",
"CClassLoader",
".",
"rootLoader",
"=",
"CClassLoader",
".",
"createLoader",
"(",
"CClassLoader",
".",
"class",
"... | return the rootloader
@return the rootloader | [
"return",
"the",
"rootloader"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L716-L723 |
4,119 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getURLs | public static URL[] getURLs(final String path) {
final File topDir = new File(path);
final List list = new ArrayList();
CClassLoader.getClasses(topDir, list);
final URL ret[] = new URL[list.size() + 1];
for (int i = 0; i < list.size(); i++) {
ret[i] = (URL) list.get(i);
}
try {
ret[list.size()] =... | java | public static URL[] getURLs(final String path) {
final File topDir = new File(path);
final List list = new ArrayList();
CClassLoader.getClasses(topDir, list);
final URL ret[] = new URL[list.size() + 1];
for (int i = 0; i < list.size(); i++) {
ret[i] = (URL) list.get(i);
}
try {
ret[list.size()] =... | [
"public",
"static",
"URL",
"[",
"]",
"getURLs",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"File",
"topDir",
"=",
"new",
"File",
"(",
"path",
")",
";",
"final",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"CClassLoader",
".",
"get... | Return a list of jar and classes located in path
@param path
the path in which to search
@return a list of jar and classes located in path | [
"Return",
"a",
"list",
"of",
"jar",
"and",
"classes",
"located",
"in",
"path"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L750-L767 |
4,120 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.loadByteArray | public static final byte[] loadByteArray(final InputStream in) {
try {
final ByteArrayOutputStream bOut = new ByteArrayOutputStream();
final byte buffer[] = new byte[2048];
int iNbByteRead = -1;
while ((iNbByteRead = in.read(buffer)) != -1) {
bOut.write(buffer, 0, iNbByteRead);
}
return bOut... | java | public static final byte[] loadByteArray(final InputStream in) {
try {
final ByteArrayOutputStream bOut = new ByteArrayOutputStream();
final byte buffer[] = new byte[2048];
int iNbByteRead = -1;
while ((iNbByteRead = in.read(buffer)) != -1) {
bOut.write(buffer, 0, iNbByteRead);
}
return bOut... | [
"public",
"static",
"final",
"byte",
"[",
"]",
"loadByteArray",
"(",
"final",
"InputStream",
"in",
")",
"{",
"try",
"{",
"final",
"ByteArrayOutputStream",
"bOut",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"final",
"byte",
"buffer",
"[",
"]",
"=",
... | load the given inputstream in a byte array
@param in
the stream to load
@return a byte array | [
"load",
"the",
"given",
"inputstream",
"in",
"a",
"byte",
"array"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1003-L1019 |
4,121 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.loadByteArray | public static final byte[] loadByteArray(final URL urlToResource) {
InputStream in = null;
try {
final URLConnection uc = urlToResource.openConnection();
uc.setUseCaches(false);
in = uc.getInputStream();
return CClassLoader.loadByteArray(in);
} catch (final IOException ioe) {
return null;
} fin... | java | public static final byte[] loadByteArray(final URL urlToResource) {
InputStream in = null;
try {
final URLConnection uc = urlToResource.openConnection();
uc.setUseCaches(false);
in = uc.getInputStream();
return CClassLoader.loadByteArray(in);
} catch (final IOException ioe) {
return null;
} fin... | [
"public",
"static",
"final",
"byte",
"[",
"]",
"loadByteArray",
"(",
"final",
"URL",
"urlToResource",
")",
"{",
"InputStream",
"in",
"=",
"null",
";",
"try",
"{",
"final",
"URLConnection",
"uc",
"=",
"urlToResource",
".",
"openConnection",
"(",
")",
";",
"... | load the given url in a byte array
@param urlToResource
url to load
@return a byte array | [
"load",
"the",
"given",
"url",
"in",
"a",
"byte",
"array"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1029-L1046 |
4,122 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.loadResources | private static final void loadResources(final CClassLoader loader,
final List URLList, final String resourceName) {
final List l = loader.getPrivateResource(resourceName);
if (l != null) {
URLList.addAll(l);
}
final List loaderList = new ArrayList();
for (final Iterator it = loader.childrenMap.entryS... | java | private static final void loadResources(final CClassLoader loader,
final List URLList, final String resourceName) {
final List l = loader.getPrivateResource(resourceName);
if (l != null) {
URLList.addAll(l);
}
final List loaderList = new ArrayList();
for (final Iterator it = loader.childrenMap.entryS... | [
"private",
"static",
"final",
"void",
"loadResources",
"(",
"final",
"CClassLoader",
"loader",
",",
"final",
"List",
"URLList",
",",
"final",
"String",
"resourceName",
")",
"{",
"final",
"List",
"l",
"=",
"loader",
".",
"getPrivateResource",
"(",
"resourceName",... | load multiple resources of same name
@param loader
current lookup loader
@param URLList
list of found resources
@param resourceName
name to match | [
"load",
"multiple",
"resources",
"of",
"same",
"name"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1058-L1079 |
4,123 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.log | private static final void log(final String Message, final int level) {
if ((level == CClassLoader.INFO)
&& CClassLoader.log.isLoggable(Level.INFO)) {
CClassLoader.log.info(Message);
} else if ((level == CClassLoader.DEBUG)
&& CClassLoader.log.isLoggable(Level.FINE)) {
CClassLoader.log.fine(Message);
... | java | private static final void log(final String Message, final int level) {
if ((level == CClassLoader.INFO)
&& CClassLoader.log.isLoggable(Level.INFO)) {
CClassLoader.log.info(Message);
} else if ((level == CClassLoader.DEBUG)
&& CClassLoader.log.isLoggable(Level.FINE)) {
CClassLoader.log.fine(Message);
... | [
"private",
"static",
"final",
"void",
"log",
"(",
"final",
"String",
"Message",
",",
"final",
"int",
"level",
")",
"{",
"if",
"(",
"(",
"level",
"==",
"CClassLoader",
".",
"INFO",
")",
"&&",
"CClassLoader",
".",
"log",
".",
"isLoggable",
"(",
"Level",
... | log the message
@param Message
message to log
@param level
log level (INFO,DEBUG,FATAL) | [
"log",
"the",
"message"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1089-L1100 |
4,124 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.releaseMemoryURL | public static void releaseMemoryURL(final URL u) {
try {
final Class c = ClassLoader.getSystemClassLoader().loadClass(
"org.allcolor.yahp.converter.CMemoryURLHandler");
final Method m = c.getDeclaredMethod("releaseMemoryURL",
new Class[] { URL.class });
m.setAccessible(true);
m.invoke(null, new ... | java | public static void releaseMemoryURL(final URL u) {
try {
final Class c = ClassLoader.getSystemClassLoader().loadClass(
"org.allcolor.yahp.converter.CMemoryURLHandler");
final Method m = c.getDeclaredMethod("releaseMemoryURL",
new Class[] { URL.class });
m.setAccessible(true);
m.invoke(null, new ... | [
"public",
"static",
"void",
"releaseMemoryURL",
"(",
"final",
"URL",
"u",
")",
"{",
"try",
"{",
"final",
"Class",
"c",
"=",
"ClassLoader",
".",
"getSystemClassLoader",
"(",
")",
".",
"loadClass",
"(",
"\"org.allcolor.yahp.converter.CMemoryURLHandler\"",
")",
";",
... | Release a previously allocated memory URL
@param u
the URL to release memory | [
"Release",
"a",
"previously",
"allocated",
"memory",
"URL"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1108-L1119 |
4,125 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.setInit | private static final void setInit(final CClassLoader loader) {
loader.booInit = true;
for (final Iterator it = loader.getChildLoader(); it.hasNext();) {
final Map.Entry entry = (Map.Entry) it.next();
CClassLoader.setInit((CClassLoader) entry.getValue());
}
} | java | private static final void setInit(final CClassLoader loader) {
loader.booInit = true;
for (final Iterator it = loader.getChildLoader(); it.hasNext();) {
final Map.Entry entry = (Map.Entry) it.next();
CClassLoader.setInit((CClassLoader) entry.getValue());
}
} | [
"private",
"static",
"final",
"void",
"setInit",
"(",
"final",
"CClassLoader",
"loader",
")",
"{",
"loader",
".",
"booInit",
"=",
"true",
";",
"for",
"(",
"final",
"Iterator",
"it",
"=",
"loader",
".",
"getChildLoader",
"(",
")",
";",
"it",
".",
"hasNext... | set the init flag of all loaders
@param loader
the current loader | [
"set",
"the",
"init",
"flag",
"of",
"all",
"loaders"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1131-L1138 |
4,126 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.sl | private static final boolean sl(final int level) {
if ((level == CClassLoader.INFO)
&& CClassLoader.log.isLoggable(Level.INFO)) {
return true;
} else if ((level == CClassLoader.DEBUG)
&& CClassLoader.log.isLoggable(Level.FINE)) {
return true;
} else if ((level == CClassLoader.FATAL)
&& CClassLoa... | java | private static final boolean sl(final int level) {
if ((level == CClassLoader.INFO)
&& CClassLoader.log.isLoggable(Level.INFO)) {
return true;
} else if ((level == CClassLoader.DEBUG)
&& CClassLoader.log.isLoggable(Level.FINE)) {
return true;
} else if ((level == CClassLoader.FATAL)
&& CClassLoa... | [
"private",
"static",
"final",
"boolean",
"sl",
"(",
"final",
"int",
"level",
")",
"{",
"if",
"(",
"(",
"level",
"==",
"CClassLoader",
".",
"INFO",
")",
"&&",
"CClassLoader",
".",
"log",
".",
"isLoggable",
"(",
"Level",
".",
"INFO",
")",
")",
"{",
"re... | test if the logging level is enabled
@param level
the logging level to test
@return true if enabled | [
"test",
"if",
"the",
"logging",
"level",
"is",
"enabled"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1158-L1171 |
4,127 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader._destroy | private final void _destroy(final Method logFactoryRelease) {
for (final Iterator it = this.childrenMap.entrySet().iterator(); it
.hasNext();) {
final Map.Entry entry = (Map.Entry) it.next();
final CClassLoader loader = (CClassLoader) entry.getValue();
loader._destroy(logFactoryRelease);
it.remove();
... | java | private final void _destroy(final Method logFactoryRelease) {
for (final Iterator it = this.childrenMap.entrySet().iterator(); it
.hasNext();) {
final Map.Entry entry = (Map.Entry) it.next();
final CClassLoader loader = (CClassLoader) entry.getValue();
loader._destroy(logFactoryRelease);
it.remove();
... | [
"private",
"final",
"void",
"_destroy",
"(",
"final",
"Method",
"logFactoryRelease",
")",
"{",
"for",
"(",
"final",
"Iterator",
"it",
"=",
"this",
".",
"childrenMap",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
... | Destroy instance variables.
@param logFactoryRelease
method to release commons logging | [
"Destroy",
"instance",
"variables",
"."
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1239-L1282 |
4,128 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.addClass | public final void addClass(final String className, final URL urlToClass) {
if ((className == null) || (urlToClass == null)) {
return;
}
if (!this.classesMap.containsKey(className)) {
this.classesMap.put(className, urlToClass);
}
} | java | public final void addClass(final String className, final URL urlToClass) {
if ((className == null) || (urlToClass == null)) {
return;
}
if (!this.classesMap.containsKey(className)) {
this.classesMap.put(className, urlToClass);
}
} | [
"public",
"final",
"void",
"addClass",
"(",
"final",
"String",
"className",
",",
"final",
"URL",
"urlToClass",
")",
"{",
"if",
"(",
"(",
"className",
"==",
"null",
")",
"||",
"(",
"urlToClass",
"==",
"null",
")",
")",
"{",
"return",
";",
"}",
"if",
"... | add a class to known class
@param className
class name
@param urlToClass
url to class file | [
"add",
"a",
"class",
"to",
"known",
"class"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1292-L1300 |
4,129 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.addResource | public final void addResource(final String resouceName,
final URL urlToResource) {
if ((urlToResource == null) || (resouceName == null)) {
return;
}
if (this.resourcesMap.containsKey(resouceName.replace('\\', '/'))) {
final Object to = this.resourcesMap.get(resouceName.replace('\\',
'/'));
if (to... | java | public final void addResource(final String resouceName,
final URL urlToResource) {
if ((urlToResource == null) || (resouceName == null)) {
return;
}
if (this.resourcesMap.containsKey(resouceName.replace('\\', '/'))) {
final Object to = this.resourcesMap.get(resouceName.replace('\\',
'/'));
if (to... | [
"public",
"final",
"void",
"addResource",
"(",
"final",
"String",
"resouceName",
",",
"final",
"URL",
"urlToResource",
")",
"{",
"if",
"(",
"(",
"urlToResource",
"==",
"null",
")",
"||",
"(",
"resouceName",
"==",
"null",
")",
")",
"{",
"return",
";",
"}"... | add a resource
@param resouceName
name of the resource to add
@param urlToResource
url to the resource | [
"add",
"a",
"resource"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1310-L1332 |
4,130 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getLoaderByName | private final CClassLoader getLoaderByName(final String name) {
try {
CClassLoader loader = (CClassLoader) this.childrenMap.get(name);
if (loader == null) {
loader = CClassLoader.createLoader(this, name);
this.childrenMap.put(name, loader);
}
return loader;
} finally {
try {
} catch (f... | java | private final CClassLoader getLoaderByName(final String name) {
try {
CClassLoader loader = (CClassLoader) this.childrenMap.get(name);
if (loader == null) {
loader = CClassLoader.createLoader(this, name);
this.childrenMap.put(name, loader);
}
return loader;
} finally {
try {
} catch (f... | [
"private",
"final",
"CClassLoader",
"getLoaderByName",
"(",
"final",
"String",
"name",
")",
"{",
"try",
"{",
"CClassLoader",
"loader",
"=",
"(",
"CClassLoader",
")",
"this",
".",
"childrenMap",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"loader",
"==",
... | Return the child loader with the given name
@param name
name of the child to get
@return the child loader with the given name | [
"Return",
"the",
"child",
"loader",
"with",
"the",
"given",
"name"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1857-L1874 |
4,131 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.getPrivateResource | private final List getPrivateResource(final String name) {
try {
final Object to = this.resourcesMap.get(name);
final List list = new ArrayList();
if (to instanceof URL) {
list.add((URL) to);
return list;
} else if (to instanceof List) {
final List l = (List) to;
for (int i = 0; i < l.size... | java | private final List getPrivateResource(final String name) {
try {
final Object to = this.resourcesMap.get(name);
final List list = new ArrayList();
if (to instanceof URL) {
list.add((URL) to);
return list;
} else if (to instanceof List) {
final List l = (List) to;
for (int i = 0; i < l.size... | [
"private",
"final",
"List",
"getPrivateResource",
"(",
"final",
"String",
"name",
")",
"{",
"try",
"{",
"final",
"Object",
"to",
"=",
"this",
".",
"resourcesMap",
".",
"get",
"(",
"name",
")",
";",
"final",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
... | get the resource with the given name
@param name
name of the resource to get
@return the resource with the given name | [
"get",
"the",
"resource",
"with",
"the",
"given",
"name"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L1902-L1924 |
4,132 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.nGetLoaderPath | private final String nGetLoaderPath() {
ClassLoader currentLoader = this;
final StringBuffer buffer = new StringBuffer();
buffer.append(this.name);
while ((currentLoader = currentLoader.getParent()) != null) {
if (currentLoader.getClass() == CClassLoader.class) {
buffer.insert(0, "/");
buffer.insert... | java | private final String nGetLoaderPath() {
ClassLoader currentLoader = this;
final StringBuffer buffer = new StringBuffer();
buffer.append(this.name);
while ((currentLoader = currentLoader.getParent()) != null) {
if (currentLoader.getClass() == CClassLoader.class) {
buffer.insert(0, "/");
buffer.insert... | [
"private",
"final",
"String",
"nGetLoaderPath",
"(",
")",
"{",
"ClassLoader",
"currentLoader",
"=",
"this",
";",
"final",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"name",
")",
";",
"whi... | calculate the loader path
@return the calculated path | [
"calculate",
"the",
"loader",
"path"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L2079-L2094 |
4,133 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.reload | public final void reload(final CClassLoaderConfig config) {
if (this == CClassLoader.getRootLoader()) {
return;
}
if (config == null) {
return;
}
final CClassLoader parent = ((CClassLoader) this.getParent());
parent.removeLoader(this.name);
if (this.isMandatory()) {
CClassLoader.mandatoryLoade... | java | public final void reload(final CClassLoaderConfig config) {
if (this == CClassLoader.getRootLoader()) {
return;
}
if (config == null) {
return;
}
final CClassLoader parent = ((CClassLoader) this.getParent());
parent.removeLoader(this.name);
if (this.isMandatory()) {
CClassLoader.mandatoryLoade... | [
"public",
"final",
"void",
"reload",
"(",
"final",
"CClassLoaderConfig",
"config",
")",
"{",
"if",
"(",
"this",
"==",
"CClassLoader",
".",
"getRootLoader",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"config",
"==",
"null",
")",
"{",
"return",
"... | reload this loader
@param config
a loader config object | [
"reload",
"this",
"loader"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L2245-L2292 |
4,134 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java | CClassLoader.removeLoader | public final CClassLoader removeLoader(final String loaderToRemove) {
if (loaderToRemove.trim().length() == 0) {
throw new NullPointerException();
}
return (CClassLoader) this.childrenMap.remove(loaderToRemove);
} | java | public final CClassLoader removeLoader(final String loaderToRemove) {
if (loaderToRemove.trim().length() == 0) {
throw new NullPointerException();
}
return (CClassLoader) this.childrenMap.remove(loaderToRemove);
} | [
"public",
"final",
"CClassLoader",
"removeLoader",
"(",
"final",
"String",
"loaderToRemove",
")",
"{",
"if",
"(",
"loaderToRemove",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
... | remove the given loader from this loader
@param loaderToRemove
name of the loader to remove. NOT NULL.
@return the removed loader or null.
@throws NullPointerException
if loaderToRemove is null or a zero length/blank string | [
"remove",
"the",
"given",
"loader",
"from",
"this",
"loader"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CClassLoader.java#L2305-L2311 |
4,135 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentReconstructor.java | CDocumentReconstructor.getSecurityFlags | private static final int getSecurityFlags(final Map properties) {
int securityType = 0;
securityType = "true".equals(properties
.get(IHtmlToPdfTransformer.PDF_ALLOW_PRINTING)) ? (securityType | PdfWriter.ALLOW_PRINTING)
: securityType;
securityType = "true".equals(properties
.get(IHtmlToPdfTransformer... | java | private static final int getSecurityFlags(final Map properties) {
int securityType = 0;
securityType = "true".equals(properties
.get(IHtmlToPdfTransformer.PDF_ALLOW_PRINTING)) ? (securityType | PdfWriter.ALLOW_PRINTING)
: securityType;
securityType = "true".equals(properties
.get(IHtmlToPdfTransformer... | [
"private",
"static",
"final",
"int",
"getSecurityFlags",
"(",
"final",
"Map",
"properties",
")",
"{",
"int",
"securityType",
"=",
"0",
";",
"securityType",
"=",
"\"true\"",
".",
"equals",
"(",
"properties",
".",
"get",
"(",
"IHtmlToPdfTransformer",
".",
"PDF_A... | return the itext security flags for encryption
@param properties
the converter properties
@return the itext security flags | [
"return",
"the",
"itext",
"security",
"flags",
"for",
"encryption"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentReconstructor.java#L68-L96 |
4,136 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java | CYaHPConverter.destroy | public static void destroy() {
try {
countMutex.acquire();
for (int i=0;i<fileToDeleteOnDestroy.size();i++) {
File f = (File)fileToDeleteOnDestroy.get(i);
if (f != null && f.exists())
try{f.delete();}catch(Exception ignore){}
}
CClassLoader.destroy();
} // end try
finally {
countInstan... | java | public static void destroy() {
try {
countMutex.acquire();
for (int i=0;i<fileToDeleteOnDestroy.size();i++) {
File f = (File)fileToDeleteOnDestroy.get(i);
if (f != null && f.exists())
try{f.delete();}catch(Exception ignore){}
}
CClassLoader.destroy();
} // end try
finally {
countInstan... | [
"public",
"static",
"void",
"destroy",
"(",
")",
"{",
"try",
"{",
"countMutex",
".",
"acquire",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"fileToDeleteOnDestroy",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"File",
"f",... | Delete the jar file from the temp directory Destroy the
classloader | [
"Delete",
"the",
"jar",
"file",
"from",
"the",
"temp",
"directory",
"Destroy",
"the",
"classloader"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java#L93-L111 |
4,137 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java | CYaHPConverter.convertToPdf | public final void convertToPdf(
final URL url,
final IHtmlToPdfTransformer.PageSize size,
final List hf,
final OutputStream out,
final Map fproperties)
throws CConvertException {
Map properties = (fproperties != null)
? fproperties
: new HashMap();
ClassLoader loader... | java | public final void convertToPdf(
final URL url,
final IHtmlToPdfTransformer.PageSize size,
final List hf,
final OutputStream out,
final Map fproperties)
throws CConvertException {
Map properties = (fproperties != null)
? fproperties
: new HashMap();
ClassLoader loader... | [
"public",
"final",
"void",
"convertToPdf",
"(",
"final",
"URL",
"url",
",",
"final",
"IHtmlToPdfTransformer",
".",
"PageSize",
"size",
",",
"final",
"List",
"hf",
",",
"final",
"OutputStream",
"out",
",",
"final",
"Map",
"fproperties",
")",
"throws",
"CConvert... | Convert the document pointed by url in a PDF file. This method
is thread safe.
@param url Url to the document
@param size PDF Page size
@param hf header-footer list
@param out outputstream to render into
@param fproperties properties map
@throws CConvertException if an unexpected error occurs. | [
"Convert",
"the",
"document",
"pointed",
"by",
"url",
"in",
"a",
"PDF",
"file",
".",
"This",
"method",
"is",
"thread",
"safe",
"."
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java#L131-L186 |
4,138 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java | CYaHPConverter.convertToPdf | public final void convertToPdf(
final String content,
final IHtmlToPdfTransformer.PageSize size,
final List hf,
final String furlForBase,
final OutputStream out,
final Map fproperties)
throws CConvertException {
String urlForBase = furlForBase;
Map properties = (fprope... | java | public final void convertToPdf(
final String content,
final IHtmlToPdfTransformer.PageSize size,
final List hf,
final String furlForBase,
final OutputStream out,
final Map fproperties)
throws CConvertException {
String urlForBase = furlForBase;
Map properties = (fprope... | [
"public",
"final",
"void",
"convertToPdf",
"(",
"final",
"String",
"content",
",",
"final",
"IHtmlToPdfTransformer",
".",
"PageSize",
"size",
",",
"final",
"List",
"hf",
",",
"final",
"String",
"furlForBase",
",",
"final",
"OutputStream",
"out",
",",
"final",
... | Convert the document in content in a PDF file. This method is
thread safe.
@param content the html document as a string
@param size PDF Page size
@param hf header-footer list
@param furlForBase base url of the document, mandatory, must end
with a '/'
@param out outputstream to render into
@param fproperties properties... | [
"Convert",
"the",
"document",
"in",
"content",
"in",
"a",
"PDF",
"file",
".",
"This",
"method",
"is",
"thread",
"safe",
"."
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java#L202-L262 |
4,139 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java | CYaHPConverter.init | private final void init(boolean useClassLoader) {
final CYaHPConverter converter = this;
System.out.println("Initializing...");
long time = System.currentTimeMillis();
if (!useClassLoader) {
System.out.println("init time: "+(System.currentTimeMillis()-time));
return;
}
// if classloader is init re... | java | private final void init(boolean useClassLoader) {
final CYaHPConverter converter = this;
System.out.println("Initializing...");
long time = System.currentTimeMillis();
if (!useClassLoader) {
System.out.println("init time: "+(System.currentTimeMillis()-time));
return;
}
// if classloader is init re... | [
"private",
"final",
"void",
"init",
"(",
"boolean",
"useClassLoader",
")",
"{",
"final",
"CYaHPConverter",
"converter",
"=",
"this",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"Initializing...\"",
")",
";",
"long",
"time",
"=",
"System",
".",
"current... | initialize the classloader, and the transformer | [
"initialize",
"the",
"classloader",
"and",
"the",
"transformer"
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java#L294-L351 |
4,140 | allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java | CYaHPConverter.getTransformer | private IHtmlToPdfTransformer getTransformer(final Map properties) {
try {
mutex.acquire();
IHtmlToPdfTransformer transformer = null;
String rendererClassName = IHtmlToPdfTransformer.DEFAULT_PDF_RENDERER;
if ((properties != null) &&
properties.containsKey(
IHtmlToPdfTransformer.PDF_R... | java | private IHtmlToPdfTransformer getTransformer(final Map properties) {
try {
mutex.acquire();
IHtmlToPdfTransformer transformer = null;
String rendererClassName = IHtmlToPdfTransformer.DEFAULT_PDF_RENDERER;
if ((properties != null) &&
properties.containsKey(
IHtmlToPdfTransformer.PDF_R... | [
"private",
"IHtmlToPdfTransformer",
"getTransformer",
"(",
"final",
"Map",
"properties",
")",
"{",
"try",
"{",
"mutex",
".",
"acquire",
"(",
")",
";",
"IHtmlToPdfTransformer",
"transformer",
"=",
"null",
";",
"String",
"rendererClassName",
"=",
"IHtmlToPdfTransforme... | Get a transformer.
@param properties The properties map.
@return a transformer corresponding to the criterias found in
the properties map. | [
"Get",
"a",
"transformer",
"."
] | d72745281766a784a6b319f3787aa1d8de7cd0fe | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/converter/CYaHPConverter.java#L361-L410 |
4,141 | sinofool/alipay-java-sdk | src/main/java/net/sinofool/alipay/base/AbstractAlipay.java | AbstractAlipay.signRSAWithQuote | protected String signRSAWithQuote(final List<StringPair> p) {
String param = join(p, false, true);
String sign = rsaSign(param);
return sign;
} | java | protected String signRSAWithQuote(final List<StringPair> p) {
String param = join(p, false, true);
String sign = rsaSign(param);
return sign;
} | [
"protected",
"String",
"signRSAWithQuote",
"(",
"final",
"List",
"<",
"StringPair",
">",
"p",
")",
"{",
"String",
"param",
"=",
"join",
"(",
"p",
",",
"false",
",",
"true",
")",
";",
"String",
"sign",
"=",
"rsaSign",
"(",
"param",
")",
";",
"return",
... | Mobile SDK join the fields with quote, which is not documented at all.
@param p
@return | [
"Mobile",
"SDK",
"join",
"the",
"fields",
"with",
"quote",
"which",
"is",
"not",
"documented",
"at",
"all",
"."
] | b8bd07915386c8abd005f3d647b82100d966070c | https://github.com/sinofool/alipay-java-sdk/blob/b8bd07915386c8abd005f3d647b82100d966070c/src/main/java/net/sinofool/alipay/base/AbstractAlipay.java#L95-L99 |
4,142 | jdmp/java-data-mining-package | jdmp-core/src/main/java/org/jdmp/core/algorithm/AbstractAlgorithm.java | AbstractAlgorithm.calculateObjects | public Map<String, Object> calculateObjects(Map<String, Object> objects) {
Map<String, Object> result = new HashMap<String, Object>();
return result;
} | java | public Map<String, Object> calculateObjects(Map<String, Object> objects) {
Map<String, Object> result = new HashMap<String, Object>();
return result;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"calculateObjects",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"objects",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
... | this is not the best way | [
"this",
"is",
"not",
"the",
"best",
"way"
] | 74e4516b0b7ba8931b71d54d44332e120f675ca9 | https://github.com/jdmp/java-data-mining-package/blob/74e4516b0b7ba8931b71d54d44332e120f675ca9/jdmp-core/src/main/java/org/jdmp/core/algorithm/AbstractAlgorithm.java#L210-L213 |
4,143 | SiftScience/sift-android | sift/src/main/java/siftscience/android/DevicePropertiesCollector.java | DevicePropertiesCollector.existingRootFiles | private List<String> existingRootFiles() {
List<String> filesFound = new ArrayList<>();
for (String path : SU_PATHS) {
if (new File(path).exists()) {
filesFound.add(path);
}
}
return filesFound;
} | java | private List<String> existingRootFiles() {
List<String> filesFound = new ArrayList<>();
for (String path : SU_PATHS) {
if (new File(path).exists()) {
filesFound.add(path);
}
}
return filesFound;
} | [
"private",
"List",
"<",
"String",
">",
"existingRootFiles",
"(",
")",
"{",
"List",
"<",
"String",
">",
"filesFound",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"path",
":",
"SU_PATHS",
")",
"{",
"if",
"(",
"new",
"File",
"(",... | Checks for files that are known to indicate root.
@return - list of such files found | [
"Checks",
"for",
"files",
"that",
"are",
"known",
"to",
"indicate",
"root",
"."
] | 21d6f2144a88bd16fd8f5443adf730865cc8923b | https://github.com/SiftScience/sift-android/blob/21d6f2144a88bd16fd8f5443adf730865cc8923b/sift/src/main/java/siftscience/android/DevicePropertiesCollector.java#L160-L168 |
4,144 | SiftScience/sift-android | sift/src/main/java/siftscience/android/DevicePropertiesCollector.java | DevicePropertiesCollector.existingRootPackages | private List<String> existingRootPackages() {
ArrayList<String> packages = new ArrayList<>();
packages.addAll(Arrays.asList(KNOWN_ROOT_APPS_PACKAGES));
packages.addAll(Arrays.asList(KNOWN_DANGEROUS_APPS_PACKAGES));
packages.addAll(Arrays.asList(KNOWN_ROOT_CLOAKING_PACKAGES));
Pa... | java | private List<String> existingRootPackages() {
ArrayList<String> packages = new ArrayList<>();
packages.addAll(Arrays.asList(KNOWN_ROOT_APPS_PACKAGES));
packages.addAll(Arrays.asList(KNOWN_DANGEROUS_APPS_PACKAGES));
packages.addAll(Arrays.asList(KNOWN_ROOT_CLOAKING_PACKAGES));
Pa... | [
"private",
"List",
"<",
"String",
">",
"existingRootPackages",
"(",
")",
"{",
"ArrayList",
"<",
"String",
">",
"packages",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"packages",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
"KNOWN_ROOT_APPS_PACKAGES",... | Checks for packages that are known to indicate root.
@return - list of such packages found | [
"Checks",
"for",
"packages",
"that",
"are",
"known",
"to",
"indicate",
"root",
"."
] | 21d6f2144a88bd16fd8f5443adf730865cc8923b | https://github.com/SiftScience/sift-android/blob/21d6f2144a88bd16fd8f5443adf730865cc8923b/sift/src/main/java/siftscience/android/DevicePropertiesCollector.java#L174-L193 |
4,145 | SiftScience/sift-android | sift/src/main/java/siftscience/android/DevicePropertiesCollector.java | DevicePropertiesCollector.existingDangerousProperties | private List<String> existingDangerousProperties() {
String[] lines = propertiesReader();
List<String> propertiesFound = new ArrayList<>();
for (String line : lines) {
for (String key : DANGEROUS_PROPERTIES.keySet()) {
if (line.contains(key) && line.contains(DANGEROUS... | java | private List<String> existingDangerousProperties() {
String[] lines = propertiesReader();
List<String> propertiesFound = new ArrayList<>();
for (String line : lines) {
for (String key : DANGEROUS_PROPERTIES.keySet()) {
if (line.contains(key) && line.contains(DANGEROUS... | [
"private",
"List",
"<",
"String",
">",
"existingDangerousProperties",
"(",
")",
"{",
"String",
"[",
"]",
"lines",
"=",
"propertiesReader",
"(",
")",
";",
"List",
"<",
"String",
">",
"propertiesFound",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
... | Checks system properties for any dangerous properties that indicate root.
@return - list of dangerous properties that indicate root | [
"Checks",
"system",
"properties",
"for",
"any",
"dangerous",
"properties",
"that",
"indicate",
"root",
"."
] | 21d6f2144a88bd16fd8f5443adf730865cc8923b | https://github.com/SiftScience/sift-android/blob/21d6f2144a88bd16fd8f5443adf730865cc8923b/sift/src/main/java/siftscience/android/DevicePropertiesCollector.java#L199-L210 |
4,146 | SiftScience/sift-android | sift/src/main/java/siftscience/android/DevicePropertiesCollector.java | DevicePropertiesCollector.existingRWPaths | private List<String> existingRWPaths() {
String[] lines = mountReader();
List<String> pathsFound = new ArrayList<>();
for (String line : lines) {
// Split lines into parts
String[] args = line.split(" ");
if (args.length < 4){
// If we don't ha... | java | private List<String> existingRWPaths() {
String[] lines = mountReader();
List<String> pathsFound = new ArrayList<>();
for (String line : lines) {
// Split lines into parts
String[] args = line.split(" ");
if (args.length < 4){
// If we don't ha... | [
"private",
"List",
"<",
"String",
">",
"existingRWPaths",
"(",
")",
"{",
"String",
"[",
"]",
"lines",
"=",
"mountReader",
"(",
")",
";",
"List",
"<",
"String",
">",
"pathsFound",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"li... | When you're root you can change the write permissions on common system directories.
This method checks if any of the paths in PATHS_THAT_SHOULD_NOT_BE_WRITABLE are writable.
@return all paths that are writable | [
"When",
"you",
"re",
"root",
"you",
"can",
"change",
"the",
"write",
"permissions",
"on",
"common",
"system",
"directories",
".",
"This",
"method",
"checks",
"if",
"any",
"of",
"the",
"paths",
"in",
"PATHS_THAT_SHOULD_NOT_BE_WRITABLE",
"are",
"writable",
"."
] | 21d6f2144a88bd16fd8f5443adf730865cc8923b | https://github.com/SiftScience/sift-android/blob/21d6f2144a88bd16fd8f5443adf730865cc8923b/sift/src/main/java/siftscience/android/DevicePropertiesCollector.java#L217-L244 |
4,147 | SiftScience/sift-android | sift/src/main/java/siftscience/android/Uploader.java | Uploader.makeRequest | @Nullable
private Request makeRequest(List<MobileEventJson> batch) throws IOException {
if (batch.isEmpty()) {
return null;
}
Sift.Config config = configProvider.getConfig();
if (config == null) {
Log.d(TAG, "Missing Sift.Config object");
return ... | java | @Nullable
private Request makeRequest(List<MobileEventJson> batch) throws IOException {
if (batch.isEmpty()) {
return null;
}
Sift.Config config = configProvider.getConfig();
if (config == null) {
Log.d(TAG, "Missing Sift.Config object");
return ... | [
"@",
"Nullable",
"private",
"Request",
"makeRequest",
"(",
"List",
"<",
"MobileEventJson",
">",
"batch",
")",
"throws",
"IOException",
"{",
"if",
"(",
"batch",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"Sift",
".",
"Config",
"config... | Builds a Request for the specified event batch | [
"Builds",
"a",
"Request",
"for",
"the",
"specified",
"event",
"batch"
] | 21d6f2144a88bd16fd8f5443adf730865cc8923b | https://github.com/SiftScience/sift-android/blob/21d6f2144a88bd16fd8f5443adf730865cc8923b/sift/src/main/java/siftscience/android/Uploader.java#L129-L180 |
4,148 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java | AbstractListHolder.getList | @Override
public List<T> getList() {
if (isCacheEnabled) {
if (cachedResult == null) {
cachedResult = makeUnmodifiableUniqueList();
}
return cachedResult;
} else {
return makeUnmodifiableUniqueList();
}
} | java | @Override
public List<T> getList() {
if (isCacheEnabled) {
if (cachedResult == null) {
cachedResult = makeUnmodifiableUniqueList();
}
return cachedResult;
} else {
return makeUnmodifiableUniqueList();
}
} | [
"@",
"Override",
"public",
"List",
"<",
"T",
">",
"getList",
"(",
")",
"{",
"if",
"(",
"isCacheEnabled",
")",
"{",
"if",
"(",
"cachedResult",
"==",
"null",
")",
"{",
"cachedResult",
"=",
"makeUnmodifiableUniqueList",
"(",
")",
";",
"}",
"return",
"cached... | Returns the list that this ListHolder backs. | [
"Returns",
"the",
"list",
"that",
"this",
"ListHolder",
"backs",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java#L80-L90 |
4,149 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java | AbstractListHolder.makeUnmodifiableUniqueList | private List<T> makeUnmodifiableUniqueList() {
Set<T> tmp = newHashSet();
List<T> uniques = newArrayList();
for (T t : getIterable()) {
if (tmp.add(t)) {
uniques.add(t);
}
}
sort(uniques);
return unmodifiableList(uniques);
} | java | private List<T> makeUnmodifiableUniqueList() {
Set<T> tmp = newHashSet();
List<T> uniques = newArrayList();
for (T t : getIterable()) {
if (tmp.add(t)) {
uniques.add(t);
}
}
sort(uniques);
return unmodifiableList(uniques);
} | [
"private",
"List",
"<",
"T",
">",
"makeUnmodifiableUniqueList",
"(",
")",
"{",
"Set",
"<",
"T",
">",
"tmp",
"=",
"newHashSet",
"(",
")",
";",
"List",
"<",
"T",
">",
"uniques",
"=",
"newArrayList",
"(",
")",
";",
"for",
"(",
"T",
"t",
":",
"getItera... | remove duplication if any | [
"remove",
"duplication",
"if",
"any"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java#L93-L104 |
4,150 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java | AbstractListHolder.getSubList | public List<T> getSubList(int maxSubListSize) {
List<T> subList = newArrayList();
int counter = 0;
for (T t : getList()) {
if (counter++ < maxSubListSize) {
subList.add(t);
} else {
break;
}
}
return subList;
... | java | public List<T> getSubList(int maxSubListSize) {
List<T> subList = newArrayList();
int counter = 0;
for (T t : getList()) {
if (counter++ < maxSubListSize) {
subList.add(t);
} else {
break;
}
}
return subList;
... | [
"public",
"List",
"<",
"T",
">",
"getSubList",
"(",
"int",
"maxSubListSize",
")",
"{",
"List",
"<",
"T",
">",
"subList",
"=",
"newArrayList",
"(",
")",
";",
"int",
"counter",
"=",
"0",
";",
"for",
"(",
"T",
"t",
":",
"getList",
"(",
")",
")",
"{"... | Returns at most the first maxSubListSize elements of this list. | [
"Returns",
"at",
"most",
"the",
"first",
"maxSubListSize",
"elements",
"of",
"this",
"list",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java#L136-L147 |
4,151 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java | AbstractListHolder.except | public SimpleListHolder<T> except(String... namesToExclude) {
String key = "current" + getCacheKey(namesToExclude);
SimpleListHolder<T> result = cache.get(key);
if (result == null) {
result = new SimpleListHolder<T>(getIterable(), asNameNotEqualsToPredicates(namesToExclude), getSortP... | java | public SimpleListHolder<T> except(String... namesToExclude) {
String key = "current" + getCacheKey(namesToExclude);
SimpleListHolder<T> result = cache.get(key);
if (result == null) {
result = new SimpleListHolder<T>(getIterable(), asNameNotEqualsToPredicates(namesToExclude), getSortP... | [
"public",
"SimpleListHolder",
"<",
"T",
">",
"except",
"(",
"String",
"...",
"namesToExclude",
")",
"{",
"String",
"key",
"=",
"\"current\"",
"+",
"getCacheKey",
"(",
"namesToExclude",
")",
";",
"SimpleListHolder",
"<",
"T",
">",
"result",
"=",
"cache",
".",... | Fork this list with extra predicates.
@param namesToExclude the name of the elements to exclude from the list. | [
"Fork",
"this",
"list",
"with",
"extra",
"predicates",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/support/AbstractListHolder.java#L175-L183 |
4,152 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.inputStreamToOutputStream | public int inputStreamToOutputStream(InputStream is, OutputStream os) throws IOException {
byte buffer[] = new byte[1024 * 100]; // 100kb
int len = -1;
int total = 0;
while ((len = is.read(buffer)) >= 0) {
os.write(buffer, 0, len);
total += len;
}
... | java | public int inputStreamToOutputStream(InputStream is, OutputStream os) throws IOException {
byte buffer[] = new byte[1024 * 100]; // 100kb
int len = -1;
int total = 0;
while ((len = is.read(buffer)) >= 0) {
os.write(buffer, 0, len);
total += len;
}
... | [
"public",
"int",
"inputStreamToOutputStream",
"(",
"InputStream",
"is",
",",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"byte",
"buffer",
"[",
"]",
"=",
"new",
"byte",
"[",
"1024",
"*",
"100",
"]",
";",
"// 100kb",
"int",
"len",
"=",
"-",
"... | Write to the outputstream the bytes read from the input stream. | [
"Write",
"to",
"the",
"outputstream",
"the",
"bytes",
"read",
"from",
"the",
"input",
"stream",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L45-L55 |
4,153 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.inputStreamToFile | public void inputStreamToFile(InputStream is, String filename) throws IOException {
FileOutputStream fos = new FileOutputStream(filename);
inputStreamToOutputStream(is, fos);
fos.close();
} | java | public void inputStreamToFile(InputStream is, String filename) throws IOException {
FileOutputStream fos = new FileOutputStream(filename);
inputStreamToOutputStream(is, fos);
fos.close();
} | [
"public",
"void",
"inputStreamToFile",
"(",
"InputStream",
"is",
",",
"String",
"filename",
")",
"throws",
"IOException",
"{",
"FileOutputStream",
"fos",
"=",
"new",
"FileOutputStream",
"(",
"filename",
")",
";",
"inputStreamToOutputStream",
"(",
"is",
",",
"fos",... | Write to a file the bytes read from an input stream.
@param filename the full or relative path to the file. | [
"Write",
"to",
"a",
"file",
"the",
"bytes",
"read",
"from",
"an",
"input",
"stream",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L92-L96 |
4,154 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.inputStreamToString | public String inputStreamToString(InputStream is, String charset) throws IOException {
InputStreamReader isr = null;
if (null == charset) {
isr = new InputStreamReader(is);
} else {
isr = new InputStreamReader(is, charset);
}
StringWriter sw = new StringWr... | java | public String inputStreamToString(InputStream is, String charset) throws IOException {
InputStreamReader isr = null;
if (null == charset) {
isr = new InputStreamReader(is);
} else {
isr = new InputStreamReader(is, charset);
}
StringWriter sw = new StringWr... | [
"public",
"String",
"inputStreamToString",
"(",
"InputStream",
"is",
",",
"String",
"charset",
")",
"throws",
"IOException",
"{",
"InputStreamReader",
"isr",
"=",
"null",
";",
"if",
"(",
"null",
"==",
"charset",
")",
"{",
"isr",
"=",
"new",
"InputStreamReader"... | Write to a string the bytes read from an input stream.
@param charset the charset used to read the input stream
@return the inputstream as a string | [
"Write",
"to",
"a",
"string",
"the",
"bytes",
"read",
"from",
"an",
"input",
"stream",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L124-L138 |
4,155 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.isParentAnEmptyDirectory | public boolean isParentAnEmptyDirectory(File file) {
File parent = file.getParentFile();
if (parent != null && parent.exists() && parent.isDirectory() && parent.list().length == 0) {
return true;
}
return false;
} | java | public boolean isParentAnEmptyDirectory(File file) {
File parent = file.getParentFile();
if (parent != null && parent.exists() && parent.isDirectory() && parent.list().length == 0) {
return true;
}
return false;
} | [
"public",
"boolean",
"isParentAnEmptyDirectory",
"(",
"File",
"file",
")",
"{",
"File",
"parent",
"=",
"file",
".",
"getParentFile",
"(",
")",
";",
"if",
"(",
"parent",
"!=",
"null",
"&&",
"parent",
".",
"exists",
"(",
")",
"&&",
"parent",
".",
"isDirect... | Determine if the directory where the passed file resides is empty.
@param file the folder to remove
@return true if the parent folder is empty, false otherwise | [
"Determine",
"if",
"the",
"directory",
"where",
"the",
"passed",
"file",
"resides",
"is",
"empty",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L169-L177 |
4,156 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.pruneEmptyDirs | public void pruneEmptyDirs(File targetFile) {
while (isParentAnEmptyDirectory(targetFile)) {
try {
targetFile.getParentFile().delete();
targetFile = targetFile.getParentFile();
} catch (Exception e) {
//
}
}
} | java | public void pruneEmptyDirs(File targetFile) {
while (isParentAnEmptyDirectory(targetFile)) {
try {
targetFile.getParentFile().delete();
targetFile = targetFile.getParentFile();
} catch (Exception e) {
//
}
}
} | [
"public",
"void",
"pruneEmptyDirs",
"(",
"File",
"targetFile",
")",
"{",
"while",
"(",
"isParentAnEmptyDirectory",
"(",
"targetFile",
")",
")",
"{",
"try",
"{",
"targetFile",
".",
"getParentFile",
"(",
")",
".",
"delete",
"(",
")",
";",
"targetFile",
"=",
... | prune empty dir
@param targetFile the folder to remove | [
"prune",
"empty",
"dir"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L193-L202 |
4,157 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.listFolders | @SuppressWarnings("unchecked")
public Collection<String> listFolders(File folder) {
IOFileFilter ioFileFilter = FileFilterUtils.makeSVNAware(FileFilterUtils.makeCVSAware(FileFilterUtils.trueFileFilter()));
Collection<File> files = FileUtils.listFiles(folder, FileFilterUtils.fileFileFilter(), ioFileF... | java | @SuppressWarnings("unchecked")
public Collection<String> listFolders(File folder) {
IOFileFilter ioFileFilter = FileFilterUtils.makeSVNAware(FileFilterUtils.makeCVSAware(FileFilterUtils.trueFileFilter()));
Collection<File> files = FileUtils.listFiles(folder, FileFilterUtils.fileFileFilter(), ioFileF... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Collection",
"<",
"String",
">",
"listFolders",
"(",
"File",
"folder",
")",
"{",
"IOFileFilter",
"ioFileFilter",
"=",
"FileFilterUtils",
".",
"makeSVNAware",
"(",
"FileFilterUtils",
".",
"makeCVSAware",
... | Recurse in the folder to get the list all files and folders of all non svn files
@param folder the folder to parse | [
"Recurse",
"in",
"the",
"folder",
"to",
"get",
"the",
"list",
"all",
"files",
"and",
"folders",
"of",
"all",
"non",
"svn",
"files"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L250-L259 |
4,158 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java | IOUtil.forceDelete | public void forceDelete(File tempFile) {
try {
if (tempFile != null && tempFile.exists()) {
FileUtils.forceDelete(tempFile);
}
} catch (Throwable t) {
t.printStackTrace();
}
} | java | public void forceDelete(File tempFile) {
try {
if (tempFile != null && tempFile.exists()) {
FileUtils.forceDelete(tempFile);
}
} catch (Throwable t) {
t.printStackTrace();
}
} | [
"public",
"void",
"forceDelete",
"(",
"File",
"tempFile",
")",
"{",
"try",
"{",
"if",
"(",
"tempFile",
"!=",
"null",
"&&",
"tempFile",
".",
"exists",
"(",
")",
")",
"{",
"FileUtils",
".",
"forceDelete",
"(",
"tempFile",
")",
";",
"}",
"}",
"catch",
"... | force the deletion of a file | [
"force",
"the",
"deletion",
"of",
"a",
"file"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/IOUtil.java#L297-L305 |
4,159 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/support/validation/ValidationAttribute.java | ValidationAttribute.getAnnotations | public List<String> getAnnotations() {
AnnotationBuilder result = new AnnotationBuilder();
result.add( //
getFixedLengthAnnotation(), //
getLengthAnnotation(), //
getNotNullAnnotation(), //
getNotEmptyAnnotation(), //
getCha... | java | public List<String> getAnnotations() {
AnnotationBuilder result = new AnnotationBuilder();
result.add( //
getFixedLengthAnnotation(), //
getLengthAnnotation(), //
getNotNullAnnotation(), //
getNotEmptyAnnotation(), //
getCha... | [
"public",
"List",
"<",
"String",
">",
"getAnnotations",
"(",
")",
"{",
"AnnotationBuilder",
"result",
"=",
"new",
"AnnotationBuilder",
"(",
")",
";",
"result",
".",
"add",
"(",
"//",
"getFixedLengthAnnotation",
"(",
")",
",",
"//",
"getLengthAnnotation",
"(",
... | Returns all the validation annotations for the attribute. Imports are processed automatically. | [
"Returns",
"all",
"the",
"validation",
"annotations",
"for",
"the",
"attribute",
".",
"Imports",
"are",
"processed",
"automatically",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/support/validation/ValidationAttribute.java#L52-L65 |
4,160 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/template/PreviousEngine.java | PreviousEngine.convertFileNameToBaseClassName | private String convertFileNameToBaseClassName(String filename) {
if (filename.endsWith("_.java")) {
return substringBeforeLast(filename, "_.java") + BASE_SUFFIX_;
} else {
return substringBeforeLast(filename, ".java") + BASE_SUFFIX;
}
} | java | private String convertFileNameToBaseClassName(String filename) {
if (filename.endsWith("_.java")) {
return substringBeforeLast(filename, "_.java") + BASE_SUFFIX_;
} else {
return substringBeforeLast(filename, ".java") + BASE_SUFFIX;
}
} | [
"private",
"String",
"convertFileNameToBaseClassName",
"(",
"String",
"filename",
")",
"{",
"if",
"(",
"filename",
".",
"endsWith",
"(",
"\"_.java\"",
")",
")",
"{",
"return",
"substringBeforeLast",
"(",
"filename",
",",
"\"_.java\"",
")",
"+",
"BASE_SUFFIX_",
"... | add Base to a given java filename it is used for transparently subclassing generated classes | [
"add",
"Base",
"to",
"a",
"given",
"java",
"filename",
"it",
"is",
"used",
"for",
"transparently",
"subclassing",
"generated",
"classes"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/template/PreviousEngine.java#L303-L309 |
4,161 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/template/ContentWriter.java | ContentWriter.getFullPathForLog | private String getFullPathForLog(OutputResult or, String targetFilename) {
if (or.sameDirectory()) {
return targetFilename;
} else {
return or.getGeneratedSource().getFullPath(targetFilename);
}
} | java | private String getFullPathForLog(OutputResult or, String targetFilename) {
if (or.sameDirectory()) {
return targetFilename;
} else {
return or.getGeneratedSource().getFullPath(targetFilename);
}
} | [
"private",
"String",
"getFullPathForLog",
"(",
"OutputResult",
"or",
",",
"String",
"targetFilename",
")",
"{",
"if",
"(",
"or",
".",
"sameDirectory",
"(",
")",
")",
"{",
"return",
"targetFilename",
";",
"}",
"else",
"{",
"return",
"or",
".",
"getGeneratedSo... | Use it only to display proper path in log
@param targetFilename | [
"Use",
"it",
"only",
"to",
"display",
"proper",
"path",
"in",
"log"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/template/ContentWriter.java#L109-L115 |
4,162 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/factory/EntityFactory.java | EntityFactory.buildSimpleEntity | private void buildSimpleEntity(EntityConfig entityConfig, Entity entity) {
Table table = entity.getTable();
// 1st phase: process all column and look for corresponding columnConfig
for (Column column : table.getColumns()) {
boolean processed = processColumnUsingColumnConfigIfAny(ent... | java | private void buildSimpleEntity(EntityConfig entityConfig, Entity entity) {
Table table = entity.getTable();
// 1st phase: process all column and look for corresponding columnConfig
for (Column column : table.getColumns()) {
boolean processed = processColumnUsingColumnConfigIfAny(ent... | [
"private",
"void",
"buildSimpleEntity",
"(",
"EntityConfig",
"entityConfig",
",",
"Entity",
"entity",
")",
"{",
"Table",
"table",
"=",
"entity",
".",
"getTable",
"(",
")",
";",
"// 1st phase: process all column and look for corresponding columnConfig",
"for",
"(",
"Colu... | Build simple entity using user configuration | [
"Build",
"simple",
"entity",
"using",
"user",
"configuration"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/factory/EntityFactory.java#L103-L118 |
4,163 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/factory/EntityFactory.java | EntityFactory.namerDefault | private void namerDefault(Entity entity) {
entity.put("searchForm", new ClassNamer2(entity, null, "web.domain", null, "SearchForm"));
entity.put("editForm", new ClassNamer2(entity, null, "web.domain", null, "EditForm"));
entity.put("graphLoader", new ClassNamer2(entity, null, "web.domain", null,... | java | private void namerDefault(Entity entity) {
entity.put("searchForm", new ClassNamer2(entity, null, "web.domain", null, "SearchForm"));
entity.put("editForm", new ClassNamer2(entity, null, "web.domain", null, "EditForm"));
entity.put("graphLoader", new ClassNamer2(entity, null, "web.domain", null,... | [
"private",
"void",
"namerDefault",
"(",
"Entity",
"entity",
")",
"{",
"entity",
".",
"put",
"(",
"\"searchForm\"",
",",
"new",
"ClassNamer2",
"(",
"entity",
",",
"null",
",",
"\"web.domain\"",
",",
"null",
",",
"\"SearchForm\"",
")",
")",
";",
"entity",
".... | Namers declared here can be overridden easily through configuration.
@param entity | [
"Namers",
"declared",
"here",
"can",
"be",
"overridden",
"easily",
"through",
"configuration",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/factory/EntityFactory.java#L246-L255 |
4,164 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.toReadablePluralLabel | public static String toReadablePluralLabel(String value) {
String label = toReadableLabel(value);
return label.endsWith("ss") ? label.substring(0, label.length() - 1) : label;
} | java | public static String toReadablePluralLabel(String value) {
String label = toReadableLabel(value);
return label.endsWith("ss") ? label.substring(0, label.length() - 1) : label;
} | [
"public",
"static",
"String",
"toReadablePluralLabel",
"(",
"String",
"value",
")",
"{",
"String",
"label",
"=",
"toReadableLabel",
"(",
"value",
")",
";",
"return",
"label",
".",
"endsWith",
"(",
"\"ss\"",
")",
"?",
"label",
".",
"substring",
"(",
"0",
",... | Convert strings such as "banquePayss" to "Banque Pays" it will remove trailing ss and replace them with s | [
"Convert",
"strings",
"such",
"as",
"banquePayss",
"to",
"Banque",
"Pays",
"it",
"will",
"remove",
"trailing",
"ss",
"and",
"replace",
"them",
"with",
"s"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L120-L123 |
4,165 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.toReadableLabel | public static String toReadableLabel(String value) {
StringBuilder ret = new StringBuilder();
char lastChar = 'x';
for (int i = 0; i < value.length(); i++) {
char currentChar = value.charAt(i);
// we are the begining of the output
// or the last char was a spa... | java | public static String toReadableLabel(String value) {
StringBuilder ret = new StringBuilder();
char lastChar = 'x';
for (int i = 0; i < value.length(); i++) {
char currentChar = value.charAt(i);
// we are the begining of the output
// or the last char was a spa... | [
"public",
"static",
"String",
"toReadableLabel",
"(",
"String",
"value",
")",
"{",
"StringBuilder",
"ret",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"char",
"lastChar",
"=",
"'",
"'",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"value",
"... | Convert strings such as bankAccountSummary to "Bank Account Summary" | [
"Convert",
"strings",
"such",
"as",
"bankAccountSummary",
"to",
"Bank",
"Account",
"Summary"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L128-L157 |
4,166 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.endsWithIgnoreCase | public static boolean endsWithIgnoreCase(String name, Iterable<String> patterns) {
String nameUpper = name.toUpperCase();
for (String pattern : patterns) {
String patternUpper = pattern.toUpperCase();
if (nameUpper.equals(patternUpper) || nameUpper.endsWith(patternUpper)) {
... | java | public static boolean endsWithIgnoreCase(String name, Iterable<String> patterns) {
String nameUpper = name.toUpperCase();
for (String pattern : patterns) {
String patternUpper = pattern.toUpperCase();
if (nameUpper.equals(patternUpper) || nameUpper.endsWith(patternUpper)) {
... | [
"public",
"static",
"boolean",
"endsWithIgnoreCase",
"(",
"String",
"name",
",",
"Iterable",
"<",
"String",
">",
"patterns",
")",
"{",
"String",
"nameUpper",
"=",
"name",
".",
"toUpperCase",
"(",
")",
";",
"for",
"(",
"String",
"pattern",
":",
"patterns",
... | Does the given column name ends with one of pattern given in parameter. Not case sensitive | [
"Does",
"the",
"given",
"column",
"name",
"ends",
"with",
"one",
"of",
"pattern",
"given",
"in",
"parameter",
".",
"Not",
"case",
"sensitive"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L162-L172 |
4,167 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.startsWithIgnoreCase | public static boolean startsWithIgnoreCase(String name, Iterable<String> patterns) {
String nameUpper = name.toUpperCase();
for (String pattern : patterns) {
String patternUpper = pattern.toUpperCase();
if (nameUpper.equals(patternUpper) || nameUpper.startsWith(patternUpper)) {
... | java | public static boolean startsWithIgnoreCase(String name, Iterable<String> patterns) {
String nameUpper = name.toUpperCase();
for (String pattern : patterns) {
String patternUpper = pattern.toUpperCase();
if (nameUpper.equals(patternUpper) || nameUpper.startsWith(patternUpper)) {
... | [
"public",
"static",
"boolean",
"startsWithIgnoreCase",
"(",
"String",
"name",
",",
"Iterable",
"<",
"String",
">",
"patterns",
")",
"{",
"String",
"nameUpper",
"=",
"name",
".",
"toUpperCase",
"(",
")",
";",
"for",
"(",
"String",
"pattern",
":",
"patterns",
... | Does the given column name starts with one of pattern given in parameter Not case sensitive | [
"Does",
"the",
"given",
"column",
"name",
"starts",
"with",
"one",
"of",
"pattern",
"given",
"in",
"parameter",
"Not",
"case",
"sensitive"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L177-L187 |
4,168 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.contains | public static boolean contains(String name, Iterable<String> patterns) {
String nameUpper = name.toUpperCase();
for (String pattern : patterns) {
String patternUpper = pattern.toUpperCase();
if (nameUpper.equals(patternUpper) || nameUpper.contains(patternUpper)) {
... | java | public static boolean contains(String name, Iterable<String> patterns) {
String nameUpper = name.toUpperCase();
for (String pattern : patterns) {
String patternUpper = pattern.toUpperCase();
if (nameUpper.equals(patternUpper) || nameUpper.contains(patternUpper)) {
... | [
"public",
"static",
"boolean",
"contains",
"(",
"String",
"name",
",",
"Iterable",
"<",
"String",
">",
"patterns",
")",
"{",
"String",
"nameUpper",
"=",
"name",
".",
"toUpperCase",
"(",
")",
";",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{"... | Does the given column name contains one of pattern given in parameter Not case sensitive | [
"Does",
"the",
"given",
"column",
"name",
"contains",
"one",
"of",
"pattern",
"given",
"in",
"parameter",
"Not",
"case",
"sensitive"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L192-L202 |
4,169 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.equalsIgnoreCase | public static boolean equalsIgnoreCase(String name, Iterable<String> patterns) {
for (String pattern : patterns) {
if (name.equalsIgnoreCase(pattern)) {
return true;
}
}
return false;
} | java | public static boolean equalsIgnoreCase(String name, Iterable<String> patterns) {
for (String pattern : patterns) {
if (name.equalsIgnoreCase(pattern)) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"equalsIgnoreCase",
"(",
"String",
"name",
",",
"Iterable",
"<",
"String",
">",
"patterns",
")",
"{",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"name",
".",
"equalsIgnoreCase",
"(",
"pattern",
")"... | Does the given column name equals ignore case with one of pattern given in parameter
@param name the column
@param patterns table of patterns as strings
@return true if the column name equals ignore case with one of the given patterns, false otherwise | [
"Does",
"the",
"given",
"column",
"name",
"equals",
"ignore",
"case",
"with",
"one",
"of",
"pattern",
"given",
"in",
"parameter"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L211-L219 |
4,170 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java | MiscUtil.isUniCase | public static boolean isUniCase(String value) {
if (value.toLowerCase().equals(value) || value.toUpperCase().equals(value)) {
return true;
}
return false;
} | java | public static boolean isUniCase(String value) {
if (value.toLowerCase().equals(value) || value.toUpperCase().equals(value)) {
return true;
}
return false;
} | [
"public",
"static",
"boolean",
"isUniCase",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"value",
".",
"toLowerCase",
"(",
")",
".",
"equals",
"(",
"value",
")",
"||",
"value",
".",
"toUpperCase",
"(",
")",
".",
"equals",
"(",
"value",
")",
")",
"{",... | Return true if the passed value is all lower or all upper case. | [
"Return",
"true",
"if",
"the",
"passed",
"value",
"is",
"all",
"lower",
"or",
"all",
"upper",
"case",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/util/MiscUtil.java#L224-L229 |
4,171 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/unique/CompositeUnique.java | CompositeUnique.getName | @Override
public String getName() {
if (name == null) {
return null;
}
if (name.endsWith("_INDEX_2")) {
return removeEnd(name, "_INDEX_2");
}
return name;
} | java | @Override
public String getName() {
if (name == null) {
return null;
}
if (name.endsWith("_INDEX_2")) {
return removeEnd(name, "_INDEX_2");
}
return name;
} | [
"@",
"Override",
"public",
"String",
"getName",
"(",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"name",
".",
"endsWith",
"(",
"\"_INDEX_2\"",
")",
")",
"{",
"return",
"removeEnd",
"(",
"name",
",",
"... | H2 does append _INDEX_2 to unique constraints names | [
"H2",
"does",
"append",
"_INDEX_2",
"to",
"unique",
"constraints",
"names"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/unique/CompositeUnique.java#L63-L72 |
4,172 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/template/TemplateExecution.java | TemplateExecution.require | public void require(Namer packageNamer, Namer classNamer) {
requireFirstTime(packageNamer.getPackageName() + "." + classNamer.getType());
} | java | public void require(Namer packageNamer, Namer classNamer) {
requireFirstTime(packageNamer.getPackageName() + "." + classNamer.getType());
} | [
"public",
"void",
"require",
"(",
"Namer",
"packageNamer",
",",
"Namer",
"classNamer",
")",
"{",
"requireFirstTime",
"(",
"packageNamer",
".",
"getPackageName",
"(",
")",
"+",
"\".\"",
"+",
"classNamer",
".",
"getType",
"(",
")",
")",
";",
"}"
] | Import the passed classNamer's type present in the passed packageNamer's package name. | [
"Import",
"the",
"passed",
"classNamer",
"s",
"type",
"present",
"in",
"the",
"passed",
"packageNamer",
"s",
"package",
"name",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/template/TemplateExecution.java#L434-L436 |
4,173 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/template/TemplateExecution.java | TemplateExecution.requireFirstTime | public boolean requireFirstTime(Attribute attribute) {
if (!attribute.isJavaBaseClass()) {
return ImportsContext.getCurrentImportsHolder().add(attribute.getFullType());
}
return false;
} | java | public boolean requireFirstTime(Attribute attribute) {
if (!attribute.isJavaBaseClass()) {
return ImportsContext.getCurrentImportsHolder().add(attribute.getFullType());
}
return false;
} | [
"public",
"boolean",
"requireFirstTime",
"(",
"Attribute",
"attribute",
")",
"{",
"if",
"(",
"!",
"attribute",
".",
"isJavaBaseClass",
"(",
")",
")",
"{",
"return",
"ImportsContext",
".",
"getCurrentImportsHolder",
"(",
")",
".",
"add",
"(",
"attribute",
".",
... | Import the passed attribute type.
@return true if the passed attribute type is imported for the first time. | [
"Import",
"the",
"passed",
"attribute",
"type",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/template/TemplateExecution.java#L489-L494 |
4,174 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/support/custom/CustomAttribute.java | CustomAttribute.getAnnotations | public List<String> getAnnotations() {
if (attribute.getColumnConfig().getCustomAnnotations() == null) {
return newArrayList();
}
AnnotationBuilder builder = new AnnotationBuilder();
for (CustomAnnotation ca : attribute.getColumnConfig().getCustomAnnotations()) {
... | java | public List<String> getAnnotations() {
if (attribute.getColumnConfig().getCustomAnnotations() == null) {
return newArrayList();
}
AnnotationBuilder builder = new AnnotationBuilder();
for (CustomAnnotation ca : attribute.getColumnConfig().getCustomAnnotations()) {
... | [
"public",
"List",
"<",
"String",
">",
"getAnnotations",
"(",
")",
"{",
"if",
"(",
"attribute",
".",
"getColumnConfig",
"(",
")",
".",
"getCustomAnnotations",
"(",
")",
"==",
"null",
")",
"{",
"return",
"newArrayList",
"(",
")",
";",
"}",
"AnnotationBuilder... | Return the custom annotations declared in the configuration. | [
"Return",
"the",
"custom",
"annotations",
"declared",
"in",
"the",
"configuration",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/support/custom/CustomAttribute.java#L44-L55 |
4,175 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/support/validation/ValidationRelation.java | ValidationRelation.getNotNullAnnotation | public String getNotNullAnnotation() {
if (!relation.isManyToOne() && !relation.isOneToOne()) {
return "";
}
if (relation.isMandatory() && !relation.hasInverse()) {
if (relation.getFromEntity().getName().equals(relation.getToEntity().getName())) {
// TODO... | java | public String getNotNullAnnotation() {
if (!relation.isManyToOne() && !relation.isOneToOne()) {
return "";
}
if (relation.isMandatory() && !relation.hasInverse()) {
if (relation.getFromEntity().getName().equals(relation.getToEntity().getName())) {
// TODO... | [
"public",
"String",
"getNotNullAnnotation",
"(",
")",
"{",
"if",
"(",
"!",
"relation",
".",
"isManyToOne",
"(",
")",
"&&",
"!",
"relation",
".",
"isOneToOne",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"if",
"(",
"relation",
".",
"isMandatory",
"(... | Applies only to ManyToOne or OneToOne.
When x to one has an inverse relation, we never mark it as @NotNull
as it would break navigation (indeed, the mandatory value is set transparently once the entity is added to the collection)
However, in test (XxxGenerator), we must take mandatory into account... | [
"Applies",
"only",
"to",
"ManyToOne",
"or",
"OneToOne",
".",
"When",
"x",
"to",
"one",
"has",
"an",
"inverse",
"relation",
"we",
"never",
"mark",
"it",
"as"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/support/validation/ValidationRelation.java#L69-L91 |
4,176 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/factory/RelationCollisionUtil.java | RelationCollisionUtil.removeVar | public void removeVar(String entityType, String attributeVar) {
fullVars.remove(clashKey(entityType, attributeVar));
} | java | public void removeVar(String entityType, String attributeVar) {
fullVars.remove(clashKey(entityType, attributeVar));
} | [
"public",
"void",
"removeVar",
"(",
"String",
"entityType",
",",
"String",
"attributeVar",
")",
"{",
"fullVars",
".",
"remove",
"(",
"clashKey",
"(",
"entityType",
",",
"attributeVar",
")",
")",
";",
"}"
] | During construction, we may free a var. | [
"During",
"construction",
"we",
"may",
"free",
"a",
"var",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/factory/RelationCollisionUtil.java#L46-L48 |
4,177 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/factory/RelationCollisionUtil.java | RelationCollisionUtil.getManyToManyNamer | public Namer getManyToManyNamer(Namer fromEntityNamer, ColumnConfig pointsOnToEntity, Namer toEntityNamer) {
// new configuration
Namer result = getManyToManyNamerFromConf(pointsOnToEntity.getManyToManyConfig(), toEntityNamer);
// fallback
if (result == null) {
result = get... | java | public Namer getManyToManyNamer(Namer fromEntityNamer, ColumnConfig pointsOnToEntity, Namer toEntityNamer) {
// new configuration
Namer result = getManyToManyNamerFromConf(pointsOnToEntity.getManyToManyConfig(), toEntityNamer);
// fallback
if (result == null) {
result = get... | [
"public",
"Namer",
"getManyToManyNamer",
"(",
"Namer",
"fromEntityNamer",
",",
"ColumnConfig",
"pointsOnToEntity",
",",
"Namer",
"toEntityNamer",
")",
"{",
"// new configuration",
"Namer",
"result",
"=",
"getManyToManyNamerFromConf",
"(",
"pointsOnToEntity",
".",
"getMany... | Compute the appropriate namer for the Java field marked by @ManyToMany | [
"Compute",
"the",
"appropriate",
"namer",
"for",
"the",
"Java",
"field",
"marked",
"by"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/factory/RelationCollisionUtil.java#L89-L100 |
4,178 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/template/pack/LocalResourcePackFile.java | LocalResourcePackFile.getAsByteArray | private byte[] getAsByteArray(String template) throws IOException {
if (isTemplateGivenAsAnAbsoluteFile(template)) {
throw new IllegalArgumentException("Template " + template + " should not be given as an absolute file");
}
if (!containsTemplate(template)) {
throw new Ill... | java | private byte[] getAsByteArray(String template) throws IOException {
if (isTemplateGivenAsAnAbsoluteFile(template)) {
throw new IllegalArgumentException("Template " + template + " should not be given as an absolute file");
}
if (!containsTemplate(template)) {
throw new Ill... | [
"private",
"byte",
"[",
"]",
"getAsByteArray",
"(",
"String",
"template",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isTemplateGivenAsAnAbsoluteFile",
"(",
"template",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Template \"",
"+",
"templ... | Extract a template from the jar as a byte array | [
"Extract",
"a",
"template",
"from",
"the",
"jar",
"as",
"a",
"byte",
"array"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/template/pack/LocalResourcePackFile.java#L96-L110 |
4,179 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/support/jpa/JpaManyToManyRelation.java | JpaManyToManyRelation.getSpecificJoinFetchAnnotation | private String getSpecificJoinFetchAnnotation() {
List<Relation> manyToManyRelations = relation.getToEntity().getManyToMany().getList();
// we have only on many-to-many ? No problem, move on
if (manyToManyRelations.size() <= 1) {
return null;
}
// we have many many to... | java | private String getSpecificJoinFetchAnnotation() {
List<Relation> manyToManyRelations = relation.getToEntity().getManyToMany().getList();
// we have only on many-to-many ? No problem, move on
if (manyToManyRelations.size() <= 1) {
return null;
}
// we have many many to... | [
"private",
"String",
"getSpecificJoinFetchAnnotation",
"(",
")",
"{",
"List",
"<",
"Relation",
">",
"manyToManyRelations",
"=",
"relation",
".",
"getToEntity",
"(",
")",
".",
"getManyToMany",
"(",
")",
".",
"getList",
"(",
")",
";",
"// we have only on many-to-man... | When you have multiple eager bags you need to specify how you want to make them eager. | [
"When",
"you",
"have",
"multiple",
"eager",
"bags",
"you",
"need",
"to",
"specify",
"how",
"you",
"want",
"to",
"make",
"them",
"eager",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/support/jpa/JpaManyToManyRelation.java#L138-L154 |
4,180 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/Project.java | Project.putEntity | public void putEntity(Entity entity) {
Assert.isTrue(entity.hasTableName(), "Expecting a table name for the entity: " + entity.getName());
Assert.isTrue(!hasEntityBySchemaAndTableName(entity.getTable().getSchemaName(), entity.getTable().getName()), "Entity was already added!: " + entity.getTableName());... | java | public void putEntity(Entity entity) {
Assert.isTrue(entity.hasTableName(), "Expecting a table name for the entity: " + entity.getName());
Assert.isTrue(!hasEntityBySchemaAndTableName(entity.getTable().getSchemaName(), entity.getTable().getName()), "Entity was already added!: " + entity.getTableName());... | [
"public",
"void",
"putEntity",
"(",
"Entity",
"entity",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"entity",
".",
"hasTableName",
"(",
")",
",",
"\"Expecting a table name for the entity: \"",
"+",
"entity",
".",
"getName",
"(",
")",
")",
";",
"Assert",
".",
"is... | Store 1 entity per table name. In case of inheritance you must pass the root entity only. | [
"Store",
"1",
"entity",
"per",
"table",
"name",
".",
"In",
"case",
"of",
"inheritance",
"you",
"must",
"pass",
"the",
"root",
"entity",
"only",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/Project.java#L130-L135 |
4,181 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/Project.java | Project.getEntityBySchemaAndTableName | public Entity getEntityBySchemaAndTableName(String schemaName, String tableName) {
return currentEntitiesBySchemaAndTableName.get(Table.keyForMap(schemaName, tableName));
} | java | public Entity getEntityBySchemaAndTableName(String schemaName, String tableName) {
return currentEntitiesBySchemaAndTableName.get(Table.keyForMap(schemaName, tableName));
} | [
"public",
"Entity",
"getEntityBySchemaAndTableName",
"(",
"String",
"schemaName",
",",
"String",
"tableName",
")",
"{",
"return",
"currentEntitiesBySchemaAndTableName",
".",
"get",
"(",
"Table",
".",
"keyForMap",
"(",
"schemaName",
",",
"tableName",
")",
")",
";",
... | Return the entity corresponding to the passed table. In case of inheritance, the root entity is returned. | [
"Return",
"the",
"entity",
"corresponding",
"to",
"the",
"passed",
"table",
".",
"In",
"case",
"of",
"inheritance",
"the",
"root",
"entity",
"is",
"returned",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/Project.java#L151-L153 |
4,182 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/ConfigurationCheck.java | ConfigurationCheck.checkForeignKeyMapping | private void checkForeignKeyMapping(List<String> errors, Config config) {
for (Entity entity : config.getProject().getEntities().getList()) {
for (Relation relation : entity.getRelations().getList()) {
if (relation.isInverse() || relation.isIntermediate()) {
conti... | java | private void checkForeignKeyMapping(List<String> errors, Config config) {
for (Entity entity : config.getProject().getEntities().getList()) {
for (Relation relation : entity.getRelations().getList()) {
if (relation.isInverse() || relation.isIntermediate()) {
conti... | [
"private",
"void",
"checkForeignKeyMapping",
"(",
"List",
"<",
"String",
">",
"errors",
",",
"Config",
"config",
")",
"{",
"for",
"(",
"Entity",
"entity",
":",
"config",
".",
"getProject",
"(",
")",
".",
"getEntities",
"(",
")",
".",
"getList",
"(",
")",... | Check that foreign keys have the same mapped type as the target. | [
"Check",
"that",
"foreign",
"keys",
"have",
"the",
"same",
"mapped",
"type",
"as",
"the",
"target",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/ConfigurationCheck.java#L91-L114 |
4,183 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/ConfigurationCheck.java | ConfigurationCheck.checkVersionOnJoinedInheritance | private void checkVersionOnJoinedInheritance(List<String> errors, Config config) {
for (Entity entity : config.getProject().getRootEntities().getList()) {
if (entity.hasInheritance() && entity.getInheritance().is(JOINED)) {
for (Entity child : entity.getAllChildrenRecursive()) {
... | java | private void checkVersionOnJoinedInheritance(List<String> errors, Config config) {
for (Entity entity : config.getProject().getRootEntities().getList()) {
if (entity.hasInheritance() && entity.getInheritance().is(JOINED)) {
for (Entity child : entity.getAllChildrenRecursive()) {
... | [
"private",
"void",
"checkVersionOnJoinedInheritance",
"(",
"List",
"<",
"String",
">",
"errors",
",",
"Config",
"config",
")",
"{",
"for",
"(",
"Entity",
"entity",
":",
"config",
".",
"getProject",
"(",
")",
".",
"getRootEntities",
"(",
")",
".",
"getList",
... | In case of JOINED inheritance we may have added some columns that are in the table but that are not in the entityConfigs. We check here that we have not
added a version column in a child.
@param errors
@param config | [
"In",
"case",
"of",
"JOINED",
"inheritance",
"we",
"may",
"have",
"added",
"some",
"columns",
"that",
"are",
"in",
"the",
"table",
"but",
"that",
"are",
"not",
"in",
"the",
"entityConfigs",
".",
"We",
"check",
"here",
"that",
"we",
"have",
"not",
"added"... | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/ConfigurationCheck.java#L123-L136 |
4,184 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/support/search/SearchAttribute.java | SearchAttribute.getAnnotations | public List<String> getAnnotations() {
AnnotationBuilder annotations = new AnnotationBuilder();
annotations.add( //
getFieldAnnotation(), //
getFieldBridgeAnnotation(), //
getTikaBridgeAnnotation());
return annotations.getAnnotations();
} | java | public List<String> getAnnotations() {
AnnotationBuilder annotations = new AnnotationBuilder();
annotations.add( //
getFieldAnnotation(), //
getFieldBridgeAnnotation(), //
getTikaBridgeAnnotation());
return annotations.getAnnotations();
} | [
"public",
"List",
"<",
"String",
">",
"getAnnotations",
"(",
")",
"{",
"AnnotationBuilder",
"annotations",
"=",
"new",
"AnnotationBuilder",
"(",
")",
";",
"annotations",
".",
"add",
"(",
"//",
"getFieldAnnotation",
"(",
")",
",",
"//",
"getFieldBridgeAnnotation"... | Returns all the search annotations for the attribute. Imports are processed automatically. | [
"Returns",
"all",
"the",
"search",
"annotations",
"for",
"the",
"attribute",
".",
"Imports",
"are",
"processed",
"automatically",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/support/search/SearchAttribute.java#L57-L64 |
4,185 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/Entity.java | Entity.generateIdentifiableMethods | public boolean generateIdentifiableMethods() {
Assert.isTrue(isRoot(), "generateIdentifiableMethods() can be invoked only on root entity. Please fix your template.");
if (hasSimplePk() || hasCompositePk()) {
String identifiableProperty = config.getCelerio().getConfiguration().getConventions... | java | public boolean generateIdentifiableMethods() {
Assert.isTrue(isRoot(), "generateIdentifiableMethods() can be invoked only on root entity. Please fix your template.");
if (hasSimplePk() || hasCompositePk()) {
String identifiableProperty = config.getCelerio().getConfiguration().getConventions... | [
"public",
"boolean",
"generateIdentifiableMethods",
"(",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"isRoot",
"(",
")",
",",
"\"generateIdentifiableMethods() can be invoked only on root entity. Please fix your template.\"",
")",
";",
"if",
"(",
"hasSimplePk",
"(",
")",
"||",... | Tells whether we should generate identifiable methods. We do not need to generate them in the case where the identifiable property matches exactly the
entity's PK field. | [
"Tells",
"whether",
"we",
"should",
"generate",
"identifiable",
"methods",
".",
"We",
"do",
"not",
"need",
"to",
"generate",
"them",
"in",
"the",
"case",
"where",
"the",
"identifiable",
"property",
"matches",
"exactly",
"the",
"entity",
"s",
"PK",
"field",
"... | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/Entity.java#L697-L707 |
4,186 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/Entity.java | Entity.getAttributeBundles | public List<AttributeBundle> getAttributeBundles() {
if (attributeBundles != null) {
return attributeBundles;
}
Map<String, AttributeBundle> bundlesMap = newHashMap();
for (Attribute attribute : getAttributes().getList()) {
if (attribute.columnNameHasLanguageSuf... | java | public List<AttributeBundle> getAttributeBundles() {
if (attributeBundles != null) {
return attributeBundles;
}
Map<String, AttributeBundle> bundlesMap = newHashMap();
for (Attribute attribute : getAttributes().getList()) {
if (attribute.columnNameHasLanguageSuf... | [
"public",
"List",
"<",
"AttributeBundle",
">",
"getAttributeBundles",
"(",
")",
"{",
"if",
"(",
"attributeBundles",
"!=",
"null",
")",
"{",
"return",
"attributeBundles",
";",
"}",
"Map",
"<",
"String",
",",
"AttributeBundle",
">",
"bundlesMap",
"=",
"newHashMa... | we should also check on types. | [
"we",
"should",
"also",
"check",
"on",
"types",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/Entity.java#L718-L748 |
4,187 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/factory/conventions/AccountConvention.java | AccountConvention.setupAccount | public boolean setupAccount(Entity e) {
AccountAttributes accountAttributes = new AccountAttributes();
// 0- reject entity having a composite PK.
if (e.hasCompositePk()) {
return false;
}
// 1- detect mandatory username
for (Attribute a : e.getAttributes().g... | java | public boolean setupAccount(Entity e) {
AccountAttributes accountAttributes = new AccountAttributes();
// 0- reject entity having a composite PK.
if (e.hasCompositePk()) {
return false;
}
// 1- detect mandatory username
for (Attribute a : e.getAttributes().g... | [
"public",
"boolean",
"setupAccount",
"(",
"Entity",
"e",
")",
"{",
"AccountAttributes",
"accountAttributes",
"=",
"new",
"AccountAttributes",
"(",
")",
";",
"// 0- reject entity having a composite PK.",
"if",
"(",
"e",
".",
"hasCompositePk",
"(",
")",
")",
"{",
"r... | Is this entity the 'account' entity? | [
"Is",
"this",
"entity",
"the",
"account",
"entity?"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/factory/conventions/AccountConvention.java#L42-L110 |
4,188 | jaxio/celerio | celerio-engine/src/main/java/com/jaxio/celerio/model/Attribute.java | Attribute.isMultiSelectable | public boolean isMultiSelectable() {
return ((!isInPk() && !isInFk() && !isVersion()) || (isSimplePk() && jpa.isManuallyAssigned())) //
&& (isBoolean() || isEnum() || isString() || isNumeric());
} | java | public boolean isMultiSelectable() {
return ((!isInPk() && !isInFk() && !isVersion()) || (isSimplePk() && jpa.isManuallyAssigned())) //
&& (isBoolean() || isEnum() || isString() || isNumeric());
} | [
"public",
"boolean",
"isMultiSelectable",
"(",
")",
"{",
"return",
"(",
"(",
"!",
"isInPk",
"(",
")",
"&&",
"!",
"isInFk",
"(",
")",
"&&",
"!",
"isVersion",
"(",
")",
")",
"||",
"(",
"isSimplePk",
"(",
")",
"&&",
"jpa",
".",
"isManuallyAssigned",
"("... | Can we apply a search with a PropertySelector on this attribute? | [
"Can",
"we",
"apply",
"a",
"search",
"with",
"a",
"PropertySelector",
"on",
"this",
"attribute?"
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/model/Attribute.java#L782-L785 |
4,189 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.execute | @Override
public void execute() throws MojoExecutionException {
try {
if (getBootstrapPacksInfo().isEmpty()) {
getLog().error("Could not find any Celerio Template Pack having a META-INF/celerio.txt file on the classpath!");
return;
}
celer... | java | @Override
public void execute() throws MojoExecutionException {
try {
if (getBootstrapPacksInfo().isEmpty()) {
getLog().error("Could not find any Celerio Template Pack having a META-INF/celerio.txt file on the classpath!");
return;
}
celer... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"try",
"{",
"if",
"(",
"getBootstrapPacksInfo",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"getLog",
"(",
")",
".",
"error",
"(",
"\"Could not find any Celeri... | Mojo entry point. | [
"Mojo",
"entry",
"point",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L160-L198 |
4,190 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.startInteractiveConfWizard | private void startInteractiveConfWizard() throws IOException {
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("");
chooseBootstrapPack(br);
chooseSampleSqlAndConf(br);
enterAppName(... | java | private void startInteractiveConfWizard() throws IOException {
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("");
chooseBootstrapPack(br);
chooseSampleSqlAndConf(br);
enterAppName(... | [
"private",
"void",
"startInteractiveConfWizard",
"(",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"br",
"=",
"null",
";",
"try",
"{",
"br",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"System",
".",
"in",
")",
")",
";",
"Syst... | Ask the user all the info we need. | [
"Ask",
"the",
"user",
"all",
"the",
"info",
"we",
"need",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L247-L259 |
4,191 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.chooseBootstrapPack | private void chooseBootstrapPack(BufferedReader br) throws IOException {
while (true) {
printInstruction("Choose the type of application you want to generate:");
for (int i = 0; i < getBootstrapPacksInfo().size(); i++) {
TemplatePackInfo templatePackInfo = getBootstrapPac... | java | private void chooseBootstrapPack(BufferedReader br) throws IOException {
while (true) {
printInstruction("Choose the type of application you want to generate:");
for (int i = 0; i < getBootstrapPacksInfo().size(); i++) {
TemplatePackInfo templatePackInfo = getBootstrapPac... | [
"private",
"void",
"chooseBootstrapPack",
"(",
"BufferedReader",
"br",
")",
"throws",
"IOException",
"{",
"while",
"(",
"true",
")",
"{",
"printInstruction",
"(",
"\"Choose the type of application you want to generate:\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",... | Interactively ask the user which pack should be used. | [
"Interactively",
"ask",
"the",
"user",
"which",
"pack",
"should",
"be",
"used",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L275-L307 |
4,192 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.getBootstrapPacksInfo | protected List<TemplatePackInfo> getBootstrapPacksInfo() {
if (bootstrapPacksInfo == null) {
bootstrapPacksInfo = getCelerioApplicationContext().getBean(ClasspathTemplatePackInfoLoader.class).resolveTopLevelPacks();
}
return bootstrapPacksInfo;
} | java | protected List<TemplatePackInfo> getBootstrapPacksInfo() {
if (bootstrapPacksInfo == null) {
bootstrapPacksInfo = getCelerioApplicationContext().getBean(ClasspathTemplatePackInfoLoader.class).resolveTopLevelPacks();
}
return bootstrapPacksInfo;
} | [
"protected",
"List",
"<",
"TemplatePackInfo",
">",
"getBootstrapPacksInfo",
"(",
")",
"{",
"if",
"(",
"bootstrapPacksInfo",
"==",
"null",
")",
"{",
"bootstrapPacksInfo",
"=",
"getCelerioApplicationContext",
"(",
")",
".",
"getBean",
"(",
"ClasspathTemplatePackInfoLoad... | Return the celerio template packs found on the classpath. | [
"Return",
"the",
"celerio",
"template",
"packs",
"found",
"on",
"the",
"classpath",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L316-L321 |
4,193 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.chooseSampleSqlAndConf | private void chooseSampleSqlAndConf(BufferedReader br) throws IOException {
while (true) {
printInstruction("Which sample SQL schema would you like to use?");
for (int i = 0; i < getSqlConfInfos().size(); i++) {
System.out.println(" " + (i + 1) + ") " + getSqlConfInfos().... | java | private void chooseSampleSqlAndConf(BufferedReader br) throws IOException {
while (true) {
printInstruction("Which sample SQL schema would you like to use?");
for (int i = 0; i < getSqlConfInfos().size(); i++) {
System.out.println(" " + (i + 1) + ") " + getSqlConfInfos().... | [
"private",
"void",
"chooseSampleSqlAndConf",
"(",
"BufferedReader",
"br",
")",
"throws",
"IOException",
"{",
"while",
"(",
"true",
")",
"{",
"printInstruction",
"(",
"\"Which sample SQL schema would you like to use?\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
... | Interactively ask the user which sql conf should be used. | [
"Interactively",
"ask",
"the",
"user",
"which",
"sql",
"conf",
"should",
"be",
"used",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L336-L362 |
4,194 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.getSqlConfInfos | protected List<SqlConfInfo> getSqlConfInfos() {
List<SqlConfInfo> packInfos = newArrayList();
PathMatchingResourcePatternResolver o = new PathMatchingResourcePatternResolver();
try {
Resource packInfosAsResource[] = o.getResources("classpath*:sqlconf/*/00-info.txt");
for... | java | protected List<SqlConfInfo> getSqlConfInfos() {
List<SqlConfInfo> packInfos = newArrayList();
PathMatchingResourcePatternResolver o = new PathMatchingResourcePatternResolver();
try {
Resource packInfosAsResource[] = o.getResources("classpath*:sqlconf/*/00-info.txt");
for... | [
"protected",
"List",
"<",
"SqlConfInfo",
">",
"getSqlConfInfos",
"(",
")",
"{",
"List",
"<",
"SqlConfInfo",
">",
"packInfos",
"=",
"newArrayList",
"(",
")",
";",
"PathMatchingResourcePatternResolver",
"o",
"=",
"new",
"PathMatchingResourcePatternResolver",
"(",
")",... | Scan the classpath for SQL configurations. | [
"Scan",
"the",
"classpath",
"for",
"SQL",
"configurations",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L367-L382 |
4,195 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.enterPackageName | private void enterPackageName(BufferedReader br) throws IOException {
String suggestedRootPackage = getDefaultRootPackage() + "." + appName;
while (true) {
printInstruction("Enter the Java root package of your application: [" + suggestedRootPackage + "]");
String packageNameCand... | java | private void enterPackageName(BufferedReader br) throws IOException {
String suggestedRootPackage = getDefaultRootPackage() + "." + appName;
while (true) {
printInstruction("Enter the Java root package of your application: [" + suggestedRootPackage + "]");
String packageNameCand... | [
"private",
"void",
"enterPackageName",
"(",
"BufferedReader",
"br",
")",
"throws",
"IOException",
"{",
"String",
"suggestedRootPackage",
"=",
"getDefaultRootPackage",
"(",
")",
"+",
"\".\"",
"+",
"appName",
";",
"while",
"(",
"true",
")",
"{",
"printInstruction",
... | Ask the user to enter the package name. | [
"Ask",
"the",
"user",
"to",
"enter",
"the",
"package",
"name",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L435-L455 |
4,196 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.enterAppName | private void enterAppName(BufferedReader br) throws IOException {
while (true) {
printInstruction("Enter your application name: [" + getDefaultAppName() + "]");
String appNameCandidate = br.readLine();
if (isBlank(appNameCandidate)) {
appName = getDefaultAppN... | java | private void enterAppName(BufferedReader br) throws IOException {
while (true) {
printInstruction("Enter your application name: [" + getDefaultAppName() + "]");
String appNameCandidate = br.readLine();
if (isBlank(appNameCandidate)) {
appName = getDefaultAppN... | [
"private",
"void",
"enterAppName",
"(",
"BufferedReader",
"br",
")",
"throws",
"IOException",
"{",
"while",
"(",
"true",
")",
"{",
"printInstruction",
"(",
"\"Enter your application name: [\"",
"+",
"getDefaultAppName",
"(",
")",
"+",
"\"]\"",
")",
";",
"String",
... | Ask the user to enter the application name. | [
"Ask",
"the",
"user",
"to",
"enter",
"the",
"application",
"name",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L460-L479 |
4,197 | jaxio/celerio | celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java | BootstrapMojo.printInstruction | private void printInstruction(String instruction) {
System.out.println(StringUtils.repeat("-", instruction.length()));
System.out.println(instruction);
System.out.println(StringUtils.repeat("-", instruction.length()));
} | java | private void printInstruction(String instruction) {
System.out.println(StringUtils.repeat("-", instruction.length()));
System.out.println(instruction);
System.out.println(StringUtils.repeat("-", instruction.length()));
} | [
"private",
"void",
"printInstruction",
"(",
"String",
"instruction",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"StringUtils",
".",
"repeat",
"(",
"\"-\"",
",",
"instruction",
".",
"length",
"(",
")",
")",
")",
";",
"System",
".",
"out",
".",
... | Print the passed instruction in the console. | [
"Print",
"the",
"passed",
"instruction",
"in",
"the",
"console",
"."
] | fbfacb639e286f9f3f3a18986f74ea275bebd887 | https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/bootstrap-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/bootstrap/BootstrapMojo.java#L566-L570 |
4,198 | protostuff/protostuff-compiler | protostuff-parser/src/main/java/io/protostuff/compiler/parser/LocalFileReader.java | LocalFileReader.checkDirectories | private List<Path> checkDirectories(List<Path> pathList) {
List<Path> result = new ArrayList<>();
for (Path path : pathList) {
if (!Files.exists(path)) {
LOGGER.debug("'{}' does not exist", path);
} else if (!Files.isDirectory(path)) {
LOGGER.warn(... | java | private List<Path> checkDirectories(List<Path> pathList) {
List<Path> result = new ArrayList<>();
for (Path path : pathList) {
if (!Files.exists(path)) {
LOGGER.debug("'{}' does not exist", path);
} else if (!Files.isDirectory(path)) {
LOGGER.warn(... | [
"private",
"List",
"<",
"Path",
">",
"checkDirectories",
"(",
"List",
"<",
"Path",
">",
"pathList",
")",
"{",
"List",
"<",
"Path",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Path",
"path",
":",
"pathList",
")",
"{",
"... | Check that all elements in the list exist and are directories.
Log warning for each element that is not directory. | [
"Check",
"that",
"all",
"elements",
"in",
"the",
"list",
"exist",
"and",
"are",
"directories",
".",
"Log",
"warning",
"for",
"each",
"element",
"that",
"is",
"not",
"directory",
"."
] | 665256c42cb41da849e8321ffcab088350ace171 | https://github.com/protostuff/protostuff-compiler/blob/665256c42cb41da849e8321ffcab088350ace171/protostuff-parser/src/main/java/io/protostuff/compiler/parser/LocalFileReader.java#L39-L51 |
4,199 | protostuff/protostuff-compiler | protostuff-parser/src/main/java/io/protostuff/compiler/model/Proto.java | Proto.getPublicImports | public List<Import> getPublicImports() {
return getImports()
.stream()
.filter(Import::isPublic)
.collect(Collectors.toList());
} | java | public List<Import> getPublicImports() {
return getImports()
.stream()
.filter(Import::isPublic)
.collect(Collectors.toList());
} | [
"public",
"List",
"<",
"Import",
">",
"getPublicImports",
"(",
")",
"{",
"return",
"getImports",
"(",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"Import",
"::",
"isPublic",
")",
".",
"collect",
"(",
"Collectors",
".",
"toList",
"(",
")",
")",
... | Returns all public imports in this proto file. | [
"Returns",
"all",
"public",
"imports",
"in",
"this",
"proto",
"file",
"."
] | 665256c42cb41da849e8321ffcab088350ace171 | https://github.com/protostuff/protostuff-compiler/blob/665256c42cb41da849e8321ffcab088350ace171/protostuff-parser/src/main/java/io/protostuff/compiler/model/Proto.java#L80-L85 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.