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
partition
stringclasses
1 value
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/GlobalSyncRedis.java
GlobalSyncRedis.setSyncCache
public static void setSyncCache(String name, Cache cache) { if (null == name || "".equals(name.trim()) || null == cache) { return; } GlobalSyncRedis.caches.put(name, cache); }
java
public static void setSyncCache(String name, Cache cache) { if (null == name || "".equals(name.trim()) || null == cache) { return; } GlobalSyncRedis.caches.put(name, cache); }
[ "public", "static", "void", "setSyncCache", "(", "String", "name", ",", "Cache", "cache", ")", "{", "if", "(", "null", "==", "name", "||", "\"\"", ".", "equals", "(", "name", ".", "trim", "(", ")", ")", "||", "null", "==", "cache", ")", "{", "retur...
Set cache to the memory. @param name @param cache
[ "Set", "cache", "to", "the", "memory", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/GlobalSyncRedis.java#L68-L73
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/GlobalSyncRedis.java
GlobalSyncRedis.removeSyncCache
public static void removeSyncCache(String name) { if (StrKit.isBlank(name)) { return; } if (GlobalSyncRedis.caches.containsKey(name)) { GlobalSyncRedis.caches.remove(name); } }
java
public static void removeSyncCache(String name) { if (StrKit.isBlank(name)) { return; } if (GlobalSyncRedis.caches.containsKey(name)) { GlobalSyncRedis.caches.remove(name); } }
[ "public", "static", "void", "removeSyncCache", "(", "String", "name", ")", "{", "if", "(", "StrKit", ".", "isBlank", "(", "name", ")", ")", "{", "return", ";", "}", "if", "(", "GlobalSyncRedis", ".", "caches", ".", "containsKey", "(", "name", ")", ")",...
remove cache from memory. @param name
[ "remove", "cache", "from", "memory", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/GlobalSyncRedis.java#L79-L86
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/GlobalSyncRedis.java
GlobalSyncRedis.getSyncCache
public static Cache getSyncCache(String name) { if (StrKit.isBlank(name) || !GlobalSyncRedis.caches.containsKey(name)) { return Redis.use(); } return GlobalSyncRedis.caches.get(name); }
java
public static Cache getSyncCache(String name) { if (StrKit.isBlank(name) || !GlobalSyncRedis.caches.containsKey(name)) { return Redis.use(); } return GlobalSyncRedis.caches.get(name); }
[ "public", "static", "Cache", "getSyncCache", "(", "String", "name", ")", "{", "if", "(", "StrKit", ".", "isBlank", "(", "name", ")", "||", "!", "GlobalSyncRedis", ".", "caches", ".", "containsKey", "(", "name", ")", ")", "{", "return", "Redis", ".", "u...
Get cache from memory. @param name @return
[ "Get", "cache", "from", "memory", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/GlobalSyncRedis.java#L93-L98
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.redisColumnKey
private String redisColumnKey(SqlpKit.FLAG flag) { StringBuilder key = new StringBuilder(this._getUsefulClass().toGenericString()); String[] attrs = this._getAttrNames(); Object val; for (String attr : attrs) { val = this.get(attr); if (null == val) { continue; } key.append(val.toString()); } ...
java
private String redisColumnKey(SqlpKit.FLAG flag) { StringBuilder key = new StringBuilder(this._getUsefulClass().toGenericString()); String[] attrs = this._getAttrNames(); Object val; for (String attr : attrs) { val = this.get(attr); if (null == val) { continue; } key.append(val.toString()); } ...
[ "private", "String", "redisColumnKey", "(", "SqlpKit", ".", "FLAG", "flag", ")", "{", "StringBuilder", "key", "=", "new", "StringBuilder", "(", "this", ".", "_getUsefulClass", "(", ")", ".", "toGenericString", "(", ")", ")", ";", "String", "[", "]", "attrs...
redis key for attrs' values @param flag : ids or id store @return data[s]:md5(concat(columns' value))
[ "redis", "key", "for", "attrs", "values" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L90-L106
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.fetchDatasFromRedis
private List<M> fetchDatasFromRedis(String... columns) { // redis key String key = this.redisColumnKey(SqlpKit.FLAG.ALL); // fetch from redis List<M> fetchDatas = this.redis().get(key); if (null == fetchDatas) { // fetch ids from db. fetchDatas = this.find(SqlpKit.select(this, this.primaryKeys())); } ...
java
private List<M> fetchDatasFromRedis(String... columns) { // redis key String key = this.redisColumnKey(SqlpKit.FLAG.ALL); // fetch from redis List<M> fetchDatas = this.redis().get(key); if (null == fetchDatas) { // fetch ids from db. fetchDatas = this.find(SqlpKit.select(this, this.primaryKeys())); } ...
[ "private", "List", "<", "M", ">", "fetchDatasFromRedis", "(", "String", "...", "columns", ")", "{", "// redis key", "String", "key", "=", "this", ".", "redisColumnKey", "(", "SqlpKit", ".", "FLAG", ".", "ALL", ")", ";", "// fetch from redis", "List", "<", ...
Use the columns that must contains primary keys fetch Data from db, and use the fetched primary keys fetch from redis. @param columns
[ "Use", "the", "columns", "that", "must", "contains", "primary", "keys", "fetch", "Data", "from", "db", "and", "use", "the", "fetched", "primary", "keys", "fetch", "from", "redis", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L144-L167
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.attrType
public Class<?> attrType(String attr) { Table table = this.table(); if (null != table) { return table.getColumnType(attr); } Method[] methods = this._getUsefulClass().getMethods(); String methodName; for (Method method : methods) { methodName = method.getName(); if (methodName.startsWith("set") ...
java
public Class<?> attrType(String attr) { Table table = this.table(); if (null != table) { return table.getColumnType(attr); } Method[] methods = this._getUsefulClass().getMethods(); String methodName; for (Method method : methods) { methodName = method.getName(); if (methodName.startsWith("set") ...
[ "public", "Class", "<", "?", ">", "attrType", "(", "String", "attr", ")", "{", "Table", "table", "=", "this", ".", "table", "(", ")", ";", "if", "(", "null", "!=", "table", ")", "{", "return", "table", ".", "getColumnType", "(", "attr", ")", ";", ...
Get attr type @param attr @return attr type class
[ "Get", "attr", "type" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L219-L234
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.attrNames
public List<String> attrNames() { String[] names = this._getAttrNames(); if (null != names && names.length != 0) { return Arrays.asList(names); } Method[] methods = this._getUsefulClass().getMethods(); String methodName; List<String> attrs = new ArrayList<String>(); for (Method method : methods) { m...
java
public List<String> attrNames() { String[] names = this._getAttrNames(); if (null != names && names.length != 0) { return Arrays.asList(names); } Method[] methods = this._getUsefulClass().getMethods(); String methodName; List<String> attrs = new ArrayList<String>(); for (Method method : methods) { m...
[ "public", "List", "<", "String", ">", "attrNames", "(", ")", "{", "String", "[", "]", "names", "=", "this", ".", "_getAttrNames", "(", ")", ";", "if", "(", "null", "!=", "names", "&&", "names", ".", "length", "!=", "0", ")", "{", "return", "Arrays"...
Get attr names
[ "Get", "attr", "names" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L239-L257
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.attrsCp
public Map<Object, Object> attrsCp() { Map<Object, Object> attrs = new HashMap<Object, Object>(); String[] attrNames = this._getAttrNames(); for (String attr : attrNames) { attrs.put(attr, this.get(attr)); } return attrs; }
java
public Map<Object, Object> attrsCp() { Map<Object, Object> attrs = new HashMap<Object, Object>(); String[] attrNames = this._getAttrNames(); for (String attr : attrNames) { attrs.put(attr, this.get(attr)); } return attrs; }
[ "public", "Map", "<", "Object", ",", "Object", ">", "attrsCp", "(", ")", "{", "Map", "<", "Object", ",", "Object", ">", "attrs", "=", "new", "HashMap", "<", "Object", ",", "Object", ">", "(", ")", ";", "String", "[", "]", "attrNames", "=", "this", ...
Model attr copy version , the model just use default "DbKit.brokenConfig"
[ "Model", "attr", "copy", "version", "the", "model", "just", "use", "default", "DbKit", ".", "brokenConfig" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L269-L276
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.shotCacheName
public void shotCacheName(String cacheName) { //reset cache if (StrKit.notBlank(cacheName) && !cacheName.equals(this.cacheName)) { GlobalSyncRedis.removeSyncCache(this.cacheName); } this.cacheName = cacheName; //auto open sync to redis this.syncToRedis = true; //update model redis mapping ModelRedisM...
java
public void shotCacheName(String cacheName) { //reset cache if (StrKit.notBlank(cacheName) && !cacheName.equals(this.cacheName)) { GlobalSyncRedis.removeSyncCache(this.cacheName); } this.cacheName = cacheName; //auto open sync to redis this.syncToRedis = true; //update model redis mapping ModelRedisM...
[ "public", "void", "shotCacheName", "(", "String", "cacheName", ")", "{", "//reset cache", "if", "(", "StrKit", ".", "notBlank", "(", "cacheName", ")", "&&", "!", "cacheName", ".", "equals", "(", "this", ".", "cacheName", ")", ")", "{", "GlobalSyncRedis", "...
shot cache's name. if current cacheName != the old cacheName, will reset old cache, update cache use the current cacheName and open syncToRedis.
[ "shot", "cache", "s", "name", ".", "if", "current", "cacheName", "!", "=", "the", "old", "cacheName", "will", "reset", "old", "cache", "update", "cache", "use", "the", "current", "cacheName", "and", "open", "syncToRedis", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L297-L307
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.save
@Override public boolean save() { for (CallbackListener callbackListener : this.callbackListeners) { callbackListener.beforeSave(this); } boolean ret = super.save(); if (this.syncToRedis && ret) { this.saveToRedis(); } for (CallbackListener callbackListener : this.callbackListeners) { callbackList...
java
@Override public boolean save() { for (CallbackListener callbackListener : this.callbackListeners) { callbackListener.beforeSave(this); } boolean ret = super.save(); if (this.syncToRedis && ret) { this.saveToRedis(); } for (CallbackListener callbackListener : this.callbackListeners) { callbackList...
[ "@", "Override", "public", "boolean", "save", "(", ")", "{", "for", "(", "CallbackListener", "callbackListener", ":", "this", ".", "callbackListeners", ")", "{", "callbackListener", ".", "beforeSave", "(", "this", ")", ";", "}", "boolean", "ret", "=", "super...
save to db, if `syncToRedis` is true , this model will save to redis in the same time.
[ "save", "to", "db", "if", "syncToRedis", "is", "true", "this", "model", "will", "save", "to", "redis", "in", "the", "same", "time", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L353-L366
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.delete
@Override public boolean delete() { for (CallbackListener callbackListener : this.callbackListeners) { callbackListener.beforeDelete(this); } boolean ret = super.delete(); if (this.syncToRedis && ret) { //delete from Redis this.redis().del(this.redisKey(this)); } for (Ca...
java
@Override public boolean delete() { for (CallbackListener callbackListener : this.callbackListeners) { callbackListener.beforeDelete(this); } boolean ret = super.delete(); if (this.syncToRedis && ret) { //delete from Redis this.redis().del(this.redisKey(this)); } for (Ca...
[ "@", "Override", "public", "boolean", "delete", "(", ")", "{", "for", "(", "CallbackListener", "callbackListener", ":", "this", ".", "callbackListeners", ")", "{", "callbackListener", ".", "beforeDelete", "(", "this", ")", ";", "}", "boolean", "ret", "=", "s...
delete from db, if `syncToRedis` is true , this model will delete from redis in the same time.
[ "delete", "from", "db", "if", "syncToRedis", "is", "true", "this", "model", "will", "delete", "from", "redis", "in", "the", "same", "time", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L371-L385
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.update
@Override public boolean update() { for (CallbackListener callbackListener : this.callbackListeners) { callbackListener.beforeUpdate(this); } boolean ret = super.update(); if (this.syncToRedis && ret) { this.saveToRedis(); } for (CallbackListener callbackListener : this.cal...
java
@Override public boolean update() { for (CallbackListener callbackListener : this.callbackListeners) { callbackListener.beforeUpdate(this); } boolean ret = super.update(); if (this.syncToRedis && ret) { this.saveToRedis(); } for (CallbackListener callbackListener : this.cal...
[ "@", "Override", "public", "boolean", "update", "(", ")", "{", "for", "(", "CallbackListener", "callbackListener", ":", "this", ".", "callbackListeners", ")", "{", "callbackListener", ".", "beforeUpdate", "(", "this", ")", ";", "}", "boolean", "ret", "=", "s...
update db, if `syncToRedis` is true , this model will update redis in the same time.
[ "update", "db", "if", "syncToRedis", "is", "true", "this", "model", "will", "update", "redis", "in", "the", "same", "time", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L390-L403
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java
ModelExt.hcode
public int hcode() { final int prime = 31; int result = 1; Table table = this.table(); Set<Entry<String, Object>> attrsEntrySet = this._getAttrsEntrySet(); for (Entry<String, Object> entry : attrsEntrySet) { String key = entry.getKey(); Object value = entry.getValue(); Class<?> clazz = table.getColum...
java
public int hcode() { final int prime = 31; int result = 1; Table table = this.table(); Set<Entry<String, Object>> attrsEntrySet = this._getAttrsEntrySet(); for (Entry<String, Object> entry : attrsEntrySet) { String key = entry.getKey(); Object value = entry.getValue(); Class<?> clazz = table.getColum...
[ "public", "int", "hcode", "(", ")", "{", "final", "int", "prime", "=", "31", ";", "int", "result", "=", "1", ";", "Table", "table", "=", "this", ".", "table", "(", ")", ";", "Set", "<", "Entry", "<", "String", ",", "Object", ">", ">", "attrsEntry...
wrapper hash code
[ "wrapper", "hash", "code" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/plugin/activerecord/ModelExt.java#L560-L589
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/DriverManagerAccessorSupport.java
DriverManagerAccessorSupport.define
public static Class<?> define(ClassLoader loader) { try { SecurityManager sm = System.getSecurityManager(); if (sm != null) { String packageName = DriverManagerAccessor.class.getPackage().getName(); RuntimePermission permission = new RuntimePermission("de...
java
public static Class<?> define(ClassLoader loader) { try { SecurityManager sm = System.getSecurityManager(); if (sm != null) { String packageName = DriverManagerAccessor.class.getPackage().getName(); RuntimePermission permission = new RuntimePermission("de...
[ "public", "static", "Class", "<", "?", ">", "define", "(", "ClassLoader", "loader", ")", "{", "try", "{", "SecurityManager", "sm", "=", "System", ".", "getSecurityManager", "(", ")", ";", "if", "(", "sm", "!=", "null", ")", "{", "String", "packageName", ...
Definines the class using the given ClassLoader and ProtectionDomain
[ "Definines", "the", "class", "using", "the", "given", "ClassLoader", "and", "ProtectionDomain" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/DriverManagerAccessorSupport.java#L59-L90
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tlv/JstlBaseTLV.java
JstlBaseTLV.validate
public synchronized ValidationMessage[] validate( int type, String prefix, String uri, PageData page) { try { this.tlvType = type; this.uri = uri; // initialize messageVector = new Vector(); // save the prefix this.prefix = pre...
java
public synchronized ValidationMessage[] validate( int type, String prefix, String uri, PageData page) { try { this.tlvType = type; this.uri = uri; // initialize messageVector = new Vector(); // save the prefix this.prefix = pre...
[ "public", "synchronized", "ValidationMessage", "[", "]", "validate", "(", "int", "type", ",", "String", "prefix", ",", "String", "uri", ",", "PageData", "page", ")", "{", "try", "{", "this", ".", "tlvType", "=", "type", ";", "this", ".", "uri", "=", "u...
do the validation.
[ "do", "the", "validation", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tlv/JstlBaseTLV.java#L127-L180
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tlv/JstlBaseTLV.java
JstlBaseTLV.isTag
protected boolean isTag(String tagUri, String tagLn, String matchUri, String matchLn) { if (tagUri == null || tagUri.length() == 0 || tagLn == null || matchUri == null ...
java
protected boolean isTag(String tagUri, String tagLn, String matchUri, String matchLn) { if (tagUri == null || tagUri.length() == 0 || tagLn == null || matchUri == null ...
[ "protected", "boolean", "isTag", "(", "String", "tagUri", ",", "String", "tagLn", ",", "String", "matchUri", ",", "String", "matchLn", ")", "{", "if", "(", "tagUri", "==", "null", "||", "tagUri", ".", "length", "(", ")", "==", "0", "||", "tagLn", "==",...
utility methods to help us match elements in our tagset
[ "utility", "methods", "to", "help", "us", "match", "elements", "in", "our", "tagset" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tlv/JstlBaseTLV.java#L197-L215
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/el/core/WhenTag.java
WhenTag.condition
protected boolean condition() throws JspTagException { try { Object r = ExpressionEvaluatorManager.evaluate( "test", test, Boolean.class, this, pageContext); if (r == null) { throw new NullAttributeException("when", "test"); } else { ...
java
protected boolean condition() throws JspTagException { try { Object r = ExpressionEvaluatorManager.evaluate( "test", test, Boolean.class, this, pageContext); if (r == null) { throw new NullAttributeException("when", "test"); } else { ...
[ "protected", "boolean", "condition", "(", ")", "throws", "JspTagException", "{", "try", "{", "Object", "r", "=", "ExpressionEvaluatorManager", ".", "evaluate", "(", "\"test\"", ",", "test", ",", "Boolean", ".", "class", ",", "this", ",", "pageContext", ")", ...
Supplied conditional logic
[ "Supplied", "conditional", "logic" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/el/core/WhenTag.java#L57-L69
train
agentgt/jirm
jirm-orm/src/main/java/co/jirm/mapper/definition/DefaultNamingStrategy.java
DefaultNamingStrategy.logicalColumnName
public String logicalColumnName(String columnName, String propertyName) { return ! isNullOrEmpty( columnName ) ? columnName : unqualify( propertyName ); }
java
public String logicalColumnName(String columnName, String propertyName) { return ! isNullOrEmpty( columnName ) ? columnName : unqualify( propertyName ); }
[ "public", "String", "logicalColumnName", "(", "String", "columnName", ",", "String", "propertyName", ")", "{", "return", "!", "isNullOrEmpty", "(", "columnName", ")", "?", "columnName", ":", "unqualify", "(", "propertyName", ")", ";", "}" ]
Return the column name or the unqualified property name
[ "Return", "the", "column", "name", "or", "the", "unqualified", "property", "name" ]
95a2fcdef4121c439053524407af3d4ce8035722
https://github.com/agentgt/jirm/blob/95a2fcdef4121c439053524407af3d4ce8035722/jirm-orm/src/main/java/co/jirm/mapper/definition/DefaultNamingStrategy.java#L105-L108
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceUtil.java
DataSourceUtil.getDataSource
static DataSource getDataSource(Object rawDataSource, PageContext pc) throws JspException { DataSource dataSource = null; if (rawDataSource == null) { rawDataSource = Config.find(pc, Config.SQL_DATA_SOURCE); } if (rawDataSource == null) { return null; } /* * ...
java
static DataSource getDataSource(Object rawDataSource, PageContext pc) throws JspException { DataSource dataSource = null; if (rawDataSource == null) { rawDataSource = Config.find(pc, Config.SQL_DATA_SOURCE); } if (rawDataSource == null) { return null; } /* * ...
[ "static", "DataSource", "getDataSource", "(", "Object", "rawDataSource", ",", "PageContext", "pc", ")", "throws", "JspException", "{", "DataSource", "dataSource", "=", "null", ";", "if", "(", "rawDataSource", "==", "null", ")", "{", "rawDataSource", "=", "Config...
If dataSource is a String first do JNDI lookup. If lookup fails parse String like it was a set of JDBC parameters Otherwise check to see if dataSource is a DataSource object and use as is
[ "If", "dataSource", "is", "a", "String", "first", "do", "JNDI", "lookup", ".", "If", "lookup", "fails", "parse", "String", "like", "it", "was", "a", "set", "of", "JDBC", "parameters", "Otherwise", "check", "to", "see", "if", "dataSource", "is", "a", "Dat...
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceUtil.java#L50-L84
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceUtil.java
DataSourceUtil.getDataSource
private static DataSource getDataSource(String params) throws JspException { DataSourceWrapper dataSource = new DataSourceWrapper(); String[] paramString = new String[4]; int escCount = 0; int aryCount = 0; int begin = 0; for (int index = 0; index < params.l...
java
private static DataSource getDataSource(String params) throws JspException { DataSourceWrapper dataSource = new DataSourceWrapper(); String[] paramString = new String[4]; int escCount = 0; int aryCount = 0; int begin = 0; for (int index = 0; index < params.l...
[ "private", "static", "DataSource", "getDataSource", "(", "String", "params", ")", "throws", "JspException", "{", "DataSourceWrapper", "dataSource", "=", "new", "DataSourceWrapper", "(", ")", ";", "String", "[", "]", "paramString", "=", "new", "String", "[", "4",...
Parse JDBC parameters and setup dataSource appropriately
[ "Parse", "JDBC", "parameters", "and", "setup", "dataSource", "appropriately" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceUtil.java#L89-L137
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/SPathParser.java
SPathParser.main
public static void main(String args[]) throws ParseException { SPathParser parser = new SPathParser(System.in); Path p = parser.expression(); java.util.List l = p.getSteps(); // output for simple testing System.out.println(); if (p instanceof AbsolutePath) System.out.println("Root: /"...
java
public static void main(String args[]) throws ParseException { SPathParser parser = new SPathParser(System.in); Path p = parser.expression(); java.util.List l = p.getSteps(); // output for simple testing System.out.println(); if (p instanceof AbsolutePath) System.out.println("Root: /"...
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "throws", "ParseException", "{", "SPathParser", "parser", "=", "new", "SPathParser", "(", "System", ".", "in", ")", ";", "Path", "p", "=", "parser", ".", "expression", "(", ")", ...
Simple command-line parser interface, primarily for testing.
[ "Simple", "command", "-", "line", "parser", "interface", "primarily", "for", "testing", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/SPathParser.java#L66-L83
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/SPathParser.java
SPathParser.expression
final public Path expression() throws ParseException { Path expr; if (jj_2_1(2147483647)) { expr = absolutePath(); jj_consume_token(0); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QNAME: case NSWILDCARD: case SLASH: case STAR: expr = relativePath(); ...
java
final public Path expression() throws ParseException { Path expr; if (jj_2_1(2147483647)) { expr = absolutePath(); jj_consume_token(0); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QNAME: case NSWILDCARD: case SLASH: case STAR: expr = relativePath(); ...
[ "final", "public", "Path", "expression", "(", ")", "throws", "ParseException", "{", "Path", "expr", ";", "if", "(", "jj_2_1", "(", "2147483647", ")", ")", "{", "expr", "=", "absolutePath", "(", ")", ";", "jj_consume_token", "(", "0", ")", ";", "}", "el...
Actual SPath grammar
[ "Actual", "SPath", "grammar" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/SPathParser.java#L92-L114
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/SPathParser.java
SPathParser.relativePath
final public RelativePath relativePath() throws ParseException { RelativePath relPath = null; Step step; step = step(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SLASH: jj_consume_token(SLASH); relPath = relativePath(); break; default: jj_la1[1] = jj_gen; ; } ...
java
final public RelativePath relativePath() throws ParseException { RelativePath relPath = null; Step step; step = step(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SLASH: jj_consume_token(SLASH); relPath = relativePath(); break; default: jj_la1[1] = jj_gen; ; } ...
[ "final", "public", "RelativePath", "relativePath", "(", ")", "throws", "ParseException", "{", "RelativePath", "relPath", "=", "null", ";", "Step", "step", ";", "step", "=", "step", "(", ")", ";", "switch", "(", "(", "jj_ntk", "==", "-", "1", ")", "?", ...
as an example, we use recursion here to handle a list
[ "as", "an", "example", "we", "use", "recursion", "here", "to", "handle", "a", "list" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/SPathParser.java#L125-L140
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.newDocumentBuilder
public static DocumentBuilder newDocumentBuilder() { try { return PARSER_FACTORY.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw (Error) new AssertionError().initCause(e); } }
java
public static DocumentBuilder newDocumentBuilder() { try { return PARSER_FACTORY.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw (Error) new AssertionError().initCause(e); } }
[ "public", "static", "DocumentBuilder", "newDocumentBuilder", "(", ")", "{", "try", "{", "return", "PARSER_FACTORY", ".", "newDocumentBuilder", "(", ")", ";", "}", "catch", "(", "ParserConfigurationException", "e", ")", "{", "throw", "(", "Error", ")", "new", "...
Create a new DocumentBuilder configured for namespaces but not validating. @return a new, configured DocumentBuilder
[ "Create", "a", "new", "DocumentBuilder", "configured", "for", "namespaces", "but", "not", "validating", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L172-L178
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.newTransformer
public static Transformer newTransformer(Source source, JstlUriResolver uriResolver) throws TransformerConfigurationException { TRANSFORMER_FACTORY.setURIResolver(uriResolver); Transformer transformer = TRANSFORMER_FACTORY.newTransformer(source); // Although newTansformer() is not allowed to ret...
java
public static Transformer newTransformer(Source source, JstlUriResolver uriResolver) throws TransformerConfigurationException { TRANSFORMER_FACTORY.setURIResolver(uriResolver); Transformer transformer = TRANSFORMER_FACTORY.newTransformer(source); // Although newTansformer() is not allowed to ret...
[ "public", "static", "Transformer", "newTransformer", "(", "Source", "source", ",", "JstlUriResolver", "uriResolver", ")", "throws", "TransformerConfigurationException", "{", "TRANSFORMER_FACTORY", ".", "setURIResolver", "(", "uriResolver", ")", ";", "Transformer", "transf...
Create a new Transformer from an XSLT. @param source the source of the XSLT. @param uriResolver @return a new Transformer @throws TransformerConfigurationException if there was a problem creating the Transformer from the XSLT
[ "Create", "a", "new", "Transformer", "from", "an", "XSLT", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L195-L204
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.newInputSource
public static InputSource newInputSource(Reader reader, String systemId) { InputSource source = new InputSource(reader); source.setSystemId(wrapSystemId(systemId)); return source; }
java
public static InputSource newInputSource(Reader reader, String systemId) { InputSource source = new InputSource(reader); source.setSystemId(wrapSystemId(systemId)); return source; }
[ "public", "static", "InputSource", "newInputSource", "(", "Reader", "reader", ",", "String", "systemId", ")", "{", "InputSource", "source", "=", "new", "InputSource", "(", "reader", ")", ";", "source", ".", "setSystemId", "(", "wrapSystemId", "(", "systemId", ...
Create an InputSource from a Reader. The systemId will be wrapped for use with JSTL's EntityResolver and UriResolver. @param reader the source of the XML @param systemId the system id @return a configured InputSource
[ "Create", "an", "InputSource", "from", "a", "Reader", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L215-L219
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.newXMLReader
public static XMLReader newXMLReader(JstlEntityResolver entityResolver) throws ParserConfigurationException, SAXException { XMLReader xmlReader = SAXPARSER_FACTORY.newSAXParser().getXMLReader(); xmlReader.setEntityResolver(entityResolver); return xmlReader; }
java
public static XMLReader newXMLReader(JstlEntityResolver entityResolver) throws ParserConfigurationException, SAXException { XMLReader xmlReader = SAXPARSER_FACTORY.newSAXParser().getXMLReader(); xmlReader.setEntityResolver(entityResolver); return xmlReader; }
[ "public", "static", "XMLReader", "newXMLReader", "(", "JstlEntityResolver", "entityResolver", ")", "throws", "ParserConfigurationException", ",", "SAXException", "{", "XMLReader", "xmlReader", "=", "SAXPARSER_FACTORY", ".", "newSAXParser", "(", ")", ".", "getXMLReader", ...
Create an XMLReader that resolves entities using JSTL semantics. @param entityResolver for resolving using JSTL semantics @return a new XMLReader @throws ParserConfigurationException if there was a configuration problem creating the reader @throws SAXException if there was a problem creating the reader
[ "Create", "an", "XMLReader", "that", "resolves", "entities", "using", "JSTL", "semantics", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L228-L233
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.newSAXSource
public static SAXSource newSAXSource(Reader reader, String systemId, JstlEntityResolver entityResolver) throws ParserConfigurationException, SAXException { SAXSource source = new SAXSource(newXMLReader(entityResolver), new InputSource(reader)); source.setSystemId(wrapSystemId(systemId)); ...
java
public static SAXSource newSAXSource(Reader reader, String systemId, JstlEntityResolver entityResolver) throws ParserConfigurationException, SAXException { SAXSource source = new SAXSource(newXMLReader(entityResolver), new InputSource(reader)); source.setSystemId(wrapSystemId(systemId)); ...
[ "public", "static", "SAXSource", "newSAXSource", "(", "Reader", "reader", ",", "String", "systemId", ",", "JstlEntityResolver", "entityResolver", ")", "throws", "ParserConfigurationException", ",", "SAXException", "{", "SAXSource", "source", "=", "new", "SAXSource", "...
Create a SAXSource from a Reader. Any entities will be resolved using JSTL semantics. @param reader the source of the XML @param systemId the system id @param entityResolver for resolving using JSTL semamtics @return a new SAXSource @throws ParserConfigurationException if there was a configuration problem creating the...
[ "Create", "a", "SAXSource", "from", "a", "Reader", ".", "Any", "entities", "will", "be", "resolved", "using", "JSTL", "semantics", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L245-L250
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.runWithOurClassLoader
private static <T, E extends Exception> T runWithOurClassLoader(final Callable<T> action, Class<E> allowed) throws E { PrivilegedExceptionAction<T> actionWithClassloader = new PrivilegedExceptionAction<T>() { public T run() throws Exception { ClassLoader original = Thread.currentThre...
java
private static <T, E extends Exception> T runWithOurClassLoader(final Callable<T> action, Class<E> allowed) throws E { PrivilegedExceptionAction<T> actionWithClassloader = new PrivilegedExceptionAction<T>() { public T run() throws Exception { ClassLoader original = Thread.currentThre...
[ "private", "static", "<", "T", ",", "E", "extends", "Exception", ">", "T", "runWithOurClassLoader", "(", "final", "Callable", "<", "T", ">", "action", ",", "Class", "<", "E", ">", "allowed", ")", "throws", "E", "{", "PrivilegedExceptionAction", "<", "T", ...
Performs an action using this Class's ClassLoader as the Thread context ClassLoader. @param action the action to perform @param allowed an Exception that might be thrown by the action @param <T> the type of the result @param <E> the type of the allowed Exception @return the result of the action @throws E if the action...
[ "Performs", "an", "action", "using", "this", "Class", "s", "ClassLoader", "as", "the", "Thread", "context", "ClassLoader", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L384-L412
train
agentgt/jirm
jirm-orm/src/main/java/co/jirm/orm/builder/select/SelectBuilderFactory.java
SelectBuilderFactory.count
public SelectRootClauseBuilder<? extends QueryForNumber> count() { //TODO its hard to know whether or not to innerjoin to get an accurate count here. StringBuilder sb = new StringBuilder(); sb.append("SELECT count(*)"); sb.append(" FROM ").append(definition.getSqlName()); //definition.innerJoin(sb); SelectR...
java
public SelectRootClauseBuilder<? extends QueryForNumber> count() { //TODO its hard to know whether or not to innerjoin to get an accurate count here. StringBuilder sb = new StringBuilder(); sb.append("SELECT count(*)"); sb.append(" FROM ").append(definition.getSqlName()); //definition.innerJoin(sb); SelectR...
[ "public", "SelectRootClauseBuilder", "<", "?", "extends", "QueryForNumber", ">", "count", "(", ")", "{", "//TODO its hard to know whether or not to innerjoin to get an accurate count here.", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "ap...
FIXME This may not work.
[ "FIXME", "This", "may", "not", "work", "." ]
95a2fcdef4121c439053524407af3d4ce8035722
https://github.com/agentgt/jirm/blob/95a2fcdef4121c439053524407af3d4ce8035722/jirm-orm/src/main/java/co/jirm/orm/builder/select/SelectBuilderFactory.java#L125-L145
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
ForEachSupport.prepare
@Override protected void prepare() throws JspTagException { // produce the right sort of ForEachIterator if (rawItems == null) { // if no items were specified, iterate from begin to end items = new ToEndIterator(end); } else if (rawItems instanceof ValueExpression) { ...
java
@Override protected void prepare() throws JspTagException { // produce the right sort of ForEachIterator if (rawItems == null) { // if no items were specified, iterate from begin to end items = new ToEndIterator(end); } else if (rawItems instanceof ValueExpression) { ...
[ "@", "Override", "protected", "void", "prepare", "(", ")", "throws", "JspTagException", "{", "// produce the right sort of ForEachIterator", "if", "(", "rawItems", "==", "null", ")", "{", "// if no items were specified, iterate from begin to end", "items", "=", "new", "To...
our 'raw' items
[ "our", "raw", "items" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java#L56-L74
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java
SetSupport.exportToVariable
void exportToVariable(Object result) throws JspTagException { /* * Store the result, letting an IllegalArgumentException * propagate back if the scope is invalid (e.g., if an attempt * is made to store something in the session without any * HttpSession existing). */ ...
java
void exportToVariable(Object result) throws JspTagException { /* * Store the result, letting an IllegalArgumentException * propagate back if the scope is invalid (e.g., if an attempt * is made to store something in the session without any * HttpSession existing). */ ...
[ "void", "exportToVariable", "(", "Object", "result", ")", "throws", "JspTagException", "{", "/*\n * Store the result, letting an IllegalArgumentException\n * propagate back if the scope is invalid (e.g., if an attempt\n * is made to store something in the session without any\n...
Export the result into a scoped variable. @param result the value to export @throws JspTagException if there was a problem exporting the result
[ "Export", "the", "result", "into", "a", "scoped", "variable", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java#L156-L191
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java
SetSupport.exportToMapProperty
void exportToMapProperty(Object target, String property, Object result) { @SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>) target; if (result == null) { map.remove(property); } else { map.put(property, result); } }
java
void exportToMapProperty(Object target, String property, Object result) { @SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>) target; if (result == null) { map.remove(property); } else { map.put(property, result); } }
[ "void", "exportToMapProperty", "(", "Object", "target", ",", "String", "property", ",", "Object", "result", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Map", "<", "Object", ",", "Object", ">", "map", "=", "(", "Map", "<", "Object", ",", ...
Export the result into a Map. @param target the Map to export into @param property the key to export into @param result the value to export
[ "Export", "the", "result", "into", "a", "Map", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java#L200-L208
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java
SetSupport.exportToBeanProperty
void exportToBeanProperty(Object target, String property, Object result) throws JspTagException { PropertyDescriptor[] descriptors; try { descriptors = Introspector.getBeanInfo(target.getClass()).getPropertyDescriptors(); } catch (IntrospectionException ex) { throw new Js...
java
void exportToBeanProperty(Object target, String property, Object result) throws JspTagException { PropertyDescriptor[] descriptors; try { descriptors = Introspector.getBeanInfo(target.getClass()).getPropertyDescriptors(); } catch (IntrospectionException ex) { throw new Js...
[ "void", "exportToBeanProperty", "(", "Object", "target", ",", "String", "property", ",", "Object", "result", ")", "throws", "JspTagException", "{", "PropertyDescriptor", "[", "]", "descriptors", ";", "try", "{", "descriptors", "=", "Introspector", ".", "getBeanInf...
Export the result into a bean property. @param target the bean to export into @param property the bean property to set @param result the value to export @throws JspTagException if there was a problem exporting the result
[ "Export", "the", "result", "into", "a", "bean", "property", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java#L218-L245
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java
SetSupport.convertToExpectedType
private Object convertToExpectedType(final Object value, Method m) throws ELException { if (value == null) { return null; } Class<?> expectedType = m.getParameterTypes()[0]; return getExpressionFactory().coerceToType(value, expectedType); }
java
private Object convertToExpectedType(final Object value, Method m) throws ELException { if (value == null) { return null; } Class<?> expectedType = m.getParameterTypes()[0]; return getExpressionFactory().coerceToType(value, expectedType); }
[ "private", "Object", "convertToExpectedType", "(", "final", "Object", "value", ",", "Method", "m", ")", "throws", "ELException", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "Class", "<", "?", ">", "expectedType", "=", "m"...
Convert an object to an expected type of the method parameter according to the conversion rules of the Expression Language. @param value the value to convert @param m the setter method @return value converted to an instance of the expected type; will be null if value was null @throws javax.el.ELException if there ...
[ "Convert", "an", "object", "to", "an", "expected", "type", "of", "the", "method", "parameter", "according", "to", "the", "conversion", "rules", "of", "the", "Expression", "Language", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/SetSupport.java#L256-L262
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/Reflect.java
Reflect.types
private static Class<?>[] types(Object... values) { if (values == null) { return new Class[0]; } Class<?>[] result = new Class[values.length]; for (int i = 0; i < values.length; i++) { Object value = values[i]; result[i] = value == null ? Object.clas...
java
private static Class<?>[] types(Object... values) { if (values == null) { return new Class[0]; } Class<?>[] result = new Class[values.length]; for (int i = 0; i < values.length; i++) { Object value = values[i]; result[i] = value == null ? Object.clas...
[ "private", "static", "Class", "<", "?", ">", "[", "]", "types", "(", "Object", "...", "values", ")", "{", "if", "(", "values", "==", "null", ")", "{", "return", "new", "Class", "[", "0", "]", ";", "}", "Class", "<", "?", ">", "[", "]", "result"...
Get an array of types for an array of objects @see Object#getClass()
[ "Get", "an", "array", "of", "types", "for", "an", "array", "of", "objects" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/Reflect.java#L649-L662
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tlv/JstlCoreTLV.java
JstlCoreTLV.validate
@Override public ValidationMessage[] validate( String prefix, String uri, PageData page) { return super.validate(TYPE_CORE, prefix, uri, page); }
java
@Override public ValidationMessage[] validate( String prefix, String uri, PageData page) { return super.validate(TYPE_CORE, prefix, uri, page); }
[ "@", "Override", "public", "ValidationMessage", "[", "]", "validate", "(", "String", "prefix", ",", "String", "uri", ",", "PageData", "page", ")", "{", "return", "super", ".", "validate", "(", "TYPE_CORE", ",", "prefix", ",", "uri", ",", "page", ")", ";"...
set its type and delegate validation to super-class
[ "set", "its", "type", "and", "delegate", "validation", "to", "super", "-", "class" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tlv/JstlCoreTLV.java#L94-L98
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/FastJsonKit.java
FastJsonKit.jsonToMap
@SuppressWarnings("unchecked") public static <K,V> Map<K,V> jsonToMap(String json){ return FastJsonKit.parse(json, HashMap.class); }
java
@SuppressWarnings("unchecked") public static <K,V> Map<K,V> jsonToMap(String json){ return FastJsonKit.parse(json, HashMap.class); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "jsonToMap", "(", "String", "json", ")", "{", "return", "FastJsonKit", ".", "parse", "(", "json", ",", "HashMap", ".", "c...
json string to map @param json @return
[ "json", "string", "to", "map" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/FastJsonKit.java#L67-L70
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/FastJsonKit.java
FastJsonKit.jsonToRecord
public static Record jsonToRecord(String json){ Map<String,Object> map = jsonToMap(json); return new Record().setColumns(map); }
java
public static Record jsonToRecord(String json){ Map<String,Object> map = jsonToMap(json); return new Record().setColumns(map); }
[ "public", "static", "Record", "jsonToRecord", "(", "String", "json", ")", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "jsonToMap", "(", "json", ")", ";", "return", "new", "Record", "(", ")", ".", "setColumns", "(", "map", ")", ";", "}"...
json to Record @param json @return
[ "json", "to", "Record" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/FastJsonKit.java#L86-L89
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerce
public static Object coerce(Object pValue, Class pClass, Logger pLogger) throws ELException { if (pClass == String.class) { return coerceToString(pValue, pLogger); } else if (isPrimitiveNumberClass(pClass)) { ...
java
public static Object coerce(Object pValue, Class pClass, Logger pLogger) throws ELException { if (pClass == String.class) { return coerceToString(pValue, pLogger); } else if (isPrimitiveNumberClass(pClass)) { ...
[ "public", "static", "Object", "coerce", "(", "Object", "pValue", ",", "Class", "pClass", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pClass", "==", "String", ".", "class", ")", "{", "return", "coerceToString", "(", "pValue", ",...
Coerces the given value to the specified class.
[ "Coerces", "the", "given", "value", "to", "the", "specified", "class", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L235-L252
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.isPrimitiveNumberClass
static boolean isPrimitiveNumberClass(Class pClass) { return pClass == Byte.class || pClass == Byte.TYPE || pClass == Short.class || pClass == Short.TYPE || pClass == Integer.class || ...
java
static boolean isPrimitiveNumberClass(Class pClass) { return pClass == Byte.class || pClass == Byte.TYPE || pClass == Short.class || pClass == Short.TYPE || pClass == Integer.class || ...
[ "static", "boolean", "isPrimitiveNumberClass", "(", "Class", "pClass", ")", "{", "return", "pClass", "==", "Byte", ".", "class", "||", "pClass", "==", "Byte", ".", "TYPE", "||", "pClass", "==", "Short", ".", "class", "||", "pClass", "==", "Short", ".", "...
Returns true if the given class is Byte, Short, Integer, Long, Float, Double
[ "Returns", "true", "if", "the", "given", "class", "is", "Byte", "Short", "Integer", "Long", "Float", "Double" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L260-L274
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToString
public static String coerceToString(Object pValue, Logger pLogger) throws ELException { if (pValue == null) { return ""; } else if (pValue instanceof String) { return (String) pValue; } else { try { ...
java
public static String coerceToString(Object pValue, Logger pLogger) throws ELException { if (pValue == null) { return ""; } else if (pValue instanceof String) { return (String) pValue; } else { try { ...
[ "public", "static", "String", "coerceToString", "(", "Object", "pValue", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pValue", "==", "null", ")", "{", "return", "\"\"", ";", "}", "else", "if", "(", "pValue", "instanceof", "Strin...
Coerces the specified value to a String
[ "Coerces", "the", "specified", "value", "to", "a", "String" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L281-L301
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToPrimitiveNumber
public static Number coerceToPrimitiveNumber(Object pValue, Class pClass, Logger pLogger) throws ELException { if (pValue == null || "".equals(pValue)) { return coerceToPrimi...
java
public static Number coerceToPrimitiveNumber(Object pValue, Class pClass, Logger pLogger) throws ELException { if (pValue == null || "".equals(pValue)) { return coerceToPrimi...
[ "public", "static", "Number", "coerceToPrimitiveNumber", "(", "Object", "pValue", ",", "Class", "pClass", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pValue", "==", "null", "||", "\"\"", ".", "equals", "(", "pValue", ")", ")", ...
Coerces a value to the given primitive number class
[ "Coerces", "a", "value", "to", "the", "given", "primitive", "number", "class" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L308-L351
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToInteger
public static Integer coerceToInteger(Object pValue, Logger pLogger) throws ELException { if (pValue == null) { return null; } else if (pValue instanceof Character) { return PrimitiveObjects.getInteger ((in...
java
public static Integer coerceToInteger(Object pValue, Logger pLogger) throws ELException { if (pValue == null) { return null; } else if (pValue instanceof Character) { return PrimitiveObjects.getInteger ((in...
[ "public", "static", "Integer", "coerceToInteger", "(", "Object", "pValue", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pValue", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "pValue", "instanceof", "Cha...
Coerces a value to an Integer, returning null if the coercion isn't possible.
[ "Coerces", "a", "value", "to", "an", "Integer", "returning", "null", "if", "the", "coercion", "isn", "t", "possible", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L359-L401
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToPrimitiveNumber
static Number coerceToPrimitiveNumber(long pValue, Class pClass) throws ELException { if (pClass == Byte.class || pClass == Byte.TYPE) { return PrimitiveObjects.getByte((byte) pValue); } else if (pClass == Short.class || pClass == Short.T...
java
static Number coerceToPrimitiveNumber(long pValue, Class pClass) throws ELException { if (pClass == Byte.class || pClass == Byte.TYPE) { return PrimitiveObjects.getByte((byte) pValue); } else if (pClass == Short.class || pClass == Short.T...
[ "static", "Number", "coerceToPrimitiveNumber", "(", "long", "pValue", ",", "Class", "pClass", ")", "throws", "ELException", "{", "if", "(", "pClass", "==", "Byte", ".", "class", "||", "pClass", "==", "Byte", ".", "TYPE", ")", "{", "return", "PrimitiveObjects...
Coerces a long to the given primitive number class
[ "Coerces", "a", "long", "to", "the", "given", "primitive", "number", "class" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L408-L426
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToPrimitiveNumber
static Number coerceToPrimitiveNumber(Number pValue, Class pClass) throws ELException { if (pClass == Byte.class || pClass == Byte.TYPE) { return PrimitiveObjects.getByte(pValue.byteValue()); } else if (pClass == Short.class || pClass == ...
java
static Number coerceToPrimitiveNumber(Number pValue, Class pClass) throws ELException { if (pClass == Byte.class || pClass == Byte.TYPE) { return PrimitiveObjects.getByte(pValue.byteValue()); } else if (pClass == Short.class || pClass == ...
[ "static", "Number", "coerceToPrimitiveNumber", "(", "Number", "pValue", ",", "Class", "pClass", ")", "throws", "ELException", "{", "if", "(", "pClass", "==", "Byte", ".", "class", "||", "pClass", "==", "Byte", ".", "TYPE", ")", "{", "return", "PrimitiveObjec...
Coerces a Number to the given primitive number class
[ "Coerces", "a", "Number", "to", "the", "given", "primitive", "number", "class" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L458-L476
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToPrimitiveNumber
static Number coerceToPrimitiveNumber(String pValue, Class pClass) throws ELException { if (pClass == Byte.class || pClass == Byte.TYPE) { return Byte.valueOf(pValue); } else if (pClass == Short.class || pClass == Short.TYPE) { ...
java
static Number coerceToPrimitiveNumber(String pValue, Class pClass) throws ELException { if (pClass == Byte.class || pClass == Byte.TYPE) { return Byte.valueOf(pValue); } else if (pClass == Short.class || pClass == Short.TYPE) { ...
[ "static", "Number", "coerceToPrimitiveNumber", "(", "String", "pValue", ",", "Class", "pClass", ")", "throws", "ELException", "{", "if", "(", "pClass", "==", "Byte", ".", "class", "||", "pClass", "==", "Byte", ".", "TYPE", ")", "{", "return", "Byte", ".", ...
Coerces a String to the given primitive number class
[ "Coerces", "a", "String", "to", "the", "given", "primitive", "number", "class" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L483-L501
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToCharacter
public static Character coerceToCharacter(Object pValue, Logger pLogger) throws ELException { if (pValue == null || "".equals(pValue)) { return PrimitiveObjects.getCharacter((char) 0); } else if (pValue instanceof Char...
java
public static Character coerceToCharacter(Object pValue, Logger pLogger) throws ELException { if (pValue == null || "".equals(pValue)) { return PrimitiveObjects.getCharacter((char) 0); } else if (pValue instanceof Char...
[ "public", "static", "Character", "coerceToCharacter", "(", "Object", "pValue", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pValue", "==", "null", "||", "\"\"", ".", "equals", "(", "pValue", ")", ")", "{", "return", "PrimitiveObje...
Coerces a value to a Character
[ "Coerces", "a", "value", "to", "a", "Character" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L508-L535
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToBoolean
public static Boolean coerceToBoolean(Object pValue, Logger pLogger) throws ELException { if (pValue == null || "".equals(pValue)) { return Boolean.FALSE; } else if (pValue instanceof Boolean) { return (Boolean...
java
public static Boolean coerceToBoolean(Object pValue, Logger pLogger) throws ELException { if (pValue == null || "".equals(pValue)) { return Boolean.FALSE; } else if (pValue instanceof Boolean) { return (Boolean...
[ "public", "static", "Boolean", "coerceToBoolean", "(", "Object", "pValue", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pValue", "==", "null", "||", "\"\"", ".", "equals", "(", "pValue", ")", ")", "{", "return", "Boolean", ".", ...
Coerces a value to a Boolean
[ "Coerces", "a", "value", "to", "a", "Boolean" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L542-L572
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.coerceToObject
public static Object coerceToObject(Object pValue, Class pClass, Logger pLogger) throws ELException { if (pValue == null) { return null; } else if (pClass.isAssignableFrom(pValue.getClass())) { ...
java
public static Object coerceToObject(Object pValue, Class pClass, Logger pLogger) throws ELException { if (pValue == null) { return null; } else if (pClass.isAssignableFrom(pValue.getClass())) { ...
[ "public", "static", "Object", "coerceToObject", "(", "Object", "pValue", ",", "Class", "pClass", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "if", "(", "pValue", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "pCl...
Coerces a value to the specified Class that is not covered by any of the above cases
[ "Coerces", "a", "value", "to", "the", "specified", "Class", "that", "is", "not", "covered", "by", "any", "of", "the", "above", "cases" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L580-L631
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.isFloatingPointType
public static boolean isFloatingPointType(Class pClass) { return pClass == Float.class || pClass == Float.TYPE || pClass == Double.class || pClass == Double.TYPE; }
java
public static boolean isFloatingPointType(Class pClass) { return pClass == Float.class || pClass == Float.TYPE || pClass == Double.class || pClass == Double.TYPE; }
[ "public", "static", "boolean", "isFloatingPointType", "(", "Class", "pClass", ")", "{", "return", "pClass", "==", "Float", ".", "class", "||", "pClass", "==", "Float", ".", "TYPE", "||", "pClass", "==", "Double", ".", "class", "||", "pClass", "==", "Double...
Returns true if the given class is of a floating point type
[ "Returns", "true", "if", "the", "given", "class", "is", "of", "a", "floating", "point", "type" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L854-L860
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.isFloatingPointString
public static boolean isFloatingPointString(Object pObject) { if (pObject instanceof String) { String str = (String) pObject; int len = str.length(); for (int i = 0; i < len; i++) { char ch = str.charAt(i); if (ch == '.' || ...
java
public static boolean isFloatingPointString(Object pObject) { if (pObject instanceof String) { String str = (String) pObject; int len = str.length(); for (int i = 0; i < len; i++) { char ch = str.charAt(i); if (ch == '.' || ...
[ "public", "static", "boolean", "isFloatingPointString", "(", "Object", "pObject", ")", "{", "if", "(", "pObject", "instanceof", "String", ")", "{", "String", "str", "=", "(", "String", ")", "pObject", ";", "int", "len", "=", "str", ".", "length", "(", ")...
Returns true if the given string might contain a floating point number - i.e., it contains ".", "e", or "E"
[ "Returns", "true", "if", "the", "given", "string", "might", "contain", "a", "floating", "point", "number", "-", "i", ".", "e", ".", "it", "contains", ".", "e", "or", "E" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L868-L884
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java
Coercions.isIntegerType
public static boolean isIntegerType(Class pClass) { return pClass == Byte.class || pClass == Byte.TYPE || pClass == Short.class || pClass == Short.TYPE || pClass == Character.class || ...
java
public static boolean isIntegerType(Class pClass) { return pClass == Byte.class || pClass == Byte.TYPE || pClass == Short.class || pClass == Short.TYPE || pClass == Character.class || ...
[ "public", "static", "boolean", "isIntegerType", "(", "Class", "pClass", ")", "{", "return", "pClass", "==", "Byte", ".", "class", "||", "pClass", "==", "Byte", ".", "TYPE", "||", "pClass", "==", "Short", ".", "class", "||", "pClass", "==", "Short", ".", ...
Returns true if the given class is of an integer type
[ "Returns", "true", "if", "the", "given", "class", "is", "of", "an", "integer", "type" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Coercions.java#L902-L914
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/core/ControllerExt.java
ControllerExt.getFilesSaveToDatePath
public List<UploadFile> getFilesSaveToDatePath(Integer maxPostSize, String encoding) { return super.getFiles(UploadPathKit.getDatePath(), maxPostSize, encoding); }
java
public List<UploadFile> getFilesSaveToDatePath(Integer maxPostSize, String encoding) { return super.getFiles(UploadPathKit.getDatePath(), maxPostSize, encoding); }
[ "public", "List", "<", "UploadFile", ">", "getFilesSaveToDatePath", "(", "Integer", "maxPostSize", ",", "String", "encoding", ")", "{", "return", "super", ".", "getFiles", "(", "UploadPathKit", ".", "getDatePath", "(", ")", ",", "maxPostSize", ",", "encoding", ...
Get upload file save to date path.
[ "Get", "upload", "file", "save", "to", "date", "path", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/core/ControllerExt.java#L61-L63
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/core/ControllerExt.java
ControllerExt.getParaToBigInteger
public BigInteger getParaToBigInteger(String name,BigInteger defaultValue){ return this.toBigInteger(getPara(name), defaultValue); }
java
public BigInteger getParaToBigInteger(String name,BigInteger defaultValue){ return this.toBigInteger(getPara(name), defaultValue); }
[ "public", "BigInteger", "getParaToBigInteger", "(", "String", "name", ",", "BigInteger", "defaultValue", ")", "{", "return", "this", ".", "toBigInteger", "(", "getPara", "(", "name", ")", ",", "defaultValue", ")", ";", "}" ]
Returns the value of a request parameter and convert to BigInteger with a default value if it is null. @param name a String specifying the name of the parameter @return a BigInteger representing the single value of the parameter
[ "Returns", "the", "value", "of", "a", "request", "parameter", "and", "convert", "to", "BigInteger", "with", "a", "default", "value", "if", "it", "is", "null", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/core/ControllerExt.java#L101-L103
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/JSTLVariableResolver.java
JSTLVariableResolver.resolveVariable
public Object resolveVariable(String pName, Object pContext) throws ELException { PageContext ctx = (PageContext) pContext; // Check for implicit objects if ("pageContext".equals(pName)) { return ctx; } else if ("pageScope".equal...
java
public Object resolveVariable(String pName, Object pContext) throws ELException { PageContext ctx = (PageContext) pContext; // Check for implicit objects if ("pageContext".equals(pName)) { return ctx; } else if ("pageScope".equal...
[ "public", "Object", "resolveVariable", "(", "String", "pName", ",", "Object", "pContext", ")", "throws", "ELException", "{", "PageContext", "ctx", "=", "(", "PageContext", ")", "pContext", ";", "// Check for implicit objects", "if", "(", "\"pageContext\"", ".", "e...
Resolves the specified variable within the given context. Returns null if the variable is not found.
[ "Resolves", "the", "specified", "variable", "within", "the", "given", "context", ".", "Returns", "null", "if", "the", "variable", "is", "not", "found", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/JSTLVariableResolver.java#L38-L92
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/RelativePath.java
RelativePath.getSteps
public List getSteps() { // simply merge our 'step' with our 'next' List l; if (next != null) l = next.getSteps(); else l = new Vector(); l.add(0, step); return l; }
java
public List getSteps() { // simply merge our 'step' with our 'next' List l; if (next != null) l = next.getSteps(); else l = new Vector(); l.add(0, step); return l; }
[ "public", "List", "getSteps", "(", ")", "{", "// simply merge our 'step' with our 'next'", "List", "l", ";", "if", "(", "next", "!=", "null", ")", "l", "=", "next", ".", "getSteps", "(", ")", ";", "else", "l", "=", "new", "Vector", "(", ")", ";", "l", ...
inherit JavaDoc comment
[ "inherit", "JavaDoc", "comment" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/RelativePath.java#L88-L97
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/JaxbKit.java
JaxbKit.marshal
public static String marshal(Object jaxbElement) { StringWriter sw ; try { Marshaller fm = JAXBContext.newInstance(jaxbElement.getClass()).createMarshaller(); fm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); sw = new StringWriter(); fm.marshal(jaxbE...
java
public static String marshal(Object jaxbElement) { StringWriter sw ; try { Marshaller fm = JAXBContext.newInstance(jaxbElement.getClass()).createMarshaller(); fm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); sw = new StringWriter(); fm.marshal(jaxbE...
[ "public", "static", "String", "marshal", "(", "Object", "jaxbElement", ")", "{", "StringWriter", "sw", ";", "try", "{", "Marshaller", "fm", "=", "JAXBContext", ".", "newInstance", "(", "jaxbElement", ".", "getClass", "(", ")", ")", ".", "createMarshaller", "...
object -> string
[ "object", "-", ">", "string" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/JaxbKit.java#L64-L75
train
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java
ScriptFreeTLV.setInitParameters
@Override public void setInitParameters(Map<java.lang.String, java.lang.Object> initParms) { super.setInitParameters(initParms); String declarationsParm = (String) initParms.get("allowDeclarations"); String scriptletsParm = (String) initParms.get("allowScriptlets"); String expression...
java
@Override public void setInitParameters(Map<java.lang.String, java.lang.Object> initParms) { super.setInitParameters(initParms); String declarationsParm = (String) initParms.get("allowDeclarations"); String scriptletsParm = (String) initParms.get("allowScriptlets"); String expression...
[ "@", "Override", "public", "void", "setInitParameters", "(", "Map", "<", "java", ".", "lang", ".", "String", ",", "java", ".", "lang", ".", "Object", ">", "initParms", ")", "{", "super", ".", "setInitParameters", "(", "initParms", ")", ";", "String", "de...
Sets the values of the initialization parameters, as supplied in the TLD. @param initParms a mapping from the names of the initialization parameters to their values, as specified in the TLD.
[ "Sets", "the", "values", "of", "the", "initialization", "parameters", "as", "supplied", "in", "the", "TLD", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java#L68-L80
train
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java
ScriptFreeTLV.validate
@Override public ValidationMessage[] validate(String prefix, String uri, PageData page) { try { MyContentHandler handler = new MyContentHandler(); parser.parse(page, handler); return handler.reportResults(); } catch (ParserConfigurationException e) { r...
java
@Override public ValidationMessage[] validate(String prefix, String uri, PageData page) { try { MyContentHandler handler = new MyContentHandler(); parser.parse(page, handler); return handler.reportResults(); } catch (ParserConfigurationException e) { r...
[ "@", "Override", "public", "ValidationMessage", "[", "]", "validate", "(", "String", "prefix", ",", "String", "uri", ",", "PageData", "page", ")", "{", "try", "{", "MyContentHandler", "handler", "=", "new", "MyContentHandler", "(", ")", ";", "parser", ".", ...
Validates a single JSP page. @param prefix the namespace prefix specified by the page for the custom tag library being validated. @param uri the URI specified by the page for the TLD of the custom tag library being validated. @param page a wrapper around the XML representation of the page being validated. @return...
[ "Validates", "a", "single", "JSP", "page", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java#L94-L107
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/LessThanOrEqualsOperator.java
LessThanOrEqualsOperator.apply
public boolean apply(String pLeft, String pRight, Logger pLogger) { return pLeft.compareTo(pRight) <= 0; }
java
public boolean apply(String pLeft, String pRight, Logger pLogger) { return pLeft.compareTo(pRight) <= 0; }
[ "public", "boolean", "apply", "(", "String", "pLeft", ",", "String", "pRight", ",", "Logger", "pLogger", ")", "{", "return", "pLeft", ".", "compareTo", "(", "pRight", ")", "<=", "0", ";", "}" ]
Applies the operator to the given String values
[ "Applies", "the", "operator", "to", "the", "given", "String", "values" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/LessThanOrEqualsOperator.java#L101-L105
train
audit4j/audit4j-spring
src/main/java/org/audit4j/integration/spring/AuditAspect.java
AuditAspect.audit
@Before("@within(org.audit4j.core.annotation.Audit) || @annotation(org.audit4j.core.annotation.Audit)") public void audit(final JoinPoint jointPoint) throws Throwable { MethodSignature methodSignature = (MethodSignature) jointPoint.getSignature(); Method method = methodSignature.getMethod(); ...
java
@Before("@within(org.audit4j.core.annotation.Audit) || @annotation(org.audit4j.core.annotation.Audit)") public void audit(final JoinPoint jointPoint) throws Throwable { MethodSignature methodSignature = (MethodSignature) jointPoint.getSignature(); Method method = methodSignature.getMethod(); ...
[ "@", "Before", "(", "\"@within(org.audit4j.core.annotation.Audit) || @annotation(org.audit4j.core.annotation.Audit)\"", ")", "public", "void", "audit", "(", "final", "JoinPoint", "jointPoint", ")", "throws", "Throwable", "{", "MethodSignature", "methodSignature", "=", "(", "M...
Audit Aspect. @param jointPoint the joint point @throws Throwable the throwable
[ "Audit", "Aspect", "." ]
52de1e3370608890292a72194df247b50a2d4bed
https://github.com/audit4j/audit4j-spring/blob/52de1e3370608890292a72194df247b50a2d4bed/src/main/java/org/audit4j/integration/spring/AuditAspect.java#L59-L79
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java
ELParser.ValuePrefix
final public Expression ValuePrefix() throws ParseException { Expression ret; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case STRING_LITERAL: case TRUE: case FALSE: case NULL: ret = Literal(); break; case LPAREN: jj_cons...
java
final public Expression ValuePrefix() throws ParseException { Expression ret; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case STRING_LITERAL: case TRUE: case FALSE: case NULL: ret = Literal(); break; case LPAREN: jj_cons...
[ "final", "public", "Expression", "ValuePrefix", "(", ")", "throws", "ParseException", "{", "Expression", "ret", ";", "switch", "(", "(", "jj_ntk", "==", "-", "1", ")", "?", "jj_ntk", "(", ")", ":", "jj_ntk", ")", "{", "case", "INTEGER_LITERAL", ":", "cas...
This is an element that can start a value
[ "This", "is", "an", "element", "that", "can", "start", "a", "value" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java#L674-L708
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.evaluate
public Object evaluate(String pExpressionString, Object pContext, Class pExpectedType, Map functions, String defaultPrefix) throws ELException { return evaluate(pExpressionString, ...
java
public Object evaluate(String pExpressionString, Object pContext, Class pExpectedType, Map functions, String defaultPrefix) throws ELException { return evaluate(pExpressionString, ...
[ "public", "Object", "evaluate", "(", "String", "pExpressionString", ",", "Object", "pContext", ",", "Class", "pExpectedType", ",", "Map", "functions", ",", "String", "defaultPrefix", ")", "throws", "ELException", "{", "return", "evaluate", "(", "pExpressionString", ...
Evaluates the given expression String @param pExpressionString the expression String to be evaluated @param pContext the context passed to the VariableResolver for resolving variable names @param pExpectedType the type to which the evaluated expression should be coerced @return the expression String evalu...
[ "Evaluates", "the", "given", "expression", "String" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L171-L183
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.evaluate
Object evaluate(String pExpressionString, Object pContext, Class pExpectedType, Map functions, String defaultPrefix, Logger pLogger) throws ELException { // Check for null expression strings i...
java
Object evaluate(String pExpressionString, Object pContext, Class pExpectedType, Map functions, String defaultPrefix, Logger pLogger) throws ELException { // Check for null expression strings i...
[ "Object", "evaluate", "(", "String", "pExpressionString", ",", "Object", "pContext", ",", "Class", "pExpectedType", ",", "Map", "functions", ",", "String", "defaultPrefix", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "// Check for null expression stri...
Evaluates the given expression string
[ "Evaluates", "the", "given", "expression", "string" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L190-L242
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.convertToExpectedType
Object convertToExpectedType(Object pValue, Class pExpectedType, Logger pLogger) throws ELException { return Coercions.coerce(pValue, pExpectedType, pLogger); }
java
Object convertToExpectedType(Object pValue, Class pExpectedType, Logger pLogger) throws ELException { return Coercions.coerce(pValue, pExpectedType, pLogger); }
[ "Object", "convertToExpectedType", "(", "Object", "pValue", ",", "Class", "pExpectedType", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "return", "Coercions", ".", "coerce", "(", "pValue", ",", "pExpectedType", ",", "pLogger", ")", ";", "}" ]
Converts the given value to the specified expected type.
[ "Converts", "the", "given", "value", "to", "the", "specified", "expected", "type", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L300-L307
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.convertStaticValueToExpectedType
Object convertStaticValueToExpectedType(String pValue, Class pExpectedType, Logger pLogger) throws ELException { // See if the value is already of the expected type if (pExpectedType == String.class || ...
java
Object convertStaticValueToExpectedType(String pValue, Class pExpectedType, Logger pLogger) throws ELException { // See if the value is already of the expected type if (pExpectedType == String.class || ...
[ "Object", "convertStaticValueToExpectedType", "(", "String", "pValue", ",", "Class", "pExpectedType", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "// See if the value is already of the expected type", "if", "(", "pExpectedType", "==", "String", ".", "clas...
Converts the given String, specified as a static expression string, to the given expected type. The conversion is cached.
[ "Converts", "the", "given", "String", "specified", "as", "a", "static", "expression", "string", "to", "the", "given", "expected", "type", ".", "The", "conversion", "is", "cached", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L315-L336
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.getOrCreateExpectedTypeMap
static Map getOrCreateExpectedTypeMap(Class pExpectedType) { synchronized (sCachedExpectedTypes) { Map ret = (Map) sCachedExpectedTypes.get(pExpectedType); if (ret == null) { ret = Collections.synchronizedMap(new HashMap()); sCachedExpectedTypes.put(pExpec...
java
static Map getOrCreateExpectedTypeMap(Class pExpectedType) { synchronized (sCachedExpectedTypes) { Map ret = (Map) sCachedExpectedTypes.get(pExpectedType); if (ret == null) { ret = Collections.synchronizedMap(new HashMap()); sCachedExpectedTypes.put(pExpec...
[ "static", "Map", "getOrCreateExpectedTypeMap", "(", "Class", "pExpectedType", ")", "{", "synchronized", "(", "sCachedExpectedTypes", ")", "{", "Map", "ret", "=", "(", "Map", ")", "sCachedExpectedTypes", ".", "get", "(", "pExpectedType", ")", ";", "if", "(", "r...
Creates or returns the Map that maps string literals to parsed values for the specified expected type.
[ "Creates", "or", "returns", "the", "Map", "that", "maps", "string", "literals", "to", "parsed", "values", "for", "the", "specified", "expected", "type", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L344-L353
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.createExpressionStringMap
private synchronized void createExpressionStringMap() { if (sCachedExpressionStrings != null) { return; } final int maxSize; if ((pageContext != null) && (pageContext.getServletContext() != null)) { String value = pageContext.getServletContext().getInitParameter(...
java
private synchronized void createExpressionStringMap() { if (sCachedExpressionStrings != null) { return; } final int maxSize; if ((pageContext != null) && (pageContext.getServletContext() != null)) { String value = pageContext.getServletContext().getInitParameter(...
[ "private", "synchronized", "void", "createExpressionStringMap", "(", ")", "{", "if", "(", "sCachedExpressionStrings", "!=", "null", ")", "{", "return", ";", "}", "final", "int", "maxSize", ";", "if", "(", "(", "pageContext", "!=", "null", ")", "&&", "(", "...
Creates LRU map of expression strings. If context parameter specifying cache size is present use that as the maximum size of the LRU map otherwise use default.
[ "Creates", "LRU", "map", "of", "expression", "strings", ".", "If", "context", "parameter", "specifying", "cache", "size", "is", "present", "use", "that", "as", "the", "maximum", "size", "of", "the", "LRU", "map", "otherwise", "use", "default", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L362-L386
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.formatParseException
static String formatParseException(String pExpressionString, ParseException pExc) { // Generate the String of expected tokens StringBuffer expectedBuf = new StringBuffer(); int maxSize = 0; boolean printedOne = false; if (pExc.expectedToken...
java
static String formatParseException(String pExpressionString, ParseException pExc) { // Generate the String of expected tokens StringBuffer expectedBuf = new StringBuffer(); int maxSize = 0; boolean printedOne = false; if (pExc.expectedToken...
[ "static", "String", "formatParseException", "(", "String", "pExpressionString", ",", "ParseException", "pExc", ")", "{", "// Generate the String of expected tokens", "StringBuffer", "expectedBuf", "=", "new", "StringBuffer", "(", ")", ";", "int", "maxSize", "=", "0", ...
Formats a ParseException into an error message suitable for displaying on a web page
[ "Formats", "a", "ParseException", "into", "an", "error", "message", "suitable", "for", "displaying", "on", "a", "web", "page" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L396-L445
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java
ELEvaluator.parseAndRender
public String parseAndRender(String pExpressionString) throws ELException { Object val = parseExpressionString(pExpressionString); if (val instanceof String) { return (String) val; } else if (val instanceof Expression) { return "${" + ((Expression) val).getExp...
java
public String parseAndRender(String pExpressionString) throws ELException { Object val = parseExpressionString(pExpressionString); if (val instanceof String) { return (String) val; } else if (val instanceof Expression) { return "${" + ((Expression) val).getExp...
[ "public", "String", "parseAndRender", "(", "String", "pExpressionString", ")", "throws", "ELException", "{", "Object", "val", "=", "parseExpressionString", "(", "pExpressionString", ")", ";", "if", "(", "val", "instanceof", "String", ")", "{", "return", "(", "St...
Parses the given expression string, then converts it back to a String in its canonical form. This is used to test parsing.
[ "Parses", "the", "given", "expression", "string", "then", "converts", "it", "back", "to", "a", "String", "in", "its", "canonical", "form", ".", "This", "is", "used", "to", "test", "parsing", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ELEvaluator.java#L497-L509
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java
TransformSupport.getSourceFromXmlAttribute
Source getSourceFromXmlAttribute() throws JspTagException, SAXException, ParserConfigurationException { Object xml = this.xml; if (xml == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_XML_IS_NULL")); } // other JSTL XML tags may produce a list if ...
java
Source getSourceFromXmlAttribute() throws JspTagException, SAXException, ParserConfigurationException { Object xml = this.xml; if (xml == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_XML_IS_NULL")); } // other JSTL XML tags may produce a list if ...
[ "Source", "getSourceFromXmlAttribute", "(", ")", "throws", "JspTagException", ",", "SAXException", ",", "ParserConfigurationException", "{", "Object", "xml", "=", "this", ".", "xml", ";", "if", "(", "xml", "==", "null", ")", "{", "throw", "new", "JspTagException...
Return the Source for a document specified in the "doc" or "xml" attribute. @return the document Source @throws JspTagException if there is a problem with the attribute
[ "Return", "the", "Source", "for", "a", "document", "specified", "in", "the", "doc", "or", "xml", "attribute", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java#L201-L234
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java
TransformSupport.getSourceFromBodyContent
Source getSourceFromBodyContent() throws JspTagException, SAXException, ParserConfigurationException { if (bodyContent == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_NULL")); } String s = bodyContent.getString(); if (s == null) { thro...
java
Source getSourceFromBodyContent() throws JspTagException, SAXException, ParserConfigurationException { if (bodyContent == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_NULL")); } String s = bodyContent.getString(); if (s == null) { thro...
[ "Source", "getSourceFromBodyContent", "(", ")", "throws", "JspTagException", ",", "SAXException", ",", "ParserConfigurationException", "{", "if", "(", "bodyContent", "==", "null", ")", "{", "throw", "new", "JspTagException", "(", "Resources", ".", "getMessage", "(",...
Return the Source for a document specified as body content. @return the document Source @throws JspTagException if there is a problem with the body content
[ "Return", "the", "Source", "for", "a", "document", "specified", "as", "body", "content", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java#L242-L255
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java
Evaluator.validate
public String validate(String pAttributeName, String pAttributeValue) { try { sEvaluator.setBypassCache(true); sEvaluator.parseExpressionString(pAttributeValue); sEvaluator.setBypassCache(false); return null; } catch (ELE...
java
public String validate(String pAttributeName, String pAttributeValue) { try { sEvaluator.setBypassCache(true); sEvaluator.parseExpressionString(pAttributeValue); sEvaluator.setBypassCache(false); return null; } catch (ELE...
[ "public", "String", "validate", "(", "String", "pAttributeName", ",", "String", "pAttributeValue", ")", "{", "try", "{", "sEvaluator", ".", "setBypassCache", "(", "true", ")", ";", "sEvaluator", ".", "parseExpressionString", "(", "pAttributeValue", ")", ";", "sE...
Translation time validation of an attribute value. This method will return a null String if the attribute value is valid; otherwise an error message.
[ "Translation", "time", "validation", "of", "an", "attribute", "value", ".", "This", "method", "will", "return", "a", "null", "String", "if", "the", "attribute", "value", "is", "valid", ";", "otherwise", "an", "error", "message", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java#L67-L83
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java
Evaluator.evaluate
public Object evaluate(String pAttributeName, String pAttributeValue, Class pExpectedType, Tag pTag, PageContext pPageContext, Map functions, String defaultPr...
java
public Object evaluate(String pAttributeName, String pAttributeValue, Class pExpectedType, Tag pTag, PageContext pPageContext, Map functions, String defaultPr...
[ "public", "Object", "evaluate", "(", "String", "pAttributeName", ",", "String", "pAttributeValue", ",", "Class", "pExpectedType", ",", "Tag", "pTag", ",", "PageContext", "pPageContext", ",", "Map", "functions", ",", "String", "defaultPrefix", ")", "throws", "JspEx...
Evaluates the expression at request time
[ "Evaluates", "the", "expression", "at", "request", "time" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java#L90-L115
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java
Evaluator.evaluate
public Object evaluate(String pAttributeName, String pAttributeValue, Class pExpectedType, Tag pTag, PageContext pPageContext) throws JspException { return evaluate(pAttributeName, ...
java
public Object evaluate(String pAttributeName, String pAttributeValue, Class pExpectedType, Tag pTag, PageContext pPageContext) throws JspException { return evaluate(pAttributeName, ...
[ "public", "Object", "evaluate", "(", "String", "pAttributeName", ",", "String", "pAttributeValue", ",", "Class", "pExpectedType", ",", "Tag", "pTag", ",", "PageContext", "pPageContext", ")", "throws", "JspException", "{", "return", "evaluate", "(", "pAttributeName",...
Conduit to old-style call for convenience.
[ "Conduit", "to", "old", "-", "style", "call", "for", "convenience", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java#L120-L133
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java
Evaluator.parseAndRender
public static String parseAndRender(String pAttributeValue) throws JspException { try { return sEvaluator.parseAndRender(pAttributeValue); } catch (ELException exc) { throw new JspException (MessageFormat.format ...
java
public static String parseAndRender(String pAttributeValue) throws JspException { try { return sEvaluator.parseAndRender(pAttributeValue); } catch (ELException exc) { throw new JspException (MessageFormat.format ...
[ "public", "static", "String", "parseAndRender", "(", "String", "pAttributeValue", ")", "throws", "JspException", "{", "try", "{", "return", "sEvaluator", ".", "parseAndRender", "(", "pAttributeValue", ")", ";", "}", "catch", "(", "ELException", "exc", ")", "{", ...
Parses the given attribute value, then converts it back to a String in its canonical form.
[ "Parses", "the", "given", "attribute", "value", "then", "converts", "it", "back", "to", "a", "String", "in", "its", "canonical", "form", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/Evaluator.java#L144-L157
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tei/DeclareTEI.java
DeclareTEI.getVariableInfo
@Override public VariableInfo[] getVariableInfo(TagData data) { // construct the relevant VariableInfo object VariableInfo id = new VariableInfo( data.getAttributeString("id"), data.getAttributeString("type") == null ? "java.lang.Object" : data...
java
@Override public VariableInfo[] getVariableInfo(TagData data) { // construct the relevant VariableInfo object VariableInfo id = new VariableInfo( data.getAttributeString("id"), data.getAttributeString("type") == null ? "java.lang.Object" : data...
[ "@", "Override", "public", "VariableInfo", "[", "]", "getVariableInfo", "(", "TagData", "data", ")", "{", "// construct the relevant VariableInfo object", "VariableInfo", "id", "=", "new", "VariableInfo", "(", "data", ".", "getAttributeString", "(", "\"id\"", ")", "...
purposely inherit JavaDoc and semantics from TagExtraInfo
[ "purposely", "inherit", "JavaDoc", "and", "semantics", "from", "TagExtraInfo" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tei/DeclareTEI.java#L37-L47
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/DriverTag.java
DriverTag.setScope
public void setScope(String scopeName) { if ("page".equals(scopeName)) { scope = PageContext.PAGE_SCOPE; } else if ("request".equals(scopeName)) { scope = PageContext.REQUEST_SCOPE; } else if ("session".equals(scopeName)) { scope = PageContext....
java
public void setScope(String scopeName) { if ("page".equals(scopeName)) { scope = PageContext.PAGE_SCOPE; } else if ("request".equals(scopeName)) { scope = PageContext.REQUEST_SCOPE; } else if ("session".equals(scopeName)) { scope = PageContext....
[ "public", "void", "setScope", "(", "String", "scopeName", ")", "{", "if", "(", "\"page\"", ".", "equals", "(", "scopeName", ")", ")", "{", "scope", "=", "PageContext", ".", "PAGE_SCOPE", ";", "}", "else", "if", "(", "\"request\"", ".", "equals", "(", "...
Setter method for the scope of the variable to hold the result.
[ "Setter", "method", "for", "the", "scope", "of", "the", "variable", "to", "hold", "the", "result", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/DriverTag.java#L105-L118
train
audit4j/audit4j-spring
src/main/java/org/audit4j/integration/spring/SpringAudit4jConfig.java
SpringAudit4jConfig.afterPropertiesSet
@Override public void afterPropertiesSet() throws Exception { Configuration configuration = Configuration.INSTANCE; configuration.setLayout(layout); configuration.setHandlers(handlers); configuration.setFilters(filters); configuration.setCommands(commands); configurat...
java
@Override public void afterPropertiesSet() throws Exception { Configuration configuration = Configuration.INSTANCE; configuration.setLayout(layout); configuration.setHandlers(handlers); configuration.setFilters(filters); configuration.setCommands(commands); configurat...
[ "@", "Override", "public", "void", "afterPropertiesSet", "(", ")", "throws", "Exception", "{", "Configuration", "configuration", "=", "Configuration", ".", "INSTANCE", ";", "configuration", ".", "setLayout", "(", "layout", ")", ";", "configuration", ".", "setHandl...
Initialize audit4j when starting spring application context. {@inheritDoc} @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
[ "Initialize", "audit4j", "when", "starting", "spring", "application", "context", "." ]
52de1e3370608890292a72194df247b50a2d4bed
https://github.com/audit4j/audit4j-spring/blob/52de1e3370608890292a72194df247b50a2d4bed/src/main/java/org/audit4j/integration/spring/SpringAudit4jConfig.java#L77-L102
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/EscapeXML.java
EscapeXML.escape
public static String escape(String src) { // first pass to determine the length of the buffer so we only allocate once int length = 0; for (int i = 0; i < src.length(); i++) { char c = src.charAt(i); String escape = getEscape(c); if (escape != null) { ...
java
public static String escape(String src) { // first pass to determine the length of the buffer so we only allocate once int length = 0; for (int i = 0; i < src.length(); i++) { char c = src.charAt(i); String escape = getEscape(c); if (escape != null) { ...
[ "public", "static", "String", "escape", "(", "String", "src", ")", "{", "// first pass to determine the length of the buffer so we only allocate once", "int", "length", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "src", ".", "length", "(", ...
Escape a string. @param src the string to escape; must not be null @return the escaped string
[ "Escape", "a", "string", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/EscapeXML.java#L69-L99
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/EscapeXML.java
EscapeXML.emit
public static void emit(Object src, boolean escapeXml, JspWriter out) throws IOException { if (src instanceof Reader) { emit((Reader) src, escapeXml, out); } else { emit(String.valueOf(src), escapeXml, out); } }
java
public static void emit(Object src, boolean escapeXml, JspWriter out) throws IOException { if (src instanceof Reader) { emit((Reader) src, escapeXml, out); } else { emit(String.valueOf(src), escapeXml, out); } }
[ "public", "static", "void", "emit", "(", "Object", "src", ",", "boolean", "escapeXml", ",", "JspWriter", "out", ")", "throws", "IOException", "{", "if", "(", "src", "instanceof", "Reader", ")", "{", "emit", "(", "(", "Reader", ")", "src", ",", "escapeXml...
Emit the supplied object to the specified writer, escaping characters if needed. @param src the object to write @param escapeXml if true, escape unsafe characters before writing @param out the JspWriter to emit to @throws IOException if there was a problem emitting the content
[ "Emit", "the", "supplied", "object", "to", "the", "specified", "writer", "escaping", "characters", "if", "needed", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/EscapeXML.java#L109-L115
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/EscapeXML.java
EscapeXML.emit
public static void emit(String src, boolean escapeXml, JspWriter out) throws IOException { if (escapeXml) { emit(src, out); } else { out.write(src); } }
java
public static void emit(String src, boolean escapeXml, JspWriter out) throws IOException { if (escapeXml) { emit(src, out); } else { out.write(src); } }
[ "public", "static", "void", "emit", "(", "String", "src", ",", "boolean", "escapeXml", ",", "JspWriter", "out", ")", "throws", "IOException", "{", "if", "(", "escapeXml", ")", "{", "emit", "(", "src", ",", "out", ")", ";", "}", "else", "{", "out", "....
Emit the supplied String to the specified writer, escaping characters if needed. @param src the String to write @param escapeXml if true, escape unsafe characters before writing @param out the JspWriter to emit to @throws IOException if there was a problem emitting the content
[ "Emit", "the", "supplied", "String", "to", "the", "specified", "writer", "escaping", "characters", "if", "needed", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/EscapeXML.java#L125-L131
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/EscapeXML.java
EscapeXML.emit
public static void emit(Reader src, boolean escapeXml, JspWriter out) throws IOException { int bufferSize = out.getBufferSize(); if (bufferSize == 0) { bufferSize = 4096; } char[] buffer = new char[bufferSize]; int count; while ((count = src.read(buffer)) > 0)...
java
public static void emit(Reader src, boolean escapeXml, JspWriter out) throws IOException { int bufferSize = out.getBufferSize(); if (bufferSize == 0) { bufferSize = 4096; } char[] buffer = new char[bufferSize]; int count; while ((count = src.read(buffer)) > 0)...
[ "public", "static", "void", "emit", "(", "Reader", "src", ",", "boolean", "escapeXml", ",", "JspWriter", "out", ")", "throws", "IOException", "{", "int", "bufferSize", "=", "out", ".", "getBufferSize", "(", ")", ";", "if", "(", "bufferSize", "==", "0", "...
Copy the content of a Reader into the specified JSPWriter escaping characters if needed. @param src the Reader to read from @param escapeXml if true, escape characters @param out the JspWriter to emit to @throws IOException if there was a problem emitting the content
[ "Copy", "the", "content", "of", "a", "Reader", "into", "the", "specified", "JSPWriter", "escaping", "characters", "if", "needed", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/EscapeXML.java#L166-L180
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/UpdateTagSupport.java
UpdateTagSupport.addSQLParameter
public void addSQLParameter(Object o) { if (parameters == null) { parameters = new ArrayList(); } parameters.add(o); }
java
public void addSQLParameter(Object o) { if (parameters == null) { parameters = new ArrayList(); } parameters.add(o); }
[ "public", "void", "addSQLParameter", "(", "Object", "o", ")", "{", "if", "(", "parameters", "==", "null", ")", "{", "parameters", "=", "new", "ArrayList", "(", ")", ";", "}", "parameters", ".", "add", "(", "o", ")", ";", "}" ]
Called by nested parameter elements to add PreparedStatement parameter values.
[ "Called", "by", "nested", "parameter", "elements", "to", "add", "PreparedStatement", "parameter", "values", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/UpdateTagSupport.java#L210-L215
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ComplexValue.java
ComplexValue.evaluate
public Object evaluate(Object pContext, VariableResolver pResolver, Map functions, String defaultPrefix, Logger pLogger) throws ELException { Object ret = mPrefix.evaluate(pContext, pResolver,...
java
public Object evaluate(Object pContext, VariableResolver pResolver, Map functions, String defaultPrefix, Logger pLogger) throws ELException { Object ret = mPrefix.evaluate(pContext, pResolver,...
[ "public", "Object", "evaluate", "(", "Object", "pContext", ",", "VariableResolver", "pResolver", ",", "Map", "functions", ",", "String", "defaultPrefix", ",", "Logger", "pLogger", ")", "throws", "ELException", "{", "Object", "ret", "=", "mPrefix", ".", "evaluate...
Evaluates by evaluating the prefix, then applying the suffixes
[ "Evaluates", "by", "evaluating", "the", "prefix", "then", "applying", "the", "suffixes" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ComplexValue.java#L98-L115
train
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/config/JFinalConfigExt.java
JFinalConfigExt.configInterceptor
public void configInterceptor(Interceptors me) { // add excetion interceptor me.add(new ExceptionInterceptor()); if (this.getHttpPostMethod()) { me.add(new POST()); } // config others configMoreInterceptors(me); }
java
public void configInterceptor(Interceptors me) { // add excetion interceptor me.add(new ExceptionInterceptor()); if (this.getHttpPostMethod()) { me.add(new POST()); } // config others configMoreInterceptors(me); }
[ "public", "void", "configInterceptor", "(", "Interceptors", "me", ")", "{", "// add excetion interceptor", "me", ".", "add", "(", "new", "ExceptionInterceptor", "(", ")", ")", ";", "if", "(", "this", ".", "getHttpPostMethod", "(", ")", ")", "{", "me", ".", ...
Config interceptor applied to all actions.
[ "Config", "interceptor", "applied", "to", "all", "actions", "." ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/config/JFinalConfigExt.java#L211-L219
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/ExprSupport.java
ExprSupport.doStartTag
@Override public int doStartTag() throws JspException { try { XPathContext context = XalanUtil.getContext(this, pageContext); String result = select.execute(context, context.getCurrentNode(), null).str(); EscapeXML.emit(result, escapeXml, pageContext.getOut()); retur...
java
@Override public int doStartTag() throws JspException { try { XPathContext context = XalanUtil.getContext(this, pageContext); String result = select.execute(context, context.getCurrentNode(), null).str(); EscapeXML.emit(result, escapeXml, pageContext.getOut()); retur...
[ "@", "Override", "public", "int", "doStartTag", "(", ")", "throws", "JspException", "{", "try", "{", "XPathContext", "context", "=", "XalanUtil", ".", "getContext", "(", "this", ",", "pageContext", ")", ";", "String", "result", "=", "select", ".", "execute",...
applies XPath expression from 'select' and prints the result
[ "applies", "XPath", "expression", "from", "select", "and", "prints", "the", "result" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/ExprSupport.java#L52-L64
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
ImplicitObjects.getImplicitObjects
public static ImplicitObjects getImplicitObjects(PageContext pContext) { ImplicitObjects objs = (ImplicitObjects) pContext.getAttribute(sAttributeName, PageContext.PAGE_SCOPE); if (objs == null) { objs = new Implicit...
java
public static ImplicitObjects getImplicitObjects(PageContext pContext) { ImplicitObjects objs = (ImplicitObjects) pContext.getAttribute(sAttributeName, PageContext.PAGE_SCOPE); if (objs == null) { objs = new Implicit...
[ "public", "static", "ImplicitObjects", "getImplicitObjects", "(", "PageContext", "pContext", ")", "{", "ImplicitObjects", "objs", "=", "(", "ImplicitObjects", ")", "pContext", ".", "getAttribute", "(", "sAttributeName", ",", "PageContext", ".", "PAGE_SCOPE", ")", ";...
Finds the ImplicitObjects associated with the PageContext, creating it if it doesn't yet exist.
[ "Finds", "the", "ImplicitObjects", "associated", "with", "the", "PageContext", "creating", "it", "if", "it", "doesn", "t", "yet", "exist", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java#L92-L105
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
ImplicitObjects.createSessionScopeMap
public static Map createSessionScopeMap(PageContext pContext) { final PageContext context = pContext; return new EnumeratedMap() { public Enumeration enumerateKeys() { return context.getAttributeNamesInScope (PageContext.SESSIO...
java
public static Map createSessionScopeMap(PageContext pContext) { final PageContext context = pContext; return new EnumeratedMap() { public Enumeration enumerateKeys() { return context.getAttributeNamesInScope (PageContext.SESSIO...
[ "public", "static", "Map", "createSessionScopeMap", "(", "PageContext", "pContext", ")", "{", "final", "PageContext", "context", "=", "pContext", ";", "return", "new", "EnumeratedMap", "(", ")", "{", "public", "Enumeration", "enumerateKeys", "(", ")", "{", "retu...
Creates the Map that "wraps" session-scoped attributes
[ "Creates", "the", "Map", "that", "wraps", "session", "-", "scoped", "attributes" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java#L319-L347
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
ImplicitObjects.createParamMap
public static Map createParamMap(PageContext pContext) { final HttpServletRequest request = (HttpServletRequest) pContext.getRequest(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return request.getParameterNames()...
java
public static Map createParamMap(PageContext pContext) { final HttpServletRequest request = (HttpServletRequest) pContext.getRequest(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return request.getParameterNames()...
[ "public", "static", "Map", "createParamMap", "(", "PageContext", "pContext", ")", "{", "final", "HttpServletRequest", "request", "=", "(", "HttpServletRequest", ")", "pContext", ".", "getRequest", "(", ")", ";", "return", "new", "EnumeratedMap", "(", ")", "{", ...
Creates the Map that maps parameter name to single parameter value.
[ "Creates", "the", "Map", "that", "maps", "parameter", "name", "to", "single", "parameter", "value", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java#L390-L415
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
ImplicitObjects.createHeaderMap
public static Map createHeaderMap(PageContext pContext) { final HttpServletRequest request = (HttpServletRequest) pContext.getRequest(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return request.getHeaderNames();...
java
public static Map createHeaderMap(PageContext pContext) { final HttpServletRequest request = (HttpServletRequest) pContext.getRequest(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return request.getHeaderNames();...
[ "public", "static", "Map", "createHeaderMap", "(", "PageContext", "pContext", ")", "{", "final", "HttpServletRequest", "request", "=", "(", "HttpServletRequest", ")", "pContext", ".", "getRequest", "(", ")", ";", "return", "new", "EnumeratedMap", "(", ")", "{", ...
Creates the Map that maps header name to single header value.
[ "Creates", "the", "Map", "that", "maps", "header", "name", "to", "single", "header", "value", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java#L457-L483
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
ImplicitObjects.createHeadersMap
public static Map createHeadersMap(PageContext pContext) { final HttpServletRequest request = (HttpServletRequest) pContext.getRequest(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return request.getHeaderNames()...
java
public static Map createHeadersMap(PageContext pContext) { final HttpServletRequest request = (HttpServletRequest) pContext.getRequest(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return request.getHeaderNames()...
[ "public", "static", "Map", "createHeadersMap", "(", "PageContext", "pContext", ")", "{", "final", "HttpServletRequest", "request", "=", "(", "HttpServletRequest", ")", "pContext", ".", "getRequest", "(", ")", ";", "return", "new", "EnumeratedMap", "(", ")", "{",...
Creates the Map that maps header name to an array of header values.
[ "Creates", "the", "Map", "that", "maps", "header", "name", "to", "an", "array", "of", "header", "values", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java#L491-L526
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
ImplicitObjects.createInitParamMap
public static Map createInitParamMap(PageContext pContext) { final ServletContext context = pContext.getServletContext(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return context.getInitParameterNames(); } ...
java
public static Map createInitParamMap(PageContext pContext) { final ServletContext context = pContext.getServletContext(); return new EnumeratedMap() { public Enumeration enumerateKeys() { return context.getInitParameterNames(); } ...
[ "public", "static", "Map", "createInitParamMap", "(", "PageContext", "pContext", ")", "{", "final", "ServletContext", "context", "=", "pContext", ".", "getServletContext", "(", ")", ";", "return", "new", "EnumeratedMap", "(", ")", "{", "public", "Enumeration", "...
Creates the Map that maps init parameter name to single init parameter value.
[ "Creates", "the", "Map", "that", "maps", "init", "parameter", "name", "to", "single", "init", "parameter", "value", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java#L534-L559
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/SPathTag.java
SPathTag.doStartTag
public int doStartTag() throws JspException { try { SPathFilter s = new SPathFilter(new SPathParser(select).expression()); pageContext.setAttribute(var, s); return SKIP_BODY; } catch (ParseException ex) { throw new JspTagException(ex.toString(), ex); } }
java
public int doStartTag() throws JspException { try { SPathFilter s = new SPathFilter(new SPathParser(select).expression()); pageContext.setAttribute(var, s); return SKIP_BODY; } catch (ParseException ex) { throw new JspTagException(ex.toString(), ex); } }
[ "public", "int", "doStartTag", "(", ")", "throws", "JspException", "{", "try", "{", "SPathFilter", "s", "=", "new", "SPathFilter", "(", "new", "SPathParser", "(", "select", ")", ".", "expression", "(", ")", ")", ";", "pageContext", ".", "setAttribute", "("...
applies XPath expression from 'select' and exposes a filter as 'var'
[ "applies", "XPath", "expression", "from", "select", "and", "exposes", "a", "filter", "as", "var" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/SPathTag.java#L102-L110
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/Step.java
Step.isMatchingName
public boolean isMatchingName(String uri, String localPart) { // check and normalize arguments if (localPart == null) throw new IllegalArgumentException("need non-null localPart"); if (uri != null && uri.equals("")) uri = null; // split name into uri/localPart if we haven't done so already if (this.loca...
java
public boolean isMatchingName(String uri, String localPart) { // check and normalize arguments if (localPart == null) throw new IllegalArgumentException("need non-null localPart"); if (uri != null && uri.equals("")) uri = null; // split name into uri/localPart if we haven't done so already if (this.loca...
[ "public", "boolean", "isMatchingName", "(", "String", "uri", ",", "String", "localPart", ")", "{", "// check and normalize arguments", "if", "(", "localPart", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"need non-null localPart\"", ")", ";", ...
Returns true if the given name matches the Step object's name, taking into account the Step object's wildcards; returns false otherwise.
[ "Returns", "true", "if", "the", "given", "name", "matches", "the", "Step", "object", "s", "name", "taking", "into", "account", "the", "Step", "object", "s", "wildcards", ";", "returns", "false", "otherwise", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/Step.java#L98-L130
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/Step.java
Step.parseStepName
private void parseStepName() { String prefix; int colonIndex = name.indexOf(":"); if (colonIndex == -1) { // no colon, so localpart is simply name (even if it's "*") prefix = null; localPart = name; } else { prefix = name.substring(0, colonIndex); localPart = name.substring(colonIndex + 1)...
java
private void parseStepName() { String prefix; int colonIndex = name.indexOf(":"); if (colonIndex == -1) { // no colon, so localpart is simply name (even if it's "*") prefix = null; localPart = name; } else { prefix = name.substring(0, colonIndex); localPart = name.substring(colonIndex + 1)...
[ "private", "void", "parseStepName", "(", ")", "{", "String", "prefix", ";", "int", "colonIndex", "=", "name", ".", "indexOf", "(", "\":\"", ")", ";", "if", "(", "colonIndex", "==", "-", "1", ")", "{", "// no colon, so localpart is simply name (even if it's \"*\"...
Lazily computes some information about our name.
[ "Lazily", "computes", "some", "information", "about", "our", "name", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/Step.java#L148-L162
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/XalanUtil.java
XalanUtil.getContext
public static XPathContext getContext(Tag child, PageContext pageContext) { // if within a forEach tag, use its context ForEachTag forEachTag = (ForEachTag) TagSupport.findAncestorWithClass(child, ForEachTag.class); if (forEachTag != null) { return forEachTag.getContext(); } ...
java
public static XPathContext getContext(Tag child, PageContext pageContext) { // if within a forEach tag, use its context ForEachTag forEachTag = (ForEachTag) TagSupport.findAncestorWithClass(child, ForEachTag.class); if (forEachTag != null) { return forEachTag.getContext(); } ...
[ "public", "static", "XPathContext", "getContext", "(", "Tag", "child", ",", "PageContext", "pageContext", ")", "{", "// if within a forEach tag, use its context", "ForEachTag", "forEachTag", "=", "(", "ForEachTag", ")", "TagSupport", ".", "findAncestorWithClass", "(", "...
Return the XPathContext to be used for evaluating expressions. If the child is nested withing a forEach tag its iteration context is used. Otherwise, a new context is created based on an empty Document. @param child the tag whose context should be returned @param pageContext the current page context @return the XPath...
[ "Return", "the", "XPathContext", "to", "be", "used", "for", "evaluating", "expressions", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/XalanUtil.java#L47-L61
train
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/XalanUtil.java
XalanUtil.coerceToJava
static Object coerceToJava(XObject xo) throws TransformerException { if (xo instanceof XBoolean) { return xo.bool(); } else if (xo instanceof XNumber) { return xo.num(); } else if (xo instanceof XString) { return xo.str(); } else if (xo instanceof XNod...
java
static Object coerceToJava(XObject xo) throws TransformerException { if (xo instanceof XBoolean) { return xo.bool(); } else if (xo instanceof XNumber) { return xo.num(); } else if (xo instanceof XString) { return xo.str(); } else if (xo instanceof XNod...
[ "static", "Object", "coerceToJava", "(", "XObject", "xo", ")", "throws", "TransformerException", "{", "if", "(", "xo", "instanceof", "XBoolean", ")", "{", "return", "xo", ".", "bool", "(", ")", ";", "}", "else", "if", "(", "xo", "instanceof", "XNumber", ...
Return the Java value corresponding to an XPath result. @param xo the XPath type @return the corresponding Java value per the JSTL mapping rules @throws TransformerException if there was a problem converting the type
[ "Return", "the", "Java", "value", "corresponding", "to", "an", "XPath", "result", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/XalanUtil.java#L70-L89
train
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java
LoopTagSupport.doStartTag
@Override public int doStartTag() throws JspException { if (end != -1 && begin > end) { // JSTL 1.1. We simply do not execute the loop. return SKIP_BODY; } // we're beginning a new iteration, so reset our counts (etc.) index = 0; count = 1; la...
java
@Override public int doStartTag() throws JspException { if (end != -1 && begin > end) { // JSTL 1.1. We simply do not execute the loop. return SKIP_BODY; } // we're beginning a new iteration, so reset our counts (etc.) index = 0; count = 1; la...
[ "@", "Override", "public", "int", "doStartTag", "(", ")", "throws", "JspException", "{", "if", "(", "end", "!=", "-", "1", "&&", "begin", ">", "end", ")", "{", "// JSTL 1.1. We simply do not execute the loop.", "return", "SKIP_BODY", ";", "}", "// we're beginnin...
Begins iterating by processing the first item.
[ "Begins", "iterating", "by", "processing", "the", "first", "item", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/core/LoopTagSupport.java#L228-L265
train