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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
142,100 | massfords/jaxb-visitor | src/main/java/com/massfords/jaxb/VisitorPlugin.java | VisitorPlugin.sortClasses | private Set<ClassOutline> sortClasses(Outline outline) {
Set<ClassOutline> sorted = new TreeSet<>((aOne, aTwo) -> {
String one = aOne.implClass.fullName();
String two = aTwo.implClass.fullName();
return one.compareTo(two);
});
sorted.addAll(outline.getClasses(... | java | private Set<ClassOutline> sortClasses(Outline outline) {
Set<ClassOutline> sorted = new TreeSet<>((aOne, aTwo) -> {
String one = aOne.implClass.fullName();
String two = aTwo.implClass.fullName();
return one.compareTo(two);
});
sorted.addAll(outline.getClasses(... | [
"private",
"Set",
"<",
"ClassOutline",
">",
"sortClasses",
"(",
"Outline",
"outline",
")",
"{",
"Set",
"<",
"ClassOutline",
">",
"sorted",
"=",
"new",
"TreeSet",
"<>",
"(",
"(",
"aOne",
",",
"aTwo",
")",
"->",
"{",
"String",
"one",
"=",
"aOne",
".",
... | The classes are sorted for test purposes only. This gives us a predictable order for our
assertions on the generated code.
@param outline | [
"The",
"classes",
"are",
"sorted",
"for",
"test",
"purposes",
"only",
".",
"This",
"gives",
"us",
"a",
"predictable",
"order",
"for",
"our",
"assertions",
"on",
"the",
"generated",
"code",
"."
] | 0d66cd4d8b6700b5eb67c028a87b53792be895b8 | https://github.com/massfords/jaxb-visitor/blob/0d66cd4d8b6700b5eb67c028a87b53792be895b8/src/main/java/com/massfords/jaxb/VisitorPlugin.java#L191-L199 |
142,101 | beangle/beangle3 | orm/hibernate/src/main/java/org/beangle/orm/hibernate/tool/HbmGenerator.java | HbmGenerator.findAnnotation | private <T extends Annotation> T findAnnotation(Class<?> cls, Class<T> annotationClass, String name) {
Class<?> curr = cls;
T ann = null;
while (ann == null && curr != null && !curr.equals(Object.class)) {
ann = findAnnotationLocal(curr, annotationClass, name);
curr = curr.getSuperclass();
}... | java | private <T extends Annotation> T findAnnotation(Class<?> cls, Class<T> annotationClass, String name) {
Class<?> curr = cls;
T ann = null;
while (ann == null && curr != null && !curr.equals(Object.class)) {
ann = findAnnotationLocal(curr, annotationClass, name);
curr = curr.getSuperclass();
}... | [
"private",
"<",
"T",
"extends",
"Annotation",
">",
"T",
"findAnnotation",
"(",
"Class",
"<",
"?",
">",
"cls",
",",
"Class",
"<",
"T",
">",
"annotationClass",
",",
"String",
"name",
")",
"{",
"Class",
"<",
"?",
">",
"curr",
"=",
"cls",
";",
"T",
"an... | find annotation on specified member
@param cls
@param annotationClass
@param name
@return | [
"find",
"annotation",
"on",
"specified",
"member"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/tool/HbmGenerator.java#L106-L114 |
142,102 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java | MapConverter.getShort | public Short getShort(Map<String, Object> data, String name) {
return get(data, name, Short.class);
} | java | public Short getShort(Map<String, Object> data, String name) {
return get(data, name, Short.class);
} | [
"public",
"Short",
"getShort",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"data",
",",
"String",
"name",
")",
"{",
"return",
"get",
"(",
"data",
",",
"name",
",",
"Short",
".",
"class",
")",
";",
"}"
] | Get Short. | [
"Get",
"Short",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java#L260-L262 |
142,103 | beangle/beangle3 | orm/hibernate/src/main/java/org/beangle/orm/hibernate/dwr/H4BeanConverter.java | H4BeanConverter.findGetter | protected Method findGetter(Object data, String property) throws IntrospectionException {
Class<?> clazz = getClass(data);
String key = clazz.getName() + ":" + property;
Method method = methods.get(key);
if (method == null) {
Method newMethod = null;
PropertyDescriptor[] props = Introspector... | java | protected Method findGetter(Object data, String property) throws IntrospectionException {
Class<?> clazz = getClass(data);
String key = clazz.getName() + ":" + property;
Method method = methods.get(key);
if (method == null) {
Method newMethod = null;
PropertyDescriptor[] props = Introspector... | [
"protected",
"Method",
"findGetter",
"(",
"Object",
"data",
",",
"String",
"property",
")",
"throws",
"IntrospectionException",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"getClass",
"(",
"data",
")",
";",
"String",
"key",
"=",
"clazz",
".",
"getName",
"("... | Cache the method if possible, using the classname and property name to
allow for similar named methods.
@param data The bean to introspect
@param property The property to get the accessor for
@return The getter method
@throws IntrospectionException If Introspector.getBeanInfo() fails | [
"Cache",
"the",
"method",
"if",
"possible",
"using",
"the",
"classname",
"and",
"property",
"name",
"to",
"allow",
"for",
"similar",
"named",
"methods",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/dwr/H4BeanConverter.java#L168-L187 |
142,104 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java | ClassInfo.getReadIndex | public final int getReadIndex(String property) {
MethodInfo method = propertyReadMethods.get(property);
return (null == method) ? -1 : method.index;
} | java | public final int getReadIndex(String property) {
MethodInfo method = propertyReadMethods.get(property);
return (null == method) ? -1 : method.index;
} | [
"public",
"final",
"int",
"getReadIndex",
"(",
"String",
"property",
")",
"{",
"MethodInfo",
"method",
"=",
"propertyReadMethods",
".",
"get",
"(",
"property",
")",
";",
"return",
"(",
"null",
"==",
"method",
")",
"?",
"-",
"1",
":",
"method",
".",
"inde... | Return property read index,return -1 when not found. | [
"Return",
"property",
"read",
"index",
"return",
"-",
"1",
"when",
"not",
"found",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java#L91-L94 |
142,105 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java | ClassInfo.getPropertyType | public final Class<?> getPropertyType(String property) {
MethodInfo info = propertyWriteMethods.get(property);
if (null == info) return null;
else return info.parameterTypes[0];
} | java | public final Class<?> getPropertyType(String property) {
MethodInfo info = propertyWriteMethods.get(property);
if (null == info) return null;
else return info.parameterTypes[0];
} | [
"public",
"final",
"Class",
"<",
"?",
">",
"getPropertyType",
"(",
"String",
"property",
")",
"{",
"MethodInfo",
"info",
"=",
"propertyWriteMethods",
".",
"get",
"(",
"property",
")",
";",
"if",
"(",
"null",
"==",
"info",
")",
"return",
"null",
";",
"els... | Return property type,return null when not found. | [
"Return",
"property",
"type",
"return",
"null",
"when",
"not",
"found",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java#L106-L110 |
142,106 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java | ClassInfo.getWriteIndex | public final int getWriteIndex(String property) {
MethodInfo method = propertyWriteMethods.get(property);
return (null == method) ? -1 : method.index;
} | java | public final int getWriteIndex(String property) {
MethodInfo method = propertyWriteMethods.get(property);
return (null == method) ? -1 : method.index;
} | [
"public",
"final",
"int",
"getWriteIndex",
"(",
"String",
"property",
")",
"{",
"MethodInfo",
"method",
"=",
"propertyWriteMethods",
".",
"get",
"(",
"property",
")",
";",
"return",
"(",
"null",
"==",
"method",
")",
"?",
"-",
"1",
":",
"method",
".",
"in... | Return property write index,return -1 if not found. | [
"Return",
"property",
"write",
"index",
"return",
"-",
"1",
"if",
"not",
"found",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java#L115-L118 |
142,107 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java | ClassInfo.getIndex | public final int getIndex(String name, Object... args) {
Integer defaultIndex = methodIndexs.get(name);
if (null != defaultIndex) return defaultIndex.intValue();
else {
final List<MethodInfo> exists = methods.get(name);
if (null != exists) {
for (MethodInfo info : exists)
if (i... | java | public final int getIndex(String name, Object... args) {
Integer defaultIndex = methodIndexs.get(name);
if (null != defaultIndex) return defaultIndex.intValue();
else {
final List<MethodInfo> exists = methods.get(name);
if (null != exists) {
for (MethodInfo info : exists)
if (i... | [
"public",
"final",
"int",
"getIndex",
"(",
"String",
"name",
",",
"Object",
"...",
"args",
")",
"{",
"Integer",
"defaultIndex",
"=",
"methodIndexs",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"null",
"!=",
"defaultIndex",
")",
"return",
"defaultIndex",
... | Return method index,return -1 if not found. | [
"Return",
"method",
"index",
"return",
"-",
"1",
"if",
"not",
"found",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java#L130-L141 |
142,108 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java | ClassInfo.getMethods | public final List<MethodInfo> getMethods(String name) {
List<MethodInfo> namedMethod = methods.get(name);
if (null == namedMethod) return Collections.emptyList();
else return namedMethod;
} | java | public final List<MethodInfo> getMethods(String name) {
List<MethodInfo> namedMethod = methods.get(name);
if (null == namedMethod) return Collections.emptyList();
else return namedMethod;
} | [
"public",
"final",
"List",
"<",
"MethodInfo",
">",
"getMethods",
"(",
"String",
"name",
")",
"{",
"List",
"<",
"MethodInfo",
">",
"namedMethod",
"=",
"methods",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"null",
"==",
"namedMethod",
")",
"return",
"... | Return public metheds according to given name | [
"Return",
"public",
"metheds",
"according",
"to",
"given",
"name"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java#L146-L150 |
142,109 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java | ClassInfo.getMethods | public final List<MethodInfo> getMethods() {
List<MethodInfo> methodInfos = CollectUtils.newArrayList();
for (Map.Entry<String, List<MethodInfo>> entry : methods.entrySet()) {
for (MethodInfo info : entry.getValue())
methodInfos.add(info);
}
Collections.sort(methodInfos);
return method... | java | public final List<MethodInfo> getMethods() {
List<MethodInfo> methodInfos = CollectUtils.newArrayList();
for (Map.Entry<String, List<MethodInfo>> entry : methods.entrySet()) {
for (MethodInfo info : entry.getValue())
methodInfos.add(info);
}
Collections.sort(methodInfos);
return method... | [
"public",
"final",
"List",
"<",
"MethodInfo",
">",
"getMethods",
"(",
")",
"{",
"List",
"<",
"MethodInfo",
">",
"methodInfos",
"=",
"CollectUtils",
".",
"newArrayList",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"M... | Return all public methods. | [
"Return",
"all",
"public",
"methods",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/ClassInfo.java#L155-L163 |
142,110 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/Option.java | Option.getAll | public static <T> List<T> getAll(Collection<Option<T>> values) {
List<T> results = CollectUtils.newArrayList(values.size());
for (Option<T> op : values) {
if (op.isDefined()) results.add(op.get());
}
return results;
} | java | public static <T> List<T> getAll(Collection<Option<T>> values) {
List<T> results = CollectUtils.newArrayList(values.size());
for (Option<T> op : values) {
if (op.isDefined()) results.add(op.get());
}
return results;
} | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"getAll",
"(",
"Collection",
"<",
"Option",
"<",
"T",
">",
">",
"values",
")",
"{",
"List",
"<",
"T",
">",
"results",
"=",
"CollectUtils",
".",
"newArrayList",
"(",
"values",
".",
"size",
"(... | Return all value from Option Collection
@param values | [
"Return",
"all",
"value",
"from",
"Option",
"Collection"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Option.java#L118-L124 |
142,111 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/reflect/Reflections.java | Reflections.getBeanSetters | public static List<Method> getBeanSetters(Class<?> clazz) {
List<Method> methods = CollectUtils.newArrayList();
for (Method m : clazz.getMethods()) {
if (m.getName().startsWith("set") && m.getName().length() > 3) {
if (Modifier.isPublic(m.getModifiers()) && !Modifier.isStatic(m.getModifiers())
... | java | public static List<Method> getBeanSetters(Class<?> clazz) {
List<Method> methods = CollectUtils.newArrayList();
for (Method m : clazz.getMethods()) {
if (m.getName().startsWith("set") && m.getName().length() > 3) {
if (Modifier.isPublic(m.getModifiers()) && !Modifier.isStatic(m.getModifiers())
... | [
"public",
"static",
"List",
"<",
"Method",
">",
"getBeanSetters",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"List",
"<",
"Method",
">",
"methods",
"=",
"CollectUtils",
".",
"newArrayList",
"(",
")",
";",
"for",
"(",
"Method",
"m",
":",
"clazz",
... | Return list of setters
@param clazz | [
"Return",
"list",
"of",
"setters"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/reflect/Reflections.java#L46-L57 |
142,112 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/convention/config/ConventionPackageProvider.java | ConventionPackageProvider.buildResultConfigs | protected List<ResultConfig> buildResultConfigs(Class<?> clazz, PackageConfig.Builder pcb) {
List<ResultConfig> configs = CollectUtils.newArrayList();
// load annotation results
Result[] results = new Result[0];
Results rs = clazz.getAnnotation(Results.class);
if (null == rs) {
org.beangle.str... | java | protected List<ResultConfig> buildResultConfigs(Class<?> clazz, PackageConfig.Builder pcb) {
List<ResultConfig> configs = CollectUtils.newArrayList();
// load annotation results
Result[] results = new Result[0];
Results rs = clazz.getAnnotation(Results.class);
if (null == rs) {
org.beangle.str... | [
"protected",
"List",
"<",
"ResultConfig",
">",
"buildResultConfigs",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"PackageConfig",
".",
"Builder",
"pcb",
")",
"{",
"List",
"<",
"ResultConfig",
">",
"configs",
"=",
"CollectUtils",
".",
"newArrayList",
"(",
")",... | generator default results by method name
@param clazz
@return | [
"generator",
"default",
"results",
"by",
"method",
"name"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/convention/config/ConventionPackageProvider.java#L280-L321 |
142,113 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/time/Stopwatch.java | Stopwatch.start | public Stopwatch start() {
Assert.isTrue(!isRunning);
isRunning = true;
startTick = ticker.read();
return this;
} | java | public Stopwatch start() {
Assert.isTrue(!isRunning);
isRunning = true;
startTick = ticker.read();
return this;
} | [
"public",
"Stopwatch",
"start",
"(",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"!",
"isRunning",
")",
";",
"isRunning",
"=",
"true",
";",
"startTick",
"=",
"ticker",
".",
"read",
"(",
")",
";",
"return",
"this",
";",
"}"
] | Starts the stopwatch.
@return this {@code Stopwatch} instance
@throws IllegalStateException if the stopwatch is already running. | [
"Starts",
"the",
"stopwatch",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/time/Stopwatch.java#L77-L82 |
142,114 | beangle/beangle3 | commons/model/src/main/java/org/beangle/commons/transfer/importer/MultiEntityImporter.java | MultiEntityImporter.populateValue | protected void populateValue(Object entity, EntityType type, String attr, Object value) {
// 当有深层次属性
if (Strings.contains(attr, '.')) {
if (null != foreignerKeys) {
boolean isForeigner = isForeigner(attr);
// 如果是个外键,先根据parentPath生成新的外键实体。
// 因此导入的是外键,只能有一个属性导入.
if (isForeig... | java | protected void populateValue(Object entity, EntityType type, String attr, Object value) {
// 当有深层次属性
if (Strings.contains(attr, '.')) {
if (null != foreignerKeys) {
boolean isForeigner = isForeigner(attr);
// 如果是个外键,先根据parentPath生成新的外键实体。
// 因此导入的是外键,只能有一个属性导入.
if (isForeig... | [
"protected",
"void",
"populateValue",
"(",
"Object",
"entity",
",",
"EntityType",
"type",
",",
"String",
"attr",
",",
"Object",
"value",
")",
"{",
"// 当有深层次属性",
"if",
"(",
"Strings",
".",
"contains",
"(",
"attr",
",",
"'",
"'",
")",
")",
"{",
"if",
"("... | Populate single attribute
@param entity
@param type
@param attr
@param value | [
"Populate",
"single",
"attribute"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/transfer/importer/MultiEntityImporter.java#L105-L128 |
142,115 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/freemarker/BeangleObjectWrapper.java | BeangleObjectWrapper.getModelFactory | @SuppressWarnings("rawtypes")
protected ModelFactory getModelFactory(Class clazz) {
if (altMapWrapper && Map.class.isAssignableFrom(clazz)) { return FriendlyMapModel.FACTORY; }
return super.getModelFactory(clazz);
} | java | @SuppressWarnings("rawtypes")
protected ModelFactory getModelFactory(Class clazz) {
if (altMapWrapper && Map.class.isAssignableFrom(clazz)) { return FriendlyMapModel.FACTORY; }
return super.getModelFactory(clazz);
} | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"protected",
"ModelFactory",
"getModelFactory",
"(",
"Class",
"clazz",
")",
"{",
"if",
"(",
"altMapWrapper",
"&&",
"Map",
".",
"class",
".",
"isAssignableFrom",
"(",
"clazz",
")",
")",
"{",
"return",
"Friendly... | of FM. | [
"of",
"FM",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/freemarker/BeangleObjectWrapper.java#L74-L78 |
142,116 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/inject/bind/AbstractBindModule.java | AbstractBindModule.entry | protected final Pair<?, ?> entry(Object key, Object value) {
return Pair.of(key, value);
} | java | protected final Pair<?, ?> entry(Object key, Object value) {
return Pair.of(key, value);
} | [
"protected",
"final",
"Pair",
"<",
"?",
",",
"?",
">",
"entry",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"return",
"Pair",
".",
"of",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Return new map entry
@param key
@param value | [
"Return",
"new",
"map",
"entry"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/inject/bind/AbstractBindModule.java#L97-L99 |
142,117 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/inject/bind/AbstractBindModule.java | AbstractBindModule.bean | protected final Definition bean(Class<?> clazz) {
Definition def = new Definition(clazz.getName(), clazz, Scope.SINGLETON.toString());
def.beanName = clazz.getName() + "#" + Math.abs(System.identityHashCode(def));
return def;
} | java | protected final Definition bean(Class<?> clazz) {
Definition def = new Definition(clazz.getName(), clazz, Scope.SINGLETON.toString());
def.beanName = clazz.getName() + "#" + Math.abs(System.identityHashCode(def));
return def;
} | [
"protected",
"final",
"Definition",
"bean",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"Definition",
"def",
"=",
"new",
"Definition",
"(",
"clazz",
".",
"getName",
"(",
")",
",",
"clazz",
",",
"Scope",
".",
"SINGLETON",
".",
"toString",
"(",
")",
... | Generate a inner bean definition
@param clazz | [
"Generate",
"a",
"inner",
"bean",
"definition"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/inject/bind/AbstractBindModule.java#L106-L110 |
142,118 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/text/i18n/impl/DefaultTextBundleRegistry.java | DefaultTextBundleRegistry.loadJavaBundle | protected Option<TextBundle> loadJavaBundle(String bundleName, Locale locale) {
Properties properties = new Properties();
String resource = toJavaResourceName(bundleName, locale);
try {
InputStream is = ClassLoaders.getResourceAsStream(resource, getClass());
if (null == is) return Option.none();... | java | protected Option<TextBundle> loadJavaBundle(String bundleName, Locale locale) {
Properties properties = new Properties();
String resource = toJavaResourceName(bundleName, locale);
try {
InputStream is = ClassLoaders.getResourceAsStream(resource, getClass());
if (null == is) return Option.none();... | [
"protected",
"Option",
"<",
"TextBundle",
">",
"loadJavaBundle",
"(",
"String",
"bundleName",
",",
"Locale",
"locale",
")",
"{",
"Properties",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"String",
"resource",
"=",
"toJavaResourceName",
"(",
"bundleNam... | Load java properties bundle with iso-8859-1
@param bundleName
@param locale
@return None or bundle corresponding bindleName.locale.properties | [
"Load",
"java",
"properties",
"bundle",
"with",
"iso",
"-",
"8859",
"-",
"1"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/text/i18n/impl/DefaultTextBundleRegistry.java#L155-L168 |
142,119 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/text/i18n/impl/DefaultTextBundleRegistry.java | DefaultTextBundleRegistry.toJavaResourceName | protected final String toJavaResourceName(String bundleName, Locale locale) {
String fullName = bundleName;
final String localeName = toLocaleStr(locale);
final String suffix = "properties";
if (!"".equals(localeName)) fullName = fullName + "_" + localeName;
StringBuilder sb = new StringBuilder(full... | java | protected final String toJavaResourceName(String bundleName, Locale locale) {
String fullName = bundleName;
final String localeName = toLocaleStr(locale);
final String suffix = "properties";
if (!"".equals(localeName)) fullName = fullName + "_" + localeName;
StringBuilder sb = new StringBuilder(full... | [
"protected",
"final",
"String",
"toJavaResourceName",
"(",
"String",
"bundleName",
",",
"Locale",
"locale",
")",
"{",
"String",
"fullName",
"=",
"bundleName",
";",
"final",
"String",
"localeName",
"=",
"toLocaleStr",
"(",
"locale",
")",
";",
"final",
"String",
... | java properties bundle name
@param bundleName
@param locale
@return convented properties ended file path. | [
"java",
"properties",
"bundle",
"name"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/text/i18n/impl/DefaultTextBundleRegistry.java#L177-L185 |
142,120 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java | Component.getComponentName | private String getComponentName() {
Class<?> c = getClass();
String name = c.getName();
int dot = name.lastIndexOf('.');
return name.substring(dot + 1).toLowerCase();
} | java | private String getComponentName() {
Class<?> c = getClass();
String name = c.getName();
int dot = name.lastIndexOf('.');
return name.substring(dot + 1).toLowerCase();
} | [
"private",
"String",
"getComponentName",
"(",
")",
"{",
"Class",
"<",
"?",
">",
"c",
"=",
"getClass",
"(",
")",
";",
"String",
"name",
"=",
"c",
".",
"getName",
"(",
")",
";",
"int",
"dot",
"=",
"name",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";"... | Gets the name of this component.
@return the name of this component. | [
"Gets",
"the",
"name",
"of",
"this",
"component",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java#L62-L67 |
142,121 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java | Component.getComponentStack | protected Stack<Component> getComponentStack() {
@SuppressWarnings("unchecked")
Stack<Component> componentStack = (Stack<Component>) stack.getContext().get(COMPONENT_STACK);
if (componentStack == null) {
componentStack = new Stack<Component>();
stack.getContext().put(COMPONENT_STACK, componentSt... | java | protected Stack<Component> getComponentStack() {
@SuppressWarnings("unchecked")
Stack<Component> componentStack = (Stack<Component>) stack.getContext().get(COMPONENT_STACK);
if (componentStack == null) {
componentStack = new Stack<Component>();
stack.getContext().put(COMPONENT_STACK, componentSt... | [
"protected",
"Stack",
"<",
"Component",
">",
"getComponentStack",
"(",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Stack",
"<",
"Component",
">",
"componentStack",
"=",
"(",
"Stack",
"<",
"Component",
">",
")",
"stack",
".",
"getContext",
... | Gets the component stack of this component.
@return the component stack of this component, never <tt>null</tt>. | [
"Gets",
"the",
"component",
"stack",
"of",
"this",
"component",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java#L74-L82 |
142,122 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java | Component.findAncestor | @SuppressWarnings("unchecked")
protected <T extends Component> T findAncestor(Class<T> clazz) {
Stack<? extends Component> componentStack = getComponentStack();
for (int i = componentStack.size() - 2; i >= 0; i--) {
Component component = componentStack.get(i);
if (clazz.equals(component.getClass()... | java | @SuppressWarnings("unchecked")
protected <T extends Component> T findAncestor(Class<T> clazz) {
Stack<? extends Component> componentStack = getComponentStack();
for (int i = componentStack.size() - 2; i >= 0; i--) {
Component component = componentStack.get(i);
if (clazz.equals(component.getClass()... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
"extends",
"Component",
">",
"T",
"findAncestor",
"(",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"Stack",
"<",
"?",
"extends",
"Component",
">",
"componentStack",
"=",
"getComponentS... | Finds the nearest ancestor of this component stack.
@param clazz
the class to look for, or if assignable from.
@return the component if found, <tt>null</tt> if not. | [
"Finds",
"the",
"nearest",
"ancestor",
"of",
"this",
"component",
"stack",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java#L147-L155 |
142,123 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/io/Files.java | Files.readLines | public static List<String> readLines(File file, Charset charset) throws IOException {
InputStream in = null;
try {
in = new FileInputStream(file);
if (null == charset) {
return IOs.readLines(new InputStreamReader(in));
} else {
InputStreamReader reader = new InputStreamReader(i... | java | public static List<String> readLines(File file, Charset charset) throws IOException {
InputStream in = null;
try {
in = new FileInputStream(file);
if (null == charset) {
return IOs.readLines(new InputStreamReader(in));
} else {
InputStreamReader reader = new InputStreamReader(i... | [
"public",
"static",
"List",
"<",
"String",
">",
"readLines",
"(",
"File",
"file",
",",
"Charset",
"charset",
")",
"throws",
"IOException",
"{",
"InputStream",
"in",
"=",
"null",
";",
"try",
"{",
"in",
"=",
"new",
"FileInputStream",
"(",
"file",
")",
";",... | Reads the contents of a file line by line to a List of Strings.
The file is always closed. | [
"Reads",
"the",
"contents",
"of",
"a",
"file",
"line",
"by",
"line",
"to",
"a",
"List",
"of",
"Strings",
".",
"The",
"file",
"is",
"always",
"closed",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/io/Files.java#L76-L89 |
142,124 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/tag/BeangleModels.java | BeangleModels.getParamstring | public String getParamstring() {
StringWriter sw = new StringWriter();
Enumeration<?> em = req.getParameterNames();
while (em.hasMoreElements()) {
String attr = (String) em.nextElement();
if (attr.equals("method")) continue;
String value = req.getParameter(attr);
if (attr.equals("x-r... | java | public String getParamstring() {
StringWriter sw = new StringWriter();
Enumeration<?> em = req.getParameterNames();
while (em.hasMoreElements()) {
String attr = (String) em.nextElement();
if (attr.equals("method")) continue;
String value = req.getParameter(attr);
if (attr.equals("x-r... | [
"public",
"String",
"getParamstring",
"(",
")",
"{",
"StringWriter",
"sw",
"=",
"new",
"StringWriter",
"(",
")",
";",
"Enumeration",
"<",
"?",
">",
"em",
"=",
"req",
".",
"getParameterNames",
"(",
")",
";",
"while",
"(",
"em",
".",
"hasMoreElements",
"("... | query string and form control | [
"query",
"string",
"and",
"form",
"control"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/tag/BeangleModels.java#L116-L130 |
142,125 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.error | protected void error(String message, Element source, Throwable cause) {
logger.error(message);
} | java | protected void error(String message, Element source, Throwable cause) {
logger.error(message);
} | [
"protected",
"void",
"error",
"(",
"String",
"message",
",",
"Element",
"source",
",",
"Throwable",
"cause",
")",
"{",
"logger",
".",
"error",
"(",
"message",
")",
";",
"}"
] | Report an error with the given message for the given source element.
@param message a {@link java.lang.String} object.
@param source a {@link org.w3c.dom.Element} object.
@param cause a {@link java.lang.Throwable} object. | [
"Report",
"an",
"error",
"with",
"the",
"given",
"message",
"for",
"the",
"given",
"source",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L111-L113 |
142,126 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.checkNameUniqueness | protected void checkNameUniqueness(String beanName, List<String> aliases, Element beanElement) {
String foundName = null;
if (StringUtils.hasText(beanName) && this.usedNames.contains(beanName)) foundName = beanName;
if (foundName == null) foundName = (String) CollectionUtils.findFirstMatch(this.usedNames,... | java | protected void checkNameUniqueness(String beanName, List<String> aliases, Element beanElement) {
String foundName = null;
if (StringUtils.hasText(beanName) && this.usedNames.contains(beanName)) foundName = beanName;
if (foundName == null) foundName = (String) CollectionUtils.findFirstMatch(this.usedNames,... | [
"protected",
"void",
"checkNameUniqueness",
"(",
"String",
"beanName",
",",
"List",
"<",
"String",
">",
"aliases",
",",
"Element",
"beanElement",
")",
"{",
"String",
"foundName",
"=",
"null",
";",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"beanName",
")... | Validate that the specified bean name and aliases have not been used
already.
@param beanName a {@link java.lang.String} object.
@param aliases a {@link java.util.List} object.
@param beanElement a {@link org.w3c.dom.Element} object. | [
"Validate",
"that",
"the",
"specified",
"bean",
"name",
"and",
"aliases",
"have",
"not",
"been",
"used",
"already",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L179-L190 |
142,127 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.createBeanDefinition | protected AbstractBeanDefinition createBeanDefinition(String className, String parentName)
throws ClassNotFoundException {
return BeanDefinitionReaderUtils.createBeanDefinition(parentName, className, null);
} | java | protected AbstractBeanDefinition createBeanDefinition(String className, String parentName)
throws ClassNotFoundException {
return BeanDefinitionReaderUtils.createBeanDefinition(parentName, className, null);
} | [
"protected",
"AbstractBeanDefinition",
"createBeanDefinition",
"(",
"String",
"className",
",",
"String",
"parentName",
")",
"throws",
"ClassNotFoundException",
"{",
"return",
"BeanDefinitionReaderUtils",
".",
"createBeanDefinition",
"(",
"parentName",
",",
"className",
","... | Create a bean definition for the given class name and parent name.
@param className the name of the bean class
@param parentName the name of the bean's parent bean
@return the newly created bean definition
@throws java.lang.ClassNotFoundException
if bean class resolution was attempted but failed | [
"Create",
"a",
"bean",
"definition",
"for",
"the",
"given",
"class",
"name",
"and",
"parent",
"name",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L320-L323 |
142,128 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseConstructorArgElements | public void parseConstructorArgElements(Element beanEle, BeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, CONSTRUCTOR_ARG_ELEMENT))
parseConstructorArgElement((El... | java | public void parseConstructorArgElements(Element beanEle, BeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, CONSTRUCTOR_ARG_ELEMENT))
parseConstructorArgElement((El... | [
"public",
"void",
"parseConstructorArgElements",
"(",
"Element",
"beanEle",
",",
"BeanDefinition",
"bd",
")",
"{",
"NodeList",
"nl",
"=",
"beanEle",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl",
".",
"getLeng... | Parse constructor-arg sub-elements of the given bean element.
@param beanEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object. | [
"Parse",
"constructor",
"-",
"arg",
"sub",
"-",
"elements",
"of",
"the",
"given",
"bean",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L377-L384 |
142,129 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parsePropertyElements | public void parsePropertyElements(Element beanEle, BeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, PROPERTY_ELEMENT))
parsePropertyElement((Element) node, bd);
... | java | public void parsePropertyElements(Element beanEle, BeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, PROPERTY_ELEMENT))
parsePropertyElement((Element) node, bd);
... | [
"public",
"void",
"parsePropertyElements",
"(",
"Element",
"beanEle",
",",
"BeanDefinition",
"bd",
")",
"{",
"NodeList",
"nl",
"=",
"beanEle",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl",
".",
"getLength",
... | Parse property sub-elements of the given bean element.
@param beanEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object. | [
"Parse",
"property",
"sub",
"-",
"elements",
"of",
"the",
"given",
"bean",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L392-L399 |
142,130 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseQualifierElements | public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ELEMENT))
parseQualifierElement((Element) n... | java | public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ELEMENT))
parseQualifierElement((Element) n... | [
"public",
"void",
"parseQualifierElements",
"(",
"Element",
"beanEle",
",",
"AbstractBeanDefinition",
"bd",
")",
"{",
"NodeList",
"nl",
"=",
"beanEle",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl",
".",
"getL... | Parse qualifier sub-elements of the given bean element.
@param beanEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object. | [
"Parse",
"qualifier",
"sub",
"-",
"elements",
"of",
"the",
"given",
"bean",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L407-L414 |
142,131 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseLookupOverrideSubElements | public void parseLookupOverrideSubElements(Element beanEle, MethodOverrides overrides) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, LOOKUP_METHOD_ELEMENT)) {
Element ele = (Elem... | java | public void parseLookupOverrideSubElements(Element beanEle, MethodOverrides overrides) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, LOOKUP_METHOD_ELEMENT)) {
Element ele = (Elem... | [
"public",
"void",
"parseLookupOverrideSubElements",
"(",
"Element",
"beanEle",
",",
"MethodOverrides",
"overrides",
")",
"{",
"NodeList",
"nl",
"=",
"beanEle",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl",
".",... | Parse lookup-override sub-elements of the given bean element.
@param beanEle a {@link org.w3c.dom.Element} object.
@param overrides a {@link org.springframework.beans.factory.support.MethodOverrides} object. | [
"Parse",
"lookup",
"-",
"override",
"sub",
"-",
"elements",
"of",
"the",
"given",
"bean",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L422-L435 |
142,132 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseReplacedMethodSubElements | public void parseReplacedMethodSubElements(Element beanEle, MethodOverrides overrides) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, REPLACED_METHOD_ELEMENT)) {
Element replacedM... | java | public void parseReplacedMethodSubElements(Element beanEle, MethodOverrides overrides) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, REPLACED_METHOD_ELEMENT)) {
Element replacedM... | [
"public",
"void",
"parseReplacedMethodSubElements",
"(",
"Element",
"beanEle",
",",
"MethodOverrides",
"overrides",
")",
"{",
"NodeList",
"nl",
"=",
"beanEle",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl",
".",... | Parse replaced-method sub-elements of the given bean element.
@param beanEle a {@link org.w3c.dom.Element} object.
@param overrides a {@link org.springframework.beans.factory.support.MethodOverrides} object. | [
"Parse",
"replaced",
"-",
"method",
"sub",
"-",
"elements",
"of",
"the",
"given",
"bean",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L443-L461 |
142,133 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseConstructorArgElement | public void parseConstructorArgElement(Element ele, BeanDefinition bd) {
String indexAttr = ele.getAttribute(INDEX_ATTRIBUTE);
String typeAttr = ele.getAttribute(TYPE_ATTRIBUTE);
String nameAttr = ele.getAttribute(NAME_ATTRIBUTE);
if (StringUtils.hasLength(indexAttr)) {
try {
int index = I... | java | public void parseConstructorArgElement(Element ele, BeanDefinition bd) {
String indexAttr = ele.getAttribute(INDEX_ATTRIBUTE);
String typeAttr = ele.getAttribute(TYPE_ATTRIBUTE);
String nameAttr = ele.getAttribute(NAME_ATTRIBUTE);
if (StringUtils.hasLength(indexAttr)) {
try {
int index = I... | [
"public",
"void",
"parseConstructorArgElement",
"(",
"Element",
"ele",
",",
"BeanDefinition",
"bd",
")",
"{",
"String",
"indexAttr",
"=",
"ele",
".",
"getAttribute",
"(",
"INDEX_ATTRIBUTE",
")",
";",
"String",
"typeAttr",
"=",
"ele",
".",
"getAttribute",
"(",
... | Parse a constructor-arg element.
@param ele a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object. | [
"Parse",
"a",
"constructor",
"-",
"arg",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L469-L512 |
142,134 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parsePropertyElement | public void parsePropertyElement(Element ele, BeanDefinition bd) {
String propertyName = ele.getAttribute(NAME_ATTRIBUTE);
if (!StringUtils.hasLength(propertyName)) {
error("Tag 'property' must have a 'name' attribute", ele);
return;
}
this.parseState.push(new PropertyEntry(propertyName));
... | java | public void parsePropertyElement(Element ele, BeanDefinition bd) {
String propertyName = ele.getAttribute(NAME_ATTRIBUTE);
if (!StringUtils.hasLength(propertyName)) {
error("Tag 'property' must have a 'name' attribute", ele);
return;
}
this.parseState.push(new PropertyEntry(propertyName));
... | [
"public",
"void",
"parsePropertyElement",
"(",
"Element",
"ele",
",",
"BeanDefinition",
"bd",
")",
"{",
"String",
"propertyName",
"=",
"ele",
".",
"getAttribute",
"(",
"NAME_ATTRIBUTE",
")",
";",
"if",
"(",
"!",
"StringUtils",
".",
"hasLength",
"(",
"propertyN... | Parse a property element.
@param ele a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object. | [
"Parse",
"a",
"property",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L520-L540 |
142,135 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseQualifierElement | public void parseQualifierElement(Element ele, AbstractBeanDefinition bd) {
String typeName = ele.getAttribute(TYPE_ATTRIBUTE);
if (!StringUtils.hasLength(typeName)) {
error("Tag 'qualifier' must have a 'type' attribute", ele);
return;
}
this.parseState.push(new QualifierEntry(typeName));
... | java | public void parseQualifierElement(Element ele, AbstractBeanDefinition bd) {
String typeName = ele.getAttribute(TYPE_ATTRIBUTE);
if (!StringUtils.hasLength(typeName)) {
error("Tag 'qualifier' must have a 'type' attribute", ele);
return;
}
this.parseState.push(new QualifierEntry(typeName));
... | [
"public",
"void",
"parseQualifierElement",
"(",
"Element",
"ele",
",",
"AbstractBeanDefinition",
"bd",
")",
"{",
"String",
"typeName",
"=",
"ele",
".",
"getAttribute",
"(",
"TYPE_ATTRIBUTE",
")",
";",
"if",
"(",
"!",
"StringUtils",
".",
"hasLength",
"(",
"type... | Parse a qualifier element.
@param ele a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object. | [
"Parse",
"a",
"qualifier",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L548-L583 |
142,136 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parsePropertyValue | public Object parsePropertyValue(Element ele, BeanDefinition bd, String propertyName) {
String elementName = (propertyName != null) ? "<property> element for property '" + propertyName + "'"
: "<constructor-arg> element";
// Should only have one child element: ref, value, list, etc.
NodeList nl = e... | java | public Object parsePropertyValue(Element ele, BeanDefinition bd, String propertyName) {
String elementName = (propertyName != null) ? "<property> element for property '" + propertyName + "'"
: "<constructor-arg> element";
// Should only have one child element: ref, value, list, etc.
NodeList nl = e... | [
"public",
"Object",
"parsePropertyValue",
"(",
"Element",
"ele",
",",
"BeanDefinition",
"bd",
",",
"String",
"propertyName",
")",
"{",
"String",
"elementName",
"=",
"(",
"propertyName",
"!=",
"null",
")",
"?",
"\"<property> element for property '\"",
"+",
"propertyN... | Get the value of a property element. May be a list etc. Also used for
constructor arguments, "propertyName" being null in this case.
@param ele a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
@param propertyName a {@link java.lang.String} object... | [
"Get",
"the",
"value",
"of",
"a",
"property",
"element",
".",
"May",
"be",
"a",
"list",
"etc",
".",
"Also",
"used",
"for",
"constructor",
"arguments",
"propertyName",
"being",
"null",
"in",
"this",
"case",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L594-L639 |
142,137 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parsePropertySubElement | public Object parsePropertySubElement(Element ele, BeanDefinition bd, String defaultValueType) {
if (!isDefaultNamespace(getNamespaceURI(ele))) {
error("Cannot support nested element .", ele);
return null;
} else if (nodeNameEquals(ele, BEAN_ELEMENT)) {
BeanDefinitionHolder nestedBd = parseBea... | java | public Object parsePropertySubElement(Element ele, BeanDefinition bd, String defaultValueType) {
if (!isDefaultNamespace(getNamespaceURI(ele))) {
error("Cannot support nested element .", ele);
return null;
} else if (nodeNameEquals(ele, BEAN_ELEMENT)) {
BeanDefinitionHolder nestedBd = parseBea... | [
"public",
"Object",
"parsePropertySubElement",
"(",
"Element",
"ele",
",",
"BeanDefinition",
"bd",
",",
"String",
"defaultValueType",
")",
"{",
"if",
"(",
"!",
"isDefaultNamespace",
"(",
"getNamespaceURI",
"(",
"ele",
")",
")",
")",
"{",
"error",
"(",
"\"Canno... | Parse a value, ref or collection sub-element of a property or
constructor-arg element.
@param ele subelement of property element; we don't know which yet
@param defaultValueType the default type (class name) for any <code><value></code> tag
that might be created
@param bd a {@link org.springframework.beans.facto... | [
"Parse",
"a",
"value",
"ref",
"or",
"collection",
"sub",
"-",
"element",
"of",
"a",
"property",
"or",
"constructor",
"-",
"arg",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L664-L721 |
142,138 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseIdRefElement | public Object parseIdRefElement(Element ele) {
// A generic reference to any name of any bean.
String refName = ele.getAttribute(BEAN_REF_ATTRIBUTE);
if (!StringUtils.hasLength(refName)) {
// A reference to the id of another bean in the same XML file.
refName = ele.getAttribute(LOCAL_REF_ATTRIBU... | java | public Object parseIdRefElement(Element ele) {
// A generic reference to any name of any bean.
String refName = ele.getAttribute(BEAN_REF_ATTRIBUTE);
if (!StringUtils.hasLength(refName)) {
// A reference to the id of another bean in the same XML file.
refName = ele.getAttribute(LOCAL_REF_ATTRIBU... | [
"public",
"Object",
"parseIdRefElement",
"(",
"Element",
"ele",
")",
"{",
"// A generic reference to any name of any bean.",
"String",
"refName",
"=",
"ele",
".",
"getAttribute",
"(",
"BEAN_REF_ATTRIBUTE",
")",
";",
"if",
"(",
"!",
"StringUtils",
".",
"hasLength",
"... | Return a typed String value Object for the given 'idref' element.
@param ele a {@link org.w3c.dom.Element} object.
@return a {@link java.lang.Object} object. | [
"Return",
"a",
"typed",
"String",
"value",
"Object",
"for",
"the",
"given",
"idref",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L729-L747 |
142,139 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseValueElement | public Object parseValueElement(Element ele, String defaultTypeName) {
// It's a literal value.
String value = DomUtils.getTextValue(ele);
String specifiedTypeName = ele.getAttribute(TYPE_ATTRIBUTE);
String typeName = specifiedTypeName;
if (!StringUtils.hasText(typeName)) typeName = defaultTypeName;... | java | public Object parseValueElement(Element ele, String defaultTypeName) {
// It's a literal value.
String value = DomUtils.getTextValue(ele);
String specifiedTypeName = ele.getAttribute(TYPE_ATTRIBUTE);
String typeName = specifiedTypeName;
if (!StringUtils.hasText(typeName)) typeName = defaultTypeName;... | [
"public",
"Object",
"parseValueElement",
"(",
"Element",
"ele",
",",
"String",
"defaultTypeName",
")",
"{",
"// It's a literal value.",
"String",
"value",
"=",
"DomUtils",
".",
"getTextValue",
"(",
"ele",
")",
";",
"String",
"specifiedTypeName",
"=",
"ele",
".",
... | Return a typed String value Object for the given value element.
@param ele a {@link org.w3c.dom.Element} object.
@param defaultTypeName a {@link java.lang.String} object.
@return a {@link java.lang.Object} object. | [
"Return",
"a",
"typed",
"String",
"value",
"Object",
"for",
"the",
"given",
"value",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L756-L771 |
142,140 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseArrayElement | public Object parseArrayElement(Element arrayEle, BeanDefinition bd) {
String elementType = arrayEle.getAttribute(VALUE_TYPE_ATTRIBUTE);
NodeList nl = arrayEle.getChildNodes();
ManagedArray target = new ManagedArray(elementType, nl.getLength());
target.setSource(extractSource(arrayEle));
target.setE... | java | public Object parseArrayElement(Element arrayEle, BeanDefinition bd) {
String elementType = arrayEle.getAttribute(VALUE_TYPE_ATTRIBUTE);
NodeList nl = arrayEle.getChildNodes();
ManagedArray target = new ManagedArray(elementType, nl.getLength());
target.setSource(extractSource(arrayEle));
target.setE... | [
"public",
"Object",
"parseArrayElement",
"(",
"Element",
"arrayEle",
",",
"BeanDefinition",
"bd",
")",
"{",
"String",
"elementType",
"=",
"arrayEle",
".",
"getAttribute",
"(",
"VALUE_TYPE_ATTRIBUTE",
")",
";",
"NodeList",
"nl",
"=",
"arrayEle",
".",
"getChildNodes... | Parse an array element.
@param arrayEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
@return a {@link java.lang.Object} object. | [
"Parse",
"an",
"array",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L797-L806 |
142,141 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseListElement | public List<Object> parseListElement(Element collectionEle, BeanDefinition bd) {
String defaultElementType = collectionEle.getAttribute(VALUE_TYPE_ATTRIBUTE);
NodeList nl = collectionEle.getChildNodes();
ManagedList<Object> target = new ManagedList<Object>(nl.getLength());
target.setSource(extractSource... | java | public List<Object> parseListElement(Element collectionEle, BeanDefinition bd) {
String defaultElementType = collectionEle.getAttribute(VALUE_TYPE_ATTRIBUTE);
NodeList nl = collectionEle.getChildNodes();
ManagedList<Object> target = new ManagedList<Object>(nl.getLength());
target.setSource(extractSource... | [
"public",
"List",
"<",
"Object",
">",
"parseListElement",
"(",
"Element",
"collectionEle",
",",
"BeanDefinition",
"bd",
")",
"{",
"String",
"defaultElementType",
"=",
"collectionEle",
".",
"getAttribute",
"(",
"VALUE_TYPE_ATTRIBUTE",
")",
";",
"NodeList",
"nl",
"=... | Parse a list element.
@param collectionEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
@return a {@link java.util.List} object. | [
"Parse",
"a",
"list",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L815-L824 |
142,142 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseSetElement | public Set<Object> parseSetElement(Element collectionEle, BeanDefinition bd) {
String defaultElementType = collectionEle.getAttribute(VALUE_TYPE_ATTRIBUTE);
NodeList nl = collectionEle.getChildNodes();
ManagedSet<Object> target = new ManagedSet<Object>(nl.getLength());
target.setSource(extractSource(col... | java | public Set<Object> parseSetElement(Element collectionEle, BeanDefinition bd) {
String defaultElementType = collectionEle.getAttribute(VALUE_TYPE_ATTRIBUTE);
NodeList nl = collectionEle.getChildNodes();
ManagedSet<Object> target = new ManagedSet<Object>(nl.getLength());
target.setSource(extractSource(col... | [
"public",
"Set",
"<",
"Object",
">",
"parseSetElement",
"(",
"Element",
"collectionEle",
",",
"BeanDefinition",
"bd",
")",
"{",
"String",
"defaultElementType",
"=",
"collectionEle",
".",
"getAttribute",
"(",
"VALUE_TYPE_ATTRIBUTE",
")",
";",
"NodeList",
"nl",
"=",... | Parse a set element.
@param collectionEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
@return a {@link java.util.Set} object. | [
"Parse",
"a",
"set",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L833-L842 |
142,143 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseKeyElement | protected Object parseKeyElement(Element keyEle, BeanDefinition bd, String defaultKeyTypeName) {
NodeList nl = keyEle.getChildNodes();
Element subElement = null;
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element) {
// Child element is what we'... | java | protected Object parseKeyElement(Element keyEle, BeanDefinition bd, String defaultKeyTypeName) {
NodeList nl = keyEle.getChildNodes();
Element subElement = null;
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element) {
// Child element is what we'... | [
"protected",
"Object",
"parseKeyElement",
"(",
"Element",
"keyEle",
",",
"BeanDefinition",
"bd",
",",
"String",
"defaultKeyTypeName",
")",
"{",
"NodeList",
"nl",
"=",
"keyEle",
".",
"getChildNodes",
"(",
")",
";",
"Element",
"subElement",
"=",
"null",
";",
"fo... | Parse a key sub-element of a map element.
@param keyEle a {@link org.w3c.dom.Element} object.
@param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
@param defaultKeyTypeName a {@link java.lang.String} object.
@return a {@link java.lang.Object} object. | [
"Parse",
"a",
"key",
"sub",
"-",
"element",
"of",
"a",
"map",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L990-L1003 |
142,144 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parsePropsElement | public Properties parsePropsElement(Element propsEle) {
ManagedProperties props = new ManagedProperties();
props.setSource(extractSource(propsEle));
props.setMergeEnabled(parseMergeAttribute(propsEle));
List<Element> propEles = DomUtils.getChildElementsByTagName(propsEle, PROP_ELEMENT);
for (Elemen... | java | public Properties parsePropsElement(Element propsEle) {
ManagedProperties props = new ManagedProperties();
props.setSource(extractSource(propsEle));
props.setMergeEnabled(parseMergeAttribute(propsEle));
List<Element> propEles = DomUtils.getChildElementsByTagName(propsEle, PROP_ELEMENT);
for (Elemen... | [
"public",
"Properties",
"parsePropsElement",
"(",
"Element",
"propsEle",
")",
"{",
"ManagedProperties",
"props",
"=",
"new",
"ManagedProperties",
"(",
")",
";",
"props",
".",
"setSource",
"(",
"extractSource",
"(",
"propsEle",
")",
")",
";",
"props",
".",
"set... | Parse a props element.
@param propsEle a {@link org.w3c.dom.Element} object.
@return a {@link java.util.Properties} object. | [
"Parse",
"a",
"props",
"element",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L1011-L1030 |
142,145 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java | BeanDefinitionParser.parseMergeAttribute | public boolean parseMergeAttribute(Element collectionElement) {
String value = collectionElement.getAttribute(MERGE_ATTRIBUTE);
return TRUE_VALUE.equals(value);
} | java | public boolean parseMergeAttribute(Element collectionElement) {
String value = collectionElement.getAttribute(MERGE_ATTRIBUTE);
return TRUE_VALUE.equals(value);
} | [
"public",
"boolean",
"parseMergeAttribute",
"(",
"Element",
"collectionElement",
")",
"{",
"String",
"value",
"=",
"collectionElement",
".",
"getAttribute",
"(",
"MERGE_ATTRIBUTE",
")",
";",
"return",
"TRUE_VALUE",
".",
"equals",
"(",
"value",
")",
";",
"}"
] | Parse the merge attribute of a collection element, if any.
@param collectionElement a {@link org.w3c.dom.Element} object.
@return a boolean. | [
"Parse",
"the",
"merge",
"attribute",
"of",
"a",
"collection",
"element",
"if",
"any",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L1038-L1041 |
142,146 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/web/filter/GenericHttpFilter.java | GenericHttpFilter.init | public final void init(FilterConfig filterConfig) throws ServletException {
Assert.notNull(filterConfig, "FilterConfig must not be null");
logger.debug("Initializing filter '{}'", filterConfig.getFilterName());
this.filterConfig = filterConfig;
initParams(filterConfig);
// Let subclasses do whateve... | java | public final void init(FilterConfig filterConfig) throws ServletException {
Assert.notNull(filterConfig, "FilterConfig must not be null");
logger.debug("Initializing filter '{}'", filterConfig.getFilterName());
this.filterConfig = filterConfig;
initParams(filterConfig);
// Let subclasses do whateve... | [
"public",
"final",
"void",
"init",
"(",
"FilterConfig",
"filterConfig",
")",
"throws",
"ServletException",
"{",
"Assert",
".",
"notNull",
"(",
"filterConfig",
",",
"\"FilterConfig must not be null\"",
")",
";",
"logger",
".",
"debug",
"(",
"\"Initializing filter '{}'\... | Standard way of initializing this filter. Map config parameters onto bean
properties of this filter, and invoke subclass initialization.
@param filterConfig
the configuration for this filter
@throws ServletException
if bean properties are invalid (or required properties are
missing), or if subclass initialization fail... | [
"Standard",
"way",
"of",
"initializing",
"this",
"filter",
".",
"Map",
"config",
"parameters",
"onto",
"bean",
"properties",
"of",
"this",
"filter",
"and",
"invoke",
"subclass",
"initialization",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/web/filter/GenericHttpFilter.java#L98-L107 |
142,147 | beangle/beangle3 | orm/hibernate/src/main/java/org/beangle/orm/hibernate/tool/DdlGenerator.java | DdlGenerator.getPropertyType | private Class<?> getPropertyType(PersistentClass pc, String propertyString) {
String[] properties = split(propertyString, '.');
Property p = pc.getProperty(properties[0]);
Component cp = ((Component) p.getValue());
int i = 1;
for (; i < properties.length; i++) {
p = cp.getProperty(properties[i... | java | private Class<?> getPropertyType(PersistentClass pc, String propertyString) {
String[] properties = split(propertyString, '.');
Property p = pc.getProperty(properties[0]);
Component cp = ((Component) p.getValue());
int i = 1;
for (; i < properties.length; i++) {
p = cp.getProperty(properties[i... | [
"private",
"Class",
"<",
"?",
">",
"getPropertyType",
"(",
"PersistentClass",
"pc",
",",
"String",
"propertyString",
")",
"{",
"String",
"[",
"]",
"properties",
"=",
"split",
"(",
"propertyString",
",",
"'",
"'",
")",
";",
"Property",
"p",
"=",
"pc",
"."... | get component class by component property string
@param pc
@param propertyString
@return | [
"get",
"component",
"class",
"by",
"component",
"property",
"string"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/tool/DdlGenerator.java#L206-L216 |
142,148 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java | EntityActionSupport.getId | protected final <T> T getId(String name, Class<T> clazz) {
Object[] entityIds = getAll(name + ".id");
if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id");
if (Arrays.isEmpty(entityIds)) entityIds = getAll("id");
if (Arrays.isEmpty(entityIds)) return null;
else {
String entityId = en... | java | protected final <T> T getId(String name, Class<T> clazz) {
Object[] entityIds = getAll(name + ".id");
if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id");
if (Arrays.isEmpty(entityIds)) entityIds = getAll("id");
if (Arrays.isEmpty(entityIds)) return null;
else {
String entityId = en... | [
"protected",
"final",
"<",
"T",
">",
"T",
"getId",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"Object",
"[",
"]",
"entityIds",
"=",
"getAll",
"(",
"name",
"+",
"\".id\"",
")",
";",
"if",
"(",
"Arrays",
".",
"isEmpty",
... | Get entity's id from shortname.id,shortnameId,id
@param name
@param clazz | [
"Get",
"entity",
"s",
"id",
"from",
"shortname",
".",
"id",
"shortnameId",
"id"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java#L47-L58 |
142,149 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java | EntityActionSupport.getIds | protected final <T> T[] getIds(String name, Class<T> clazz) {
T[] datas = Params.getAll(name + ".id", clazz);
if (null == datas) {
String datastring = Params.get(name + ".ids");
if (null == datastring) datastring = Params.get(name + "Ids");
if (null == datastring) Array.newInstance(clazz, 0);
... | java | protected final <T> T[] getIds(String name, Class<T> clazz) {
T[] datas = Params.getAll(name + ".id", clazz);
if (null == datas) {
String datastring = Params.get(name + ".ids");
if (null == datastring) datastring = Params.get(name + "Ids");
if (null == datastring) Array.newInstance(clazz, 0);
... | [
"protected",
"final",
"<",
"T",
">",
"T",
"[",
"]",
"getIds",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"T",
"[",
"]",
"datas",
"=",
"Params",
".",
"getAll",
"(",
"name",
"+",
"\".id\"",
",",
"clazz",
")",
";",
"if"... | Get entity's id array from parameters shortname.id,shortname.ids,shortnameIds
@param name
@param clazz
@return empty array if not found | [
"Get",
"entity",
"s",
"id",
"array",
"from",
"parameters",
"shortname",
".",
"id",
"shortname",
".",
"ids",
"shortnameIds"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java#L93-L102 |
142,150 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/cache/caffeine/CaffeineCache.java | CaffeineCache.evict | @Override
public void evict(K key) {
Object existed = store.getIfPresent(key);
if (null != existed) store.invalidate(key);
} | java | @Override
public void evict(K key) {
Object existed = store.getIfPresent(key);
if (null != existed) store.invalidate(key);
} | [
"@",
"Override",
"public",
"void",
"evict",
"(",
"K",
"key",
")",
"{",
"Object",
"existed",
"=",
"store",
".",
"getIfPresent",
"(",
"key",
")",
";",
"if",
"(",
"null",
"!=",
"existed",
")",
"store",
".",
"invalidate",
"(",
"key",
")",
";",
"}"
] | Evict specified key | [
"Evict",
"specified",
"key"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/cache/caffeine/CaffeineCache.java#L48-L52 |
142,151 | beangle/beangle3 | security/ids/src/main/java/org/beangle/security/ids/CasEntryPoint.java | CasEntryPoint.constructLocalLoginServiceUrl | public String constructLocalLoginServiceUrl(final HttpServletRequest request,
final HttpServletResponse response, final String service, final String serverName,
final String artifactParameterName, final boolean encode) {
if (Strings.isNotBlank(service)) return encode ? response.encodeURL(service) : serv... | java | public String constructLocalLoginServiceUrl(final HttpServletRequest request,
final HttpServletResponse response, final String service, final String serverName,
final String artifactParameterName, final boolean encode) {
if (Strings.isNotBlank(service)) return encode ? response.encodeURL(service) : serv... | [
"public",
"String",
"constructLocalLoginServiceUrl",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
",",
"final",
"String",
"service",
",",
"final",
"String",
"serverName",
",",
"final",
"String",
"artifactParameterName",
... | Construct local login Service Url
@param request
@param response
@param service
@param serverName
@param artifactParameterName
@param encode | [
"Construct",
"local",
"login",
"Service",
"Url"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/security/ids/src/main/java/org/beangle/security/ids/CasEntryPoint.java#L116-L130 |
142,152 | beangle/beangle3 | security/ids/src/main/java/org/beangle/security/ids/CasEntryPoint.java | CasEntryPoint.constructServiceUrl | public String constructServiceUrl(final HttpServletRequest request, final HttpServletResponse response,
final String service, final String serverName) {
if (Strings.isNotBlank(service)) { return response.encodeURL(service); }
final StringBuilder buffer = new StringBuilder();
if (!serverName.startsWit... | java | public String constructServiceUrl(final HttpServletRequest request, final HttpServletResponse response,
final String service, final String serverName) {
if (Strings.isNotBlank(service)) { return response.encodeURL(service); }
final StringBuilder buffer = new StringBuilder();
if (!serverName.startsWit... | [
"public",
"String",
"constructServiceUrl",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
",",
"final",
"String",
"service",
",",
"final",
"String",
"serverName",
")",
"{",
"if",
"(",
"Strings",
".",
"isNotBlank",
"... | Constructs a service url from the HttpServletRequest or from the given
serviceUrl. Prefers the serviceUrl provided if both a serviceUrl and a
serviceName.
@param request the HttpServletRequest
@param response the HttpServletResponse
@param service the configured service url (this will be used if not null)
@param serve... | [
"Constructs",
"a",
"service",
"url",
"from",
"the",
"HttpServletRequest",
"or",
"from",
"the",
"given",
"serviceUrl",
".",
"Prefers",
"the",
"serviceUrl",
"provided",
"if",
"both",
"a",
"serviceUrl",
"and",
"a",
"serviceName",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/security/ids/src/main/java/org/beangle/security/ids/CasEntryPoint.java#L145-L183 |
142,153 | beangle/beangle3 | security/ids/src/main/java/org/beangle/security/ids/CasEntryPoint.java | CasEntryPoint.constructRedirectUrl | public String constructRedirectUrl(final String casServerLoginUrl, final String serviceParameterName,
final String serviceUrl, final boolean renew, final boolean gateway) {
try {
return casServerLoginUrl + (casServerLoginUrl.indexOf("?") != -1 ? "&" : "?") + serviceParameterName
+ "=" + URLEnc... | java | public String constructRedirectUrl(final String casServerLoginUrl, final String serviceParameterName,
final String serviceUrl, final boolean renew, final boolean gateway) {
try {
return casServerLoginUrl + (casServerLoginUrl.indexOf("?") != -1 ? "&" : "?") + serviceParameterName
+ "=" + URLEnc... | [
"public",
"String",
"constructRedirectUrl",
"(",
"final",
"String",
"casServerLoginUrl",
",",
"final",
"String",
"serviceParameterName",
",",
"final",
"String",
"serviceUrl",
",",
"final",
"boolean",
"renew",
",",
"final",
"boolean",
"gateway",
")",
"{",
"try",
"{... | Constructs the URL to use to redirect to the CAS server.
@param casServerLoginUrl the CAS Server login url.
@param serviceParameterName the name of the parameter that defines the service.
@param serviceUrl the actual service's url.
@param renew whether we should send renew or not.
@param gateway where we should send g... | [
"Constructs",
"the",
"URL",
"to",
"use",
"to",
"redirect",
"to",
"the",
"CAS",
"server",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/security/ids/src/main/java/org/beangle/security/ids/CasEntryPoint.java#L195-L205 |
142,154 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/web/ServletContextResource.java | ServletContextResource.createRelative | @Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new ServletContextResource(this.servletContext, pathToUse);
} | java | @Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new ServletContextResource(this.servletContext, pathToUse);
} | [
"@",
"Override",
"public",
"Resource",
"createRelative",
"(",
"String",
"relativePath",
")",
"{",
"String",
"pathToUse",
"=",
"StringUtils",
".",
"applyRelativePath",
"(",
"this",
".",
"path",
",",
"relativePath",
")",
";",
"return",
"new",
"ServletContextResource... | This implementation creates a ServletContextResource, applying the given path
relative to the path of the underlying file of this resource descriptor. | [
"This",
"implementation",
"creates",
"a",
"ServletContextResource",
"applying",
"the",
"given",
"path",
"relative",
"to",
"the",
"path",
"of",
"the",
"underlying",
"file",
"of",
"this",
"resource",
"descriptor",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/web/ServletContextResource.java#L143-L147 |
142,155 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/Arrays.java | Arrays.join | public static byte[] join(List<byte[]> arrays) {
int maxlength = 0;
for (byte[] array : arrays) {
maxlength += array.length;
}
byte[] rs = new byte[maxlength];
int pos = 0;
for (byte[] array : arrays) {
System.arraycopy(array, 0, rs, pos, array.length);
pos += array.length;
... | java | public static byte[] join(List<byte[]> arrays) {
int maxlength = 0;
for (byte[] array : arrays) {
maxlength += array.length;
}
byte[] rs = new byte[maxlength];
int pos = 0;
for (byte[] array : arrays) {
System.arraycopy(array, 0, rs, pos, array.length);
pos += array.length;
... | [
"public",
"static",
"byte",
"[",
"]",
"join",
"(",
"List",
"<",
"byte",
"[",
"]",
">",
"arrays",
")",
"{",
"int",
"maxlength",
"=",
"0",
";",
"for",
"(",
"byte",
"[",
"]",
"array",
":",
"arrays",
")",
"{",
"maxlength",
"+=",
"array",
".",
"length... | join multi array
@param arrays
@return | [
"join",
"multi",
"array"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Arrays.java#L108-L120 |
142,156 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/convention/mapper/ConventionActionMapper.java | ConventionActionMapper.getMapping | public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
ActionMapping mapping = new ActionMapping();
parseNameAndNamespace(RequestUtils.getServletPath(request), mapping);
String method = request.getParameter(MethodParam);
if (Strings.isNotEmpty(method)) mapping... | java | public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
ActionMapping mapping = new ActionMapping();
parseNameAndNamespace(RequestUtils.getServletPath(request), mapping);
String method = request.getParameter(MethodParam);
if (Strings.isNotEmpty(method)) mapping... | [
"public",
"ActionMapping",
"getMapping",
"(",
"HttpServletRequest",
"request",
",",
"ConfigurationManager",
"configManager",
")",
"{",
"ActionMapping",
"mapping",
"=",
"new",
"ActionMapping",
"(",
")",
";",
"parseNameAndNamespace",
"(",
"RequestUtils",
".",
"getServletP... | reserved method parameter | [
"reserved",
"method",
"parameter"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/convention/mapper/ConventionActionMapper.java#L95-L102 |
142,157 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/codec/net/BCoder.java | BCoder.encode | public String encode(String value) {
if (value == null) { return null; }
StringBuilder buffer = new StringBuilder();
buffer.append(Prefix);
buffer.append(charset);
buffer.append(Sep);
buffer.append(getEncoding());
buffer.append(Sep);
buffer.append(new String(Base64.encode(value.getBytes(... | java | public String encode(String value) {
if (value == null) { return null; }
StringBuilder buffer = new StringBuilder();
buffer.append(Prefix);
buffer.append(charset);
buffer.append(Sep);
buffer.append(getEncoding());
buffer.append(Sep);
buffer.append(new String(Base64.encode(value.getBytes(... | [
"public",
"String",
"encode",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Prefix",
")",
... | Encodes a string into its Base64 form using the default charset. Unsafe characters are escaped.
@param value string to convert to Base64 form
@return Base64 string | [
"Encodes",
"a",
"string",
"into",
"its",
"Base64",
"form",
"using",
"the",
"default",
"charset",
".",
"Unsafe",
"characters",
"are",
"escaped",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/codec/net/BCoder.java#L92-L103 |
142,158 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/codec/net/BCoder.java | BCoder.decode | public String decode(String text) {
if (text == null) { return null; }
if ((!text.startsWith(Prefix)) || (!text.endsWith(Postfix)))
throw new IllegalArgumentException("RFC 1522 violation: malformed encoded content");
int terminator = text.length() - 2;
int from = 2;
int to = text.indexOf(Sep, ... | java | public String decode(String text) {
if (text == null) { return null; }
if ((!text.startsWith(Prefix)) || (!text.endsWith(Postfix)))
throw new IllegalArgumentException("RFC 1522 violation: malformed encoded content");
int terminator = text.length() - 2;
int from = 2;
int to = text.indexOf(Sep, ... | [
"public",
"String",
"decode",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"(",
"!",
"text",
".",
"startsWith",
"(",
"Prefix",
")",
")",
"||",
"(",
"!",
"text",
".",
"endsWith"... | Decodes a Base64 string into its original form. Escaped characters are converted back to their
original
representation.
@param value Base64 string to convert into its original form
@return original string | [
"Decodes",
"a",
"Base64",
"string",
"into",
"its",
"original",
"form",
".",
"Escaped",
"characters",
"are",
"converted",
"back",
"to",
"their",
"original",
"representation",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/codec/net/BCoder.java#L113-L132 |
142,159 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/web/util/CookieUtils.java | CookieUtils.getCookie | public static Cookie getCookie(HttpServletRequest request, String name) {
Cookie[] cookies = request.getCookies();
Cookie returnCookie = null;
if (cookies == null) { return returnCookie; }
for (int i = 0; i < cookies.length; i++) {
Cookie thisCookie = cookies[i];
if (thisCookie.getName().eq... | java | public static Cookie getCookie(HttpServletRequest request, String name) {
Cookie[] cookies = request.getCookies();
Cookie returnCookie = null;
if (cookies == null) { return returnCookie; }
for (int i = 0; i < cookies.length; i++) {
Cookie thisCookie = cookies[i];
if (thisCookie.getName().eq... | [
"public",
"static",
"Cookie",
"getCookie",
"(",
"HttpServletRequest",
"request",
",",
"String",
"name",
")",
"{",
"Cookie",
"[",
"]",
"cookies",
"=",
"request",
".",
"getCookies",
"(",
")",
";",
"Cookie",
"returnCookie",
"=",
"null",
";",
"if",
"(",
"cooki... | Convenience method to get a cookie by name
@param request
the current request
@param name
the name of the cookie to find
@return the cookie (if found), null if not found | [
"Convenience",
"method",
"to",
"get",
"a",
"cookie",
"by",
"name"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/web/util/CookieUtils.java#L83-L96 |
142,160 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/web/util/CookieUtils.java | CookieUtils.deleteCookie | public static void deleteCookie(HttpServletResponse response, Cookie cookie, String path) {
if (cookie != null) {
// Delete the cookie by setting its maximum age to zero
cookie.setMaxAge(0);
cookie.setPath(path);
response.addCookie(cookie);
}
} | java | public static void deleteCookie(HttpServletResponse response, Cookie cookie, String path) {
if (cookie != null) {
// Delete the cookie by setting its maximum age to zero
cookie.setMaxAge(0);
cookie.setPath(path);
response.addCookie(cookie);
}
} | [
"public",
"static",
"void",
"deleteCookie",
"(",
"HttpServletResponse",
"response",
",",
"Cookie",
"cookie",
",",
"String",
"path",
")",
"{",
"if",
"(",
"cookie",
"!=",
"null",
")",
"{",
"// Delete the cookie by setting its maximum age to zero",
"cookie",
".",
"setM... | Convenience method for deleting a cookie by name
@param response
the current web response
@param cookie
the cookie to delete
@param path
the path on which the cookie was set (i.e. /appfuse) | [
"Convenience",
"method",
"for",
"deleting",
"a",
"cookie",
"by",
"name"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/web/util/CookieUtils.java#L156-L163 |
142,161 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/web/resource/filter/HeaderFilter.java | HeaderFilter.lastModified | private long lastModified(URL url) {
if (url.getProtocol().equals("file")) {
return new File(url.getFile()).lastModified();
} else {
try {
URLConnection conn = url.openConnection();
if (conn instanceof JarURLConnection) {
URL jarURL = ((JarURLConnection) conn).getJarFileURL... | java | private long lastModified(URL url) {
if (url.getProtocol().equals("file")) {
return new File(url.getFile()).lastModified();
} else {
try {
URLConnection conn = url.openConnection();
if (conn instanceof JarURLConnection) {
URL jarURL = ((JarURLConnection) conn).getJarFileURL... | [
"private",
"long",
"lastModified",
"(",
"URL",
"url",
")",
"{",
"if",
"(",
"url",
".",
"getProtocol",
"(",
")",
".",
"equals",
"(",
"\"file\"",
")",
")",
"{",
"return",
"new",
"File",
"(",
"url",
".",
"getFile",
"(",
")",
")",
".",
"lastModified",
... | Return url's last modified date time.
saves some opening and closing | [
"Return",
"url",
"s",
"last",
"modified",
"date",
"time",
".",
"saves",
"some",
"opening",
"and",
"closing"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/web/resource/filter/HeaderFilter.java#L76-L91 |
142,162 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/component/UIBean.java | UIBean.processLabel | protected String processLabel(String label, String name) {
if (null != label) {
if (Strings.isEmpty(label)) return null;
else return getText(label);
} else return getText(name);
} | java | protected String processLabel(String label, String name) {
if (null != label) {
if (Strings.isEmpty(label)) return null;
else return getText(label);
} else return getText(name);
} | [
"protected",
"String",
"processLabel",
"(",
"String",
"label",
",",
"String",
"name",
")",
"{",
"if",
"(",
"null",
"!=",
"label",
")",
"{",
"if",
"(",
"Strings",
".",
"isEmpty",
"(",
"label",
")",
")",
"return",
"null",
";",
"else",
"return",
"getText"... | Process label,convert empty to null
@param label
@param name
@return | [
"Process",
"label",
"convert",
"empty",
"to",
"null"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/component/UIBean.java#L191-L196 |
142,163 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/action/EntityDrivenAction.java | EntityDrivenAction.edit | public String edit() {
Entity<?> entity = getEntity();
put(getShortName(), entity);
editSetting(entity);
return forward();
} | java | public String edit() {
Entity<?> entity = getEntity();
put(getShortName(), entity);
editSetting(entity);
return forward();
} | [
"public",
"String",
"edit",
"(",
")",
"{",
"Entity",
"<",
"?",
">",
"entity",
"=",
"getEntity",
"(",
")",
";",
"put",
"(",
"getShortName",
"(",
")",
",",
"entity",
")",
";",
"editSetting",
"(",
"entity",
")",
";",
"return",
"forward",
"(",
")",
";"... | Edit by entity.id or id | [
"Edit",
"by",
"entity",
".",
"id",
"or",
"id"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/action/EntityDrivenAction.java#L144-L149 |
142,164 | beangle/beangle3 | commons/model/src/main/java/org/beangle/commons/dao/query/builder/OqlBuilder.java | OqlBuilder.findIndexOfFrom | private int findIndexOfFrom(String query) {
if (query.startsWith("from")) return 0;
int fromIdx = query.indexOf(" from ");
if (-1 == fromIdx) return -1;
final int first = query.substring(0, fromIdx).indexOf("(");
if (first > 0) {
int leftCnt = 1;
int i = first + 1;
while (leftCnt !... | java | private int findIndexOfFrom(String query) {
if (query.startsWith("from")) return 0;
int fromIdx = query.indexOf(" from ");
if (-1 == fromIdx) return -1;
final int first = query.substring(0, fromIdx).indexOf("(");
if (first > 0) {
int leftCnt = 1;
int i = first + 1;
while (leftCnt !... | [
"private",
"int",
"findIndexOfFrom",
"(",
"String",
"query",
")",
"{",
"if",
"(",
"query",
".",
"startsWith",
"(",
"\"from\"",
")",
")",
"return",
"0",
";",
"int",
"fromIdx",
"=",
"query",
".",
"indexOf",
"(",
"\" from \"",
")",
";",
"if",
"(",
"-",
... | Find index of from
@param query
@return -1 or from index | [
"Find",
"index",
"of",
"from"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/dao/query/builder/OqlBuilder.java#L466-L487 |
142,165 | massfords/jaxb-visitor | src/main/java/com/massfords/jaxb/CreateDepthFirstTraverserClass.java | CreateDepthFirstTraverserClass.getTraversableStrategy | private TraversableCodeGenStrategy getTraversableStrategy(JType rawType, Map<String,JClass> directClasses) {
if (rawType.isPrimitive()) {
// primitive types are never traversable
return TraversableCodeGenStrategy.NO;
}
JClass clazz = (JClass) rawType;
if (clazz.i... | java | private TraversableCodeGenStrategy getTraversableStrategy(JType rawType, Map<String,JClass> directClasses) {
if (rawType.isPrimitive()) {
// primitive types are never traversable
return TraversableCodeGenStrategy.NO;
}
JClass clazz = (JClass) rawType;
if (clazz.i... | [
"private",
"TraversableCodeGenStrategy",
"getTraversableStrategy",
"(",
"JType",
"rawType",
",",
"Map",
"<",
"String",
",",
"JClass",
">",
"directClasses",
")",
"{",
"if",
"(",
"rawType",
".",
"isPrimitive",
"(",
")",
")",
"{",
"// primitive types are never traversa... | Tests to see if the rawType is traversable
@return TraversableCodeGenStrategy VISITABLE, NO, MAYBE, DIRECT
@param rawType | [
"Tests",
"to",
"see",
"if",
"the",
"rawType",
"is",
"traversable"
] | 0d66cd4d8b6700b5eb67c028a87b53792be895b8 | https://github.com/massfords/jaxb-visitor/blob/0d66cd4d8b6700b5eb67c028a87b53792be895b8/src/main/java/com/massfords/jaxb/CreateDepthFirstTraverserClass.java#L149-L180 |
142,166 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/http/agent/Os.java | Os.parse | public static Os parse(String agentString) {
if (Strings.isEmpty(agentString)) { return Os.UNKNOWN; }
for (OsCategory category : OsCategory.values()) {
String version = category.match(agentString);
if (version != null) {
String key = category.getName() + "/" + version;
Os os = osMap.... | java | public static Os parse(String agentString) {
if (Strings.isEmpty(agentString)) { return Os.UNKNOWN; }
for (OsCategory category : OsCategory.values()) {
String version = category.match(agentString);
if (version != null) {
String key = category.getName() + "/" + version;
Os os = osMap.... | [
"public",
"static",
"Os",
"parse",
"(",
"String",
"agentString",
")",
"{",
"if",
"(",
"Strings",
".",
"isEmpty",
"(",
"agentString",
")",
")",
"{",
"return",
"Os",
".",
"UNKNOWN",
";",
"}",
"for",
"(",
"OsCategory",
"category",
":",
"OsCategory",
".",
... | Parses user agent string and returns the best match. Returns Os.UNKNOWN
if there is no match.
@param agentString
@return Os | [
"Parses",
"user",
"agent",
"string",
"and",
"returns",
"the",
"best",
"match",
".",
"Returns",
"Os",
".",
"UNKNOWN",
"if",
"there",
"is",
"no",
"match",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/http/agent/Os.java#L55-L70 |
142,167 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/template/FreemarkerTemplateEngine.java | FreemarkerTemplateEngine.getTemplate | private Template getTemplate(String templateName) throws ParseException {
try {
return config.getTemplate(templateName, "UTF-8");
} catch (ParseException e) {
throw e;
} catch (IOException e) {
logger.error("Couldn't load template '{}',loader is {}", templateName,
config.getTempl... | java | private Template getTemplate(String templateName) throws ParseException {
try {
return config.getTemplate(templateName, "UTF-8");
} catch (ParseException e) {
throw e;
} catch (IOException e) {
logger.error("Couldn't load template '{}',loader is {}", templateName,
config.getTempl... | [
"private",
"Template",
"getTemplate",
"(",
"String",
"templateName",
")",
"throws",
"ParseException",
"{",
"try",
"{",
"return",
"config",
".",
"getTemplate",
"(",
"templateName",
",",
"\"UTF-8\"",
")",
";",
"}",
"catch",
"(",
"ParseException",
"e",
")",
"{",
... | Load template in hierarchical path
@param templateName
@throws Exception | [
"Load",
"template",
"in",
"hierarchical",
"path"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/template/FreemarkerTemplateEngine.java#L113-L123 |
142,168 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/conversion/impl/ConverterFactory.java | ConverterFactory.getConverter | @SuppressWarnings("unchecked")
public <T extends R> Converter<S, T> getConverter(Class<T> targetType) {
return (Converter<S, T>) converters.get(targetType);
} | java | @SuppressWarnings("unchecked")
public <T extends R> Converter<S, T> getConverter(Class<T> targetType) {
return (Converter<S, T>) converters.get(targetType);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
"extends",
"R",
">",
"Converter",
"<",
"S",
",",
"T",
">",
"getConverter",
"(",
"Class",
"<",
"T",
">",
"targetType",
")",
"{",
"return",
"(",
"Converter",
"<",
"S",
",",
"T",
">... | Return convert from S to T | [
"Return",
"convert",
"from",
"S",
"to",
"T"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/conversion/impl/ConverterFactory.java#L43-L46 |
142,169 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java | PropertyNameResolver.getIndex | public int getIndex(String expression) {
if (expression == null || expression.length() == 0) { return -1; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested || c == MappedStart) {
return -1;
} else if (c == IndexedStart) {
int end =... | java | public int getIndex(String expression) {
if (expression == null || expression.length() == 0) { return -1; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested || c == MappedStart) {
return -1;
} else if (c == IndexedStart) {
int end =... | [
"public",
"int",
"getIndex",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",... | Return the index value from the property expression or -1.
@param expression The property expression
@return The index value or -1 if the property is not indexed
@throws IllegalArgumentException If the indexed property is illegally
formed or has an invalid (non-numeric) value. | [
"Return",
"the",
"index",
"value",
"from",
"the",
"property",
"expression",
"or",
"-",
"1",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java#L61-L82 |
142,170 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java | PropertyNameResolver.getProperty | public String getProperty(String expression) {
if (expression == null || expression.length() == 0) { return expression; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested) {
return expression.substring(0, i);
} else if (c == MappedStart || ... | java | public String getProperty(String expression) {
if (expression == null || expression.length() == 0) { return expression; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested) {
return expression.substring(0, i);
} else if (c == MappedStart || ... | [
"public",
"String",
"getProperty",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"expression",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";"... | Return the property name from the property expression.
@param expression The property expression
@return The property name | [
"Return",
"the",
"property",
"name",
"from",
"the",
"property",
"expression",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java#L112-L121 |
142,171 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java | PropertyNameResolver.hasNested | public boolean hasNested(String expression) {
if (expression == null || expression.length() == 0) return false;
else return remove(expression) != null;
} | java | public boolean hasNested(String expression) {
if (expression == null || expression.length() == 0) return false;
else return remove(expression) != null;
} | [
"public",
"boolean",
"hasNested",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"false",
";",
"else",
"return",
"remove",
"(",
"expression",
")",
"!=",... | Indicates whether or not the expression contains nested property expressions or not.
@param expression The property expression
@return The next property expression | [
"Indicates",
"whether",
"or",
"not",
"the",
"expression",
"contains",
"nested",
"property",
"expressions",
"or",
"not",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java#L129-L133 |
142,172 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java | PropertyNameResolver.isIndexed | public boolean isIndexed(String expression) {
if (expression == null || expression.length() == 0) { return false; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested || c == MappedStart) {
return false;
} else if (c == IndexedStart) { return... | java | public boolean isIndexed(String expression) {
if (expression == null || expression.length() == 0) { return false; }
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (c == Nested || c == MappedStart) {
return false;
} else if (c == IndexedStart) { return... | [
"public",
"boolean",
"isIndexed",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i... | Indicate whether the expression is for an indexed property or not.
@param expression The property expression
@return <code>true</code> if the expresion is indexed,
otherwise <code>false</code> | [
"Indicate",
"whether",
"the",
"expression",
"is",
"for",
"an",
"indexed",
"property",
"or",
"not",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java#L142-L151 |
142,173 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java | PropertyNameResolver.next | public String next(String expression) {
if (expression == null || expression.length() == 0) { return null; }
boolean indexed = false;
boolean mapped = false;
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (indexed) {
if (c == IndexedEnd) { return ex... | java | public String next(String expression) {
if (expression == null || expression.length() == 0) { return null; }
boolean indexed = false;
boolean mapped = false;
for (int i = 0; i < expression.length(); i++) {
char c = expression.charAt(i);
if (indexed) {
if (c == IndexedEnd) { return ex... | [
"public",
"String",
"next",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"boolean",
"indexed",
"=",
"false",
";",
"boolean",
... | Extract the next property expression from the current expression.
@param expression The property expression
@return The next property expression | [
"Extract",
"the",
"next",
"property",
"expression",
"from",
"the",
"current",
"expression",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java#L177-L198 |
142,174 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java | PropertyNameResolver.remove | public String remove(String expression) {
if (expression == null || expression.length() == 0) { return null; }
String property = next(expression);
if (expression.length() == property.length()) { return null; }
int start = property.length();
if (expression.charAt(start) == Nested) start++;
return... | java | public String remove(String expression) {
if (expression == null || expression.length() == 0) { return null; }
String property = next(expression);
if (expression.length() == property.length()) { return null; }
int start = property.length();
if (expression.charAt(start) == Nested) start++;
return... | [
"public",
"String",
"remove",
"(",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"String",
"property",
"=",
"next",
"(",
"expressio... | Remove the last property expresson from the current expression.
@param expression The property expression
@return The new expression value, with first property
expression removed - null if there are no more expressions | [
"Remove",
"the",
"last",
"property",
"expresson",
"from",
"the",
"current",
"expression",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/bean/PropertyNameResolver.java#L207-L214 |
142,175 | beangle/beangle3 | orm/hibernate/src/main/java/org/beangle/orm/hibernate/internal/HibernateEntityContext.java | HibernateEntityContext.initFrom | public void initFrom(SessionFactory sessionFactory) {
Assert.notNull(sessionFactory);
Stopwatch watch = new Stopwatch().start();
Map<String, ClassMetadata> classMetadatas = sessionFactory.getAllClassMetadata();
int entityCount = entityTypes.size();
int collectionCount = collectionTypes.size();
f... | java | public void initFrom(SessionFactory sessionFactory) {
Assert.notNull(sessionFactory);
Stopwatch watch = new Stopwatch().start();
Map<String, ClassMetadata> classMetadatas = sessionFactory.getAllClassMetadata();
int entityCount = entityTypes.size();
int collectionCount = collectionTypes.size();
f... | [
"public",
"void",
"initFrom",
"(",
"SessionFactory",
"sessionFactory",
")",
"{",
"Assert",
".",
"notNull",
"(",
"sessionFactory",
")",
";",
"Stopwatch",
"watch",
"=",
"new",
"Stopwatch",
"(",
")",
".",
"start",
"(",
")",
";",
"Map",
"<",
"String",
",",
"... | Build context from session factory | [
"Build",
"context",
"from",
"session",
"factory"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/internal/HibernateEntityContext.java#L57-L71 |
142,176 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/convention/Flash.java | Flash.put | public Object put(Object key, Object value) {
return next.put(key, value);
} | java | public Object put(Object key, Object value) {
return next.put(key, value);
} | [
"public",
"Object",
"put",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"return",
"next",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] | put value to next
@param key
@param value | [
"put",
"value",
"to",
"next"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/convention/Flash.java#L65-L67 |
142,177 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/Strings.java | Strings.count | public static int count(final String host, final char charactor) {
int count = 0;
for (int i = 0; i < host.length(); i++) {
if (host.charAt(i) == charactor) {
count++;
}
}
return count;
} | java | public static int count(final String host, final char charactor) {
int count = 0;
for (int i = 0; i < host.length(); i++) {
if (host.charAt(i) == charactor) {
count++;
}
}
return count;
} | [
"public",
"static",
"int",
"count",
"(",
"final",
"String",
"host",
",",
"final",
"char",
"charactor",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"host",
".",
"length",
"(",
")",
";",
"i",
"++",
")... | count char in host string
@param host
a {@link java.lang.String} object.
@param charactor
a char.
@return a int. | [
"count",
"char",
"in",
"host",
"string"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L163-L171 |
142,178 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/Strings.java | Strings.count | public static int count(final String host, final String searchStr) {
int count = 0;
for (int startIndex = 0; startIndex < host.length(); startIndex++) {
int findLoc = host.indexOf(searchStr, startIndex);
if (findLoc == -1) {
break;
} else {
count++;
startIndex = findLoc... | java | public static int count(final String host, final String searchStr) {
int count = 0;
for (int startIndex = 0; startIndex < host.length(); startIndex++) {
int findLoc = host.indexOf(searchStr, startIndex);
if (findLoc == -1) {
break;
} else {
count++;
startIndex = findLoc... | [
"public",
"static",
"int",
"count",
"(",
"final",
"String",
"host",
",",
"final",
"String",
"searchStr",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"startIndex",
"=",
"0",
";",
"startIndex",
"<",
"host",
".",
"length",
"(",
")",
";",... | count inner string in host string
@param host
a {@link java.lang.String} object.
@param searchStr
a {@link java.lang.String} object.
@return a int. | [
"count",
"inner",
"string",
"in",
"host",
"string"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L182-L194 |
142,179 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/web/io/DefaultStreamDownloader.java | DefaultStreamDownloader.getFileName | protected static String getFileName(String file_name) {
if (file_name == null) return "";
file_name = file_name.trim();
int iPos = 0;
iPos = file_name.lastIndexOf("\\");
if (iPos > -1) file_name = file_name.substring(iPos + 1);
iPos = file_name.lastIndexOf("/");
if (iPos > -1) file_name = f... | java | protected static String getFileName(String file_name) {
if (file_name == null) return "";
file_name = file_name.trim();
int iPos = 0;
iPos = file_name.lastIndexOf("\\");
if (iPos > -1) file_name = file_name.substring(iPos + 1);
iPos = file_name.lastIndexOf("/");
if (iPos > -1) file_name = f... | [
"protected",
"static",
"String",
"getFileName",
"(",
"String",
"file_name",
")",
"{",
"if",
"(",
"file_name",
"==",
"null",
")",
"return",
"\"\"",
";",
"file_name",
"=",
"file_name",
".",
"trim",
"(",
")",
";",
"int",
"iPos",
"=",
"0",
";",
"iPos",
"="... | Returns the file name by path.
@param file_name | [
"Returns",
"the",
"file",
"name",
"by",
"path",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/web/io/DefaultStreamDownloader.java#L132-L146 |
142,180 | beangle/beangle3 | orm/hibernate/src/main/java/org/beangle/orm/hibernate/DefaultTableNamingStrategy.java | DefaultTableNamingStrategy.isMultiSchema | public boolean isMultiSchema() {
Set<String> schemas = CollectUtils.newHashSet();
for (TableNamePattern pattern : patterns) {
schemas.add((null == pattern.getSchema()) ? "" : pattern.getSchema());
}
return schemas.size() > 1;
} | java | public boolean isMultiSchema() {
Set<String> schemas = CollectUtils.newHashSet();
for (TableNamePattern pattern : patterns) {
schemas.add((null == pattern.getSchema()) ? "" : pattern.getSchema());
}
return schemas.size() > 1;
} | [
"public",
"boolean",
"isMultiSchema",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"schemas",
"=",
"CollectUtils",
".",
"newHashSet",
"(",
")",
";",
"for",
"(",
"TableNamePattern",
"pattern",
":",
"patterns",
")",
"{",
"schemas",
".",
"add",
"(",
"(",
"null... | is Multiple schema for entity | [
"is",
"Multiple",
"schema",
"for",
"entity"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/DefaultTableNamingStrategy.java#L164-L170 |
142,181 | beangle/beangle3 | commons/core/src/main/java/org/beangle/commons/lang/time/TimerTrace.java | TimerTrace.setActive | public static void setActive(boolean active) {
if (active) System.setProperty(ACTIVATE_PROPERTY, "true");
else System.clearProperty(ACTIVATE_PROPERTY);
TimerTrace.active = active;
} | java | public static void setActive(boolean active) {
if (active) System.setProperty(ACTIVATE_PROPERTY, "true");
else System.clearProperty(ACTIVATE_PROPERTY);
TimerTrace.active = active;
} | [
"public",
"static",
"void",
"setActive",
"(",
"boolean",
"active",
")",
"{",
"if",
"(",
"active",
")",
"System",
".",
"setProperty",
"(",
"ACTIVATE_PROPERTY",
",",
"\"true\"",
")",
";",
"else",
"System",
".",
"clearProperty",
"(",
"ACTIVATE_PROPERTY",
")",
"... | Turn profiling on or off.
@param active | [
"Turn",
"profiling",
"on",
"or",
"off",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/time/TimerTrace.java#L155-L159 |
142,182 | beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/util/BeangleStaticContentLoader.java | BeangleStaticContentLoader.findStaticResource | public void findStaticResource(String path, HttpServletRequest request, HttpServletResponse response)
throws IOException {
processor.process(cleanupPath(path), request, response);
} | java | public void findStaticResource(String path, HttpServletRequest request, HttpServletResponse response)
throws IOException {
processor.process(cleanupPath(path), request, response);
} | [
"public",
"void",
"findStaticResource",
"(",
"String",
"path",
",",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
"{",
"processor",
".",
"process",
"(",
"cleanupPath",
"(",
"path",
")",
",",
"request",
",",
... | Locate a static resource and copy directly to the response, setting the
appropriate caching headers. | [
"Locate",
"a",
"static",
"resource",
"and",
"copy",
"directly",
"to",
"the",
"response",
"setting",
"the",
"appropriate",
"caching",
"headers",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/util/BeangleStaticContentLoader.java#L55-L58 |
142,183 | beangle/beangle3 | ioc/spring/src/main/java/org/beangle/inject/spring/config/SpringBindRegistry.java | SpringBindRegistry.getBeanNames | public List<String> getBeanNames(Class<?> type) {
if (typeNames.containsKey(type)) { return typeNames.get(type); }
List<String> names = CollectUtils.newArrayList();
for (Map.Entry<String, Class<?>> entry : nameTypes.entrySet()) {
if (type.isAssignableFrom(entry.getValue())) {
names.add(entry.g... | java | public List<String> getBeanNames(Class<?> type) {
if (typeNames.containsKey(type)) { return typeNames.get(type); }
List<String> names = CollectUtils.newArrayList();
for (Map.Entry<String, Class<?>> entry : nameTypes.entrySet()) {
if (type.isAssignableFrom(entry.getValue())) {
names.add(entry.g... | [
"public",
"List",
"<",
"String",
">",
"getBeanNames",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"if",
"(",
"typeNames",
".",
"containsKey",
"(",
"type",
")",
")",
"{",
"return",
"typeNames",
".",
"get",
"(",
"type",
")",
";",
"}",
"List",
"<",... | Get bean name list according given type | [
"Get",
"bean",
"name",
"list",
"according",
"given",
"type"
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/SpringBindRegistry.java#L124-L134 |
142,184 | beangle/beangle3 | commons/model/src/main/java/org/beangle/commons/entity/metadata/impl/ConvertPopulatorBean.java | ConvertPopulatorBean.initProperty | public ObjectAndType initProperty(final Object target, Type type, final String attr) {
Object propObj = target;
Object property = null;
int index = 0;
String[] attrs = Strings.split(attr, ".");
while (index < attrs.length) {
try {
property = getProperty(propObj, attrs[index]);
... | java | public ObjectAndType initProperty(final Object target, Type type, final String attr) {
Object propObj = target;
Object property = null;
int index = 0;
String[] attrs = Strings.split(attr, ".");
while (index < attrs.length) {
try {
property = getProperty(propObj, attrs[index]);
... | [
"public",
"ObjectAndType",
"initProperty",
"(",
"final",
"Object",
"target",
",",
"Type",
"type",
",",
"final",
"String",
"attr",
")",
"{",
"Object",
"propObj",
"=",
"target",
";",
"Object",
"property",
"=",
"null",
";",
"int",
"index",
"=",
"0",
";",
"S... | Initialize target's attribuate path,Return the last property value and type. | [
"Initialize",
"target",
"s",
"attribuate",
"path",
"Return",
"the",
"last",
"property",
"value",
"and",
"type",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/entity/metadata/impl/ConvertPopulatorBean.java#L78-L110 |
142,185 | beangle/beangle3 | commons/web/src/main/java/org/beangle/commons/http/agent/Browser.java | Browser.parse | public static Browser parse(final String agentString) {
if (Strings.isEmpty(agentString)) { return Browser.UNKNOWN; }
// first consider engine
for (Engine engine : Engine.values()) {
String egineName = engine.name;
if (agentString.contains(egineName)) {
for (BrowserCategory category : en... | java | public static Browser parse(final String agentString) {
if (Strings.isEmpty(agentString)) { return Browser.UNKNOWN; }
// first consider engine
for (Engine engine : Engine.values()) {
String egineName = engine.name;
if (agentString.contains(egineName)) {
for (BrowserCategory category : en... | [
"public",
"static",
"Browser",
"parse",
"(",
"final",
"String",
"agentString",
")",
"{",
"if",
"(",
"Strings",
".",
"isEmpty",
"(",
"agentString",
")",
")",
"{",
"return",
"Browser",
".",
"UNKNOWN",
";",
"}",
"// first consider engine",
"for",
"(",
"Engine",... | Iterates over all Browsers to compare the browser signature with the user
agent string. If no match can be found Browser.UNKNOWN will be returned.
@param agentString
@return Browser | [
"Iterates",
"over",
"all",
"Browsers",
"to",
"compare",
"the",
"browser",
"signature",
"with",
"the",
"user",
"agent",
"string",
".",
"If",
"no",
"match",
"can",
"be",
"found",
"Browser",
".",
"UNKNOWN",
"will",
"be",
"returned",
"."
] | 33df2873a5f38e28ac174a1d3b8144eb2f808e64 | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/web/src/main/java/org/beangle/commons/http/agent/Browser.java#L55-L89 |
142,186 | xebia/Xebium | src/main/java/com/xebia/incubator/xebium/ScreenCapture.java | ScreenCapture.requireScreenshot | public boolean requireScreenshot(final ExtendedSeleniumCommand command,
boolean result) {
return
(!command.isAssertCommand()
&& !command.isVerifyCommand()
&& !command.isWaitForCommand()
&& screenshotPolicy == ScreenshotPolicy.STEP)
|| (!result
&& (screenshotPolicy == ScreenshotPolicy.FAILURE
... | java | public boolean requireScreenshot(final ExtendedSeleniumCommand command,
boolean result) {
return
(!command.isAssertCommand()
&& !command.isVerifyCommand()
&& !command.isWaitForCommand()
&& screenshotPolicy == ScreenshotPolicy.STEP)
|| (!result
&& (screenshotPolicy == ScreenshotPolicy.FAILURE
... | [
"public",
"boolean",
"requireScreenshot",
"(",
"final",
"ExtendedSeleniumCommand",
"command",
",",
"boolean",
"result",
")",
"{",
"return",
"(",
"!",
"command",
".",
"isAssertCommand",
"(",
")",
"&&",
"!",
"command",
".",
"isVerifyCommand",
"(",
")",
"&&",
"!"... | Is a screenshot desired, based on the command and the test result. | [
"Is",
"a",
"screenshot",
"desired",
"based",
"on",
"the",
"command",
"and",
"the",
"test",
"result",
"."
] | 594f6d9e65622acdbd03dba0700b17645981da1f | https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/ScreenCapture.java#L90-L100 |
142,187 | xebia/Xebium | src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java | SeleniumDriverFixture.setTimeoutOnSelenium | private void setTimeoutOnSelenium() {
executeCommand("setTimeout", new String[] { "" + this.timeout });
WebDriver.Timeouts timeouts = getWebDriver().manage().timeouts();
timeouts.setScriptTimeout(this.timeout, TimeUnit.MILLISECONDS);
timeouts.pageLoadTimeout(this.timeout, TimeUnit.MILLISECONDS... | java | private void setTimeoutOnSelenium() {
executeCommand("setTimeout", new String[] { "" + this.timeout });
WebDriver.Timeouts timeouts = getWebDriver().manage().timeouts();
timeouts.setScriptTimeout(this.timeout, TimeUnit.MILLISECONDS);
timeouts.pageLoadTimeout(this.timeout, TimeUnit.MILLISECONDS... | [
"private",
"void",
"setTimeoutOnSelenium",
"(",
")",
"{",
"executeCommand",
"(",
"\"setTimeout\"",
",",
"new",
"String",
"[",
"]",
"{",
"\"\"",
"+",
"this",
".",
"timeout",
"}",
")",
";",
"WebDriver",
".",
"Timeouts",
"timeouts",
"=",
"getWebDriver",
"(",
... | Set the default timeout on the selenium instance. | [
"Set",
"the",
"default",
"timeout",
"on",
"the",
"selenium",
"instance",
"."
] | 594f6d9e65622acdbd03dba0700b17645981da1f | https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java#L275-L280 |
142,188 | xebia/Xebium | src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java | SeleniumDriverFixture.addAliasForLocator | public void addAliasForLocator(String alias, String locator) {
LOG.info("Add alias: '" + alias + "' for '" + locator + "'");
aliases.put(alias, locator);
} | java | public void addAliasForLocator(String alias, String locator) {
LOG.info("Add alias: '" + alias + "' for '" + locator + "'");
aliases.put(alias, locator);
} | [
"public",
"void",
"addAliasForLocator",
"(",
"String",
"alias",
",",
"String",
"locator",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Add alias: '\"",
"+",
"alias",
"+",
"\"' for '\"",
"+",
"locator",
"+",
"\"'\"",
")",
";",
"aliases",
".",
"put",
"(",
"alias",
... | Add a new locator alias to the fixture.
@param alias
@param locator | [
"Add",
"a",
"new",
"locator",
"alias",
"to",
"the",
"fixture",
"."
] | 594f6d9e65622acdbd03dba0700b17645981da1f | https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java#L446-L449 |
142,189 | xebia/Xebium | src/main/java/com/xebia/incubator/xebium/SeleniumServerFixture.java | SeleniumServerFixture.startSeleniumServer | public void startSeleniumServer(final String args) {
if (seleniumProxy != null) {
throw new IllegalStateException("There is already a Selenium remote server running");
}
try {
final RemoteControlConfiguration configuration;
LOG.info("Starting server with arguments: '" + args + "'"... | java | public void startSeleniumServer(final String args) {
if (seleniumProxy != null) {
throw new IllegalStateException("There is already a Selenium remote server running");
}
try {
final RemoteControlConfiguration configuration;
LOG.info("Starting server with arguments: '" + args + "'"... | [
"public",
"void",
"startSeleniumServer",
"(",
"final",
"String",
"args",
")",
"{",
"if",
"(",
"seleniumProxy",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"There is already a Selenium remote server running\"",
")",
";",
"}",
"try",
"{",
... | Start server with arguments.
@param args Arguments, same as when started from command line | [
"Start",
"server",
"with",
"arguments",
"."
] | 594f6d9e65622acdbd03dba0700b17645981da1f | https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumServerFixture.java#L49-L72 |
142,190 | petergeneric/stdlib | guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/TransactionMethodInterceptor.java | TransactionMethodInterceptor.readAnnotation | private Transactional readAnnotation(MethodInvocation invocation)
{
final Method method = invocation.getMethod();
if (method.isAnnotationPresent(Transactional.class))
{
return method.getAnnotation(Transactional.class);
}
else
{
throw new RuntimeException("Could not find Transactional annotation");
... | java | private Transactional readAnnotation(MethodInvocation invocation)
{
final Method method = invocation.getMethod();
if (method.isAnnotationPresent(Transactional.class))
{
return method.getAnnotation(Transactional.class);
}
else
{
throw new RuntimeException("Could not find Transactional annotation");
... | [
"private",
"Transactional",
"readAnnotation",
"(",
"MethodInvocation",
"invocation",
")",
"{",
"final",
"Method",
"method",
"=",
"invocation",
".",
"getMethod",
"(",
")",
";",
"if",
"(",
"method",
".",
"isAnnotationPresent",
"(",
"Transactional",
".",
"class",
"... | Read the Transactional annotation for a given method invocation
@param invocation
@return | [
"Read",
"the",
"Transactional",
"annotation",
"for",
"a",
"given",
"method",
"invocation"
] | d4025d2f881bc0542b1e004c5f65a1ccaf895836 | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/TransactionMethodInterceptor.java#L367-L379 |
142,191 | petergeneric/stdlib | guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/TransactionMethodInterceptor.java | TransactionMethodInterceptor.complete | private final void complete(Transaction tx, boolean readOnly)
{
if (log.isTraceEnabled())
log.trace("Complete " + tx);
if (!readOnly)
tx.commit();
else
tx.rollback();
} | java | private final void complete(Transaction tx, boolean readOnly)
{
if (log.isTraceEnabled())
log.trace("Complete " + tx);
if (!readOnly)
tx.commit();
else
tx.rollback();
} | [
"private",
"final",
"void",
"complete",
"(",
"Transaction",
"tx",
",",
"boolean",
"readOnly",
")",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"log",
".",
"trace",
"(",
"\"Complete \"",
"+",
"tx",
")",
";",
"if",
"(",
"!",
"readOnly",
... | Complete the transaction
@param tx
@param readOnly
the read-only flag on the transaction (if true, the transaction will be rolled back, otherwise the transaction will be | [
"Complete",
"the",
"transaction"
] | d4025d2f881bc0542b1e004c5f65a1ccaf895836 | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/TransactionMethodInterceptor.java#L554-L563 |
142,192 | ziccardi/jnrpe | jnrpe-plugins/src/main/java/it/jnrpe/plugin/CheckPgsql.java | CheckPgsql.getConnection | private Connection getConnection(final ICommandLine cl) throws SQLException, InstantiationException, IllegalAccessException,
ClassNotFoundException {
String database = DEFAULT_TABLE;
if (cl.hasOption("database")) {
database = cl.getOptionValue("database");
}
Strin... | java | private Connection getConnection(final ICommandLine cl) throws SQLException, InstantiationException, IllegalAccessException,
ClassNotFoundException {
String database = DEFAULT_TABLE;
if (cl.hasOption("database")) {
database = cl.getOptionValue("database");
}
Strin... | [
"private",
"Connection",
"getConnection",
"(",
"final",
"ICommandLine",
"cl",
")",
"throws",
"SQLException",
",",
"InstantiationException",
",",
"IllegalAccessException",
",",
"ClassNotFoundException",
"{",
"String",
"database",
"=",
"DEFAULT_TABLE",
";",
"if",
"(",
"... | Connect to the server.
@param cl
The command line
@return The connection
@throws SQLException
-
@throws InstantiationException
-
@throws IllegalAccessException
-
@throws ClassNotFoundException
- | [
"Connect",
"to",
"the",
"server",
"."
] | ac9046355851136994388442b01ba4063305f9c4 | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/CheckPgsql.java#L119-L152 |
142,193 | ziccardi/jnrpe | jnrpe-lib/src/main/java/it/jnrpe/plugins/PluginBase.java | PluginBase.configureThresholdEvaluatorBuilder | protected void configureThresholdEvaluatorBuilder(final ThresholdsEvaluatorBuilder thrb, final ICommandLine cl) throws BadThresholdException {
if (cl.hasOption("th")) {
for (Object obj : cl.getOptionValues("th")) {
thrb.withThreshold(obj.toString());
}
}
} | java | protected void configureThresholdEvaluatorBuilder(final ThresholdsEvaluatorBuilder thrb, final ICommandLine cl) throws BadThresholdException {
if (cl.hasOption("th")) {
for (Object obj : cl.getOptionValues("th")) {
thrb.withThreshold(obj.toString());
}
}
} | [
"protected",
"void",
"configureThresholdEvaluatorBuilder",
"(",
"final",
"ThresholdsEvaluatorBuilder",
"thrb",
",",
"final",
"ICommandLine",
"cl",
")",
"throws",
"BadThresholdException",
"{",
"if",
"(",
"cl",
".",
"hasOption",
"(",
"\"th\"",
")",
")",
"{",
"for",
... | Override this method if you don't use the new threshold syntax. Here you
must tell the threshold evaluator all the threshold it must be able to
evaluate. Give a look at the source of the CheckOracle plugin for an
example of a plugin that supports both old and new syntax.
@param thrb
The {@link ThresholdsEvaluatorBuild... | [
"Override",
"this",
"method",
"if",
"you",
"don",
"t",
"use",
"the",
"new",
"threshold",
"syntax",
".",
"Here",
"you",
"must",
"tell",
"the",
"threshold",
"evaluator",
"all",
"the",
"threshold",
"it",
"must",
"be",
"able",
"to",
"evaluate",
".",
"Give",
... | ac9046355851136994388442b01ba4063305f9c4 | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/plugins/PluginBase.java#L81-L87 |
142,194 | ziccardi/jnrpe | jnrpe-lib/src/main/java/it/jnrpe/utils/thresholds/Range.java | Range.evaluate | private boolean evaluate(final Metric metric, final Prefixes prefix) {
if (metric == null || metric.getMetricValue() == null) {
throw new NullPointerException("Value can't be null");
}
BigDecimal value = metric.getMetricValue(prefix);
if (!isNegativeInfinity()) {
... | java | private boolean evaluate(final Metric metric, final Prefixes prefix) {
if (metric == null || metric.getMetricValue() == null) {
throw new NullPointerException("Value can't be null");
}
BigDecimal value = metric.getMetricValue(prefix);
if (!isNegativeInfinity()) {
... | [
"private",
"boolean",
"evaluate",
"(",
"final",
"Metric",
"metric",
",",
"final",
"Prefixes",
"prefix",
")",
"{",
"if",
"(",
"metric",
"==",
"null",
"||",
"metric",
".",
"getMetricValue",
"(",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerExcept... | Evaluates if the passed in value falls inside the range. The negation is
ignored.
@param metric
The metric to evaluate
@param prefix
Used to interpret the values of the range boundaries.
@return <code>true</code> if the metric value falls inside the range.
The negation ('^') is ignored. | [
"Evaluates",
"if",
"the",
"passed",
"in",
"value",
"falls",
"inside",
"the",
"range",
".",
"The",
"negation",
"is",
"ignored",
"."
] | ac9046355851136994388442b01ba4063305f9c4 | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/utils/thresholds/Range.java#L92-L126 |
142,195 | ziccardi/jnrpe | jnrpe-plugins/src/main/java/it/jnrpe/plugin/CNativePlugin.java | CNativePlugin.execute | public final ReturnValue execute(final ICommandLine cl) {
File fProcessFile = new File(cl.getOptionValue("executable"));
StreamManager streamMgr = new StreamManager();
if (!fProcessFile.exists()) {
return new ReturnValue(Status.UNKNOWN, "Could not exec executable : " + fProcessFile.... | java | public final ReturnValue execute(final ICommandLine cl) {
File fProcessFile = new File(cl.getOptionValue("executable"));
StreamManager streamMgr = new StreamManager();
if (!fProcessFile.exists()) {
return new ReturnValue(Status.UNKNOWN, "Could not exec executable : " + fProcessFile.... | [
"public",
"final",
"ReturnValue",
"execute",
"(",
"final",
"ICommandLine",
"cl",
")",
"{",
"File",
"fProcessFile",
"=",
"new",
"File",
"(",
"cl",
".",
"getOptionValue",
"(",
"\"executable\"",
")",
")",
";",
"StreamManager",
"streamMgr",
"=",
"new",
"StreamMana... | The first parameter must be the full path to the executable.
The rest of the array is sent to the executable as commands parameters
@param cl
The parsed command line
@return The return value of the plugin | [
"The",
"first",
"parameter",
"must",
"be",
"the",
"full",
"path",
"to",
"the",
"executable",
"."
] | ac9046355851136994388442b01ba4063305f9c4 | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/CNativePlugin.java#L45-L80 |
142,196 | petergeneric/stdlib | stdlib/src/main/java/com/peterphi/std/util/Logging.java | Logging.configureFiles | public static void configureFiles(Iterable<File> files)
{
for (File file : files)
{
if (file != null && file.exists() && file.canRead())
{
setup(file);
return;
}
}
System.out.println("(No suitable log config file found)");
} | java | public static void configureFiles(Iterable<File> files)
{
for (File file : files)
{
if (file != null && file.exists() && file.canRead())
{
setup(file);
return;
}
}
System.out.println("(No suitable log config file found)");
} | [
"public",
"static",
"void",
"configureFiles",
"(",
"Iterable",
"<",
"File",
">",
"files",
")",
"{",
"for",
"(",
"File",
"file",
":",
"files",
")",
"{",
"if",
"(",
"file",
"!=",
"null",
"&&",
"file",
".",
"exists",
"(",
")",
"&&",
"file",
".",
"canR... | Configures the logging environment to use the first available config file in the list, printing an error if none of the
files
are suitable
@param files | [
"Configures",
"the",
"logging",
"environment",
"to",
"use",
"the",
"first",
"available",
"config",
"file",
"in",
"the",
"list",
"printing",
"an",
"error",
"if",
"none",
"of",
"the",
"files",
"are",
"suitable"
] | d4025d2f881bc0542b1e004c5f65a1ccaf895836 | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/util/Logging.java#L33-L45 |
142,197 | ziccardi/jnrpe | jnrpe-lib/src/main/java/it/jnrpe/commands/CommandRepository.java | CommandRepository.getAllCommandDefinition | public Set<CommandDefinition> getAllCommandDefinition(final String pluginName) {
Set<CommandDefinition> res = new HashSet<CommandDefinition>();
for (CommandDefinition cd : commandDefinitionsMap.values()) {
if (cd.getPluginName().equals(pluginName)) {
res.add(cd);
... | java | public Set<CommandDefinition> getAllCommandDefinition(final String pluginName) {
Set<CommandDefinition> res = new HashSet<CommandDefinition>();
for (CommandDefinition cd : commandDefinitionsMap.values()) {
if (cd.getPluginName().equals(pluginName)) {
res.add(cd);
... | [
"public",
"Set",
"<",
"CommandDefinition",
">",
"getAllCommandDefinition",
"(",
"final",
"String",
"pluginName",
")",
"{",
"Set",
"<",
"CommandDefinition",
">",
"res",
"=",
"new",
"HashSet",
"<",
"CommandDefinition",
">",
"(",
")",
";",
"for",
"(",
"CommandDef... | Returns all the command definition that involves the given plugin.
@param pluginName
the name of the plugin we are interested in
@return all the command definition that involves the given plugin | [
"Returns",
"all",
"the",
"command",
"definition",
"that",
"involves",
"the",
"given",
"plugin",
"."
] | ac9046355851136994388442b01ba4063305f9c4 | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/commands/CommandRepository.java#L64-L75 |
142,198 | petergeneric/stdlib | guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/auth/oauth2/OAuth2SessionRef.java | OAuth2SessionRef.initialiseFromAPIToken | public synchronized void initialiseFromAPIToken(final String token)
{
final String responseStr = authService.getToken(UserManagerOAuthService.GRANT_TYPE_TOKEN_EXCHANGE,
null,
getOwnCallbackUri().toString(),
... | java | public synchronized void initialiseFromAPIToken(final String token)
{
final String responseStr = authService.getToken(UserManagerOAuthService.GRANT_TYPE_TOKEN_EXCHANGE,
null,
getOwnCallbackUri().toString(),
... | [
"public",
"synchronized",
"void",
"initialiseFromAPIToken",
"(",
"final",
"String",
"token",
")",
"{",
"final",
"String",
"responseStr",
"=",
"authService",
".",
"getToken",
"(",
"UserManagerOAuthService",
".",
"GRANT_TYPE_TOKEN_EXCHANGE",
",",
"null",
",",
"getOwnCal... | Initialise this session reference by exchanging an API token for an access_token and refresh_token
@param token | [
"Initialise",
"this",
"session",
"reference",
"by",
"exchanging",
"an",
"API",
"token",
"for",
"an",
"access_token",
"and",
"refresh_token"
] | d4025d2f881bc0542b1e004c5f65a1ccaf895836 | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/auth/oauth2/OAuth2SessionRef.java#L84-L97 |
142,199 | petergeneric/stdlib | guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/auth/oauth2/OAuth2SessionRef.java | OAuth2SessionRef.getOwnCallbackUri | public URI getOwnCallbackUri()
{
String localEndpointStr = (oauthSelfEndpoint != null) ? oauthSelfEndpoint : localEndpoint.toString();
if (!localEndpointStr.endsWith("/"))
localEndpointStr += "/";
return URI.create(localEndpointStr + "oauth2/client/cb");
} | java | public URI getOwnCallbackUri()
{
String localEndpointStr = (oauthSelfEndpoint != null) ? oauthSelfEndpoint : localEndpoint.toString();
if (!localEndpointStr.endsWith("/"))
localEndpointStr += "/";
return URI.create(localEndpointStr + "oauth2/client/cb");
} | [
"public",
"URI",
"getOwnCallbackUri",
"(",
")",
"{",
"String",
"localEndpointStr",
"=",
"(",
"oauthSelfEndpoint",
"!=",
"null",
")",
"?",
"oauthSelfEndpoint",
":",
"localEndpoint",
".",
"toString",
"(",
")",
";",
"if",
"(",
"!",
"localEndpointStr",
".",
"endsW... | Return the URI for this service's callback resource
@return | [
"Return",
"the",
"URI",
"for",
"this",
"service",
"s",
"callback",
"resource"
] | d4025d2f881bc0542b1e004c5f65a1ccaf895836 | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/auth/oauth2/OAuth2SessionRef.java#L120-L128 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.