id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
42,200
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/AbstractCommandExtension.java
AbstractCommandExtension.analyzeParameters
protected void analyzeParameters(final T descriptor, final DescriptorContext context) { final CommandParamsContext paramsContext = new CommandParamsContext(context); spiService.process(descriptor, paramsContext); }
java
protected void analyzeParameters(final T descriptor, final DescriptorContext context) { final CommandParamsContext paramsContext = new CommandParamsContext(context); spiService.process(descriptor, paramsContext); }
[ "protected", "void", "analyzeParameters", "(", "final", "T", "descriptor", ",", "final", "DescriptorContext", "context", ")", "{", "final", "CommandParamsContext", "paramsContext", "=", "new", "CommandParamsContext", "(", "context", ")", ";", "spiService", ".", "pro...
Analyze method parameters, search for extensions and prepare parameters context. @param descriptor repository method descriptor @param context repository method context
[ "Analyze", "method", "parameters", "search", "for", "extensions", "and", "prepare", "parameters", "context", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/AbstractCommandExtension.java#L60-L63
42,201
caduandrade/japura-gui
src/main/java/org/japura/gui/WrapLabel.java
WrapLabel.wrapText
private void wrapText() { if (getFont() == null || text == null) { return; } FontMetrics fm = getFontMetrics(getFont()); StringBuilder tempText = new StringBuilder(); StringBuilder finalText = new StringBuilder("<html>"); finalText.append("<STYLE type='text/css'>BODY { text-align: "); finalText.append(align....
java
private void wrapText() { if (getFont() == null || text == null) { return; } FontMetrics fm = getFontMetrics(getFont()); StringBuilder tempText = new StringBuilder(); StringBuilder finalText = new StringBuilder("<html>"); finalText.append("<STYLE type='text/css'>BODY { text-align: "); finalText.append(align....
[ "private", "void", "wrapText", "(", ")", "{", "if", "(", "getFont", "(", ")", "==", "null", "||", "text", "==", "null", ")", "{", "return", ";", "}", "FontMetrics", "fm", "=", "getFontMetrics", "(", "getFont", "(", ")", ")", ";", "StringBuilder", "te...
The plain text is converted to HTML code. The wrap locations are calculated with the defined wrap width and component width.
[ "The", "plain", "text", "is", "converted", "to", "HTML", "code", ".", "The", "wrap", "locations", "are", "calculated", "with", "the", "defined", "wrap", "width", "and", "component", "width", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/WrapLabel.java#L83-L146
42,202
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/IndexValidationSupport.java
IndexValidationSupport.checkFieldsCompatible
public void checkFieldsCompatible(final String... fields) { final Set<String> indexFields = Sets.newHashSet(index.getDefinition().getFields()); final Joiner joiner = Joiner.on(","); check(indexFields.equals(Sets.newHashSet(fields)), "Existing index '%s' (class '%s') fields '%s' a...
java
public void checkFieldsCompatible(final String... fields) { final Set<String> indexFields = Sets.newHashSet(index.getDefinition().getFields()); final Joiner joiner = Joiner.on(","); check(indexFields.equals(Sets.newHashSet(fields)), "Existing index '%s' (class '%s') fields '%s' a...
[ "public", "void", "checkFieldsCompatible", "(", "final", "String", "...", "fields", ")", "{", "final", "Set", "<", "String", ">", "indexFields", "=", "Sets", ".", "newHashSet", "(", "index", ".", "getDefinition", "(", ")", ".", "getFields", "(", ")", ")", ...
Checks if existing index consists of exactly the same fields. If not, error thrown to indicate probable programmer error. @param fields new signature index fields
[ "Checks", "if", "existing", "index", "consists", "of", "exactly", "the", "same", "fields", ".", "If", "not", "error", "thrown", "to", "indicate", "probable", "programmer", "error", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/IndexValidationSupport.java#L75-L81
42,203
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/IndexValidationSupport.java
IndexValidationSupport.dropIndex
public void dropIndex(final ODatabaseObject db) { final String name = index.getName(); logger.info("Dropping existing index '{}' (class '{}'), because of definition mismatch", name, index.getDefinition().getClassName()); SchemeUtils.dropIndex(db, name); }
java
public void dropIndex(final ODatabaseObject db) { final String name = index.getName(); logger.info("Dropping existing index '{}' (class '{}'), because of definition mismatch", name, index.getDefinition().getClassName()); SchemeUtils.dropIndex(db, name); }
[ "public", "void", "dropIndex", "(", "final", "ODatabaseObject", "db", ")", "{", "final", "String", "name", "=", "index", ".", "getName", "(", ")", ";", "logger", ".", "info", "(", "\"Dropping existing index '{}' (class '{}'), because of definition mismatch\"", ",", ...
Drops index. @param db database object
[ "Drops", "index", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/IndexValidationSupport.java#L88-L93
42,204
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/IndexValidationSupport.java
IndexValidationSupport.isIndexSigns
@SuppressWarnings("PMD.LinguisticNaming") public IndexMatchVerifier isIndexSigns(final Object... signs) { final List<Object> idxsigns = Lists.newArrayList(); idxsigns.add(index.getType()); idxsigns.addAll(Arrays.asList(signs)); return new IndexMatchVerifier(idxsigns); }
java
@SuppressWarnings("PMD.LinguisticNaming") public IndexMatchVerifier isIndexSigns(final Object... signs) { final List<Object> idxsigns = Lists.newArrayList(); idxsigns.add(index.getType()); idxsigns.addAll(Arrays.asList(signs)); return new IndexMatchVerifier(idxsigns); }
[ "@", "SuppressWarnings", "(", "\"PMD.LinguisticNaming\"", ")", "public", "IndexMatchVerifier", "isIndexSigns", "(", "final", "Object", "...", "signs", ")", "{", "final", "List", "<", "Object", ">", "idxsigns", "=", "Lists", ".", "newArrayList", "(", ")", ";", ...
Compares current index configuration with new signature. Used to decide if index should be dropped and re-created or its completely equal to new signature. @param signs original index signs to compare @return matcher object to specify new signature signs (order is important!)
[ "Compares", "current", "index", "configuration", "with", "new", "signature", ".", "Used", "to", "decide", "if", "index", "should", "be", "dropped", "and", "re", "-", "created", "or", "its", "completely", "equal", "to", "new", "signature", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/IndexValidationSupport.java#L102-L108
42,205
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.getInputKeyCobolContext
public static Class<? extends CobolContext> getInputKeyCobolContext(Configuration conf) { return conf.getClass(CONF_INPUT_KEY_COBOL_CONTEXT, null, CobolContext.class); }
java
public static Class<? extends CobolContext> getInputKeyCobolContext(Configuration conf) { return conf.getClass(CONF_INPUT_KEY_COBOL_CONTEXT, null, CobolContext.class); }
[ "public", "static", "Class", "<", "?", "extends", "CobolContext", ">", "getInputKeyCobolContext", "(", "Configuration", "conf", ")", "{", "return", "conf", ".", "getClass", "(", "CONF_INPUT_KEY_COBOL_CONTEXT", ",", "null", ",", "CobolContext", ".", "class", ")", ...
Gets the job input key mainframe COBOL parameters. @param conf The job configuration. @return The job input key mainframe COBOL parameters, or null if not set.
[ "Gets", "the", "job", "input", "key", "mainframe", "COBOL", "parameters", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L50-L52
42,206
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.setInputKeyRecordType
public static void setInputKeyRecordType(Job job, Class<? extends CobolComplexType> cobolType) { job.getConfiguration().setClass(CONF_INPUT_KEY_RECORD_TYPE, cobolType, CobolComplexType.class); }
java
public static void setInputKeyRecordType(Job job, Class<? extends CobolComplexType> cobolType) { job.getConfiguration().setClass(CONF_INPUT_KEY_RECORD_TYPE, cobolType, CobolComplexType.class); }
[ "public", "static", "void", "setInputKeyRecordType", "(", "Job", "job", ",", "Class", "<", "?", "extends", "CobolComplexType", ">", "cobolType", ")", "{", "job", ".", "getConfiguration", "(", ")", ".", "setClass", "(", "CONF_INPUT_KEY_RECORD_TYPE", ",", "cobolTy...
Sets the job input key mainframe record type. @param job The job to configure. @param cobolType The input key mainframe record type.
[ "Sets", "the", "job", "input", "key", "mainframe", "record", "type", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L60-L62
42,207
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.getInputKeyRecordType
public static Class<? extends CobolComplexType> getInputKeyRecordType(Configuration conf) { return conf.getClass(CONF_INPUT_KEY_RECORD_TYPE, null, CobolComplexType.class); }
java
public static Class<? extends CobolComplexType> getInputKeyRecordType(Configuration conf) { return conf.getClass(CONF_INPUT_KEY_RECORD_TYPE, null, CobolComplexType.class); }
[ "public", "static", "Class", "<", "?", "extends", "CobolComplexType", ">", "getInputKeyRecordType", "(", "Configuration", "conf", ")", "{", "return", "conf", ".", "getClass", "(", "CONF_INPUT_KEY_RECORD_TYPE", ",", "null", ",", "CobolComplexType", ".", "class", ")...
Gets the job input key mainframe record type. @param conf The job configuration. @return The job input key mainframe record type, or null if not set.
[ "Gets", "the", "job", "input", "key", "mainframe", "record", "type", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L70-L72
42,208
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.setInputRecordMatcher
public static void setInputRecordMatcher(Job job, Class<? extends CobolTypeFinder> matcherClass) { job.getConfiguration().setClass(CONF_INPUT_RECORD_MATCHER_CLASS, matcherClass, CobolTypeFinder.class); }
java
public static void setInputRecordMatcher(Job job, Class<? extends CobolTypeFinder> matcherClass) { job.getConfiguration().setClass(CONF_INPUT_RECORD_MATCHER_CLASS, matcherClass, CobolTypeFinder.class); }
[ "public", "static", "void", "setInputRecordMatcher", "(", "Job", "job", ",", "Class", "<", "?", "extends", "CobolTypeFinder", ">", "matcherClass", ")", "{", "job", ".", "getConfiguration", "(", ")", ".", "setClass", "(", "CONF_INPUT_RECORD_MATCHER_CLASS", ",", "...
Sets the job input record matcher class. @param job The job to configure. @param matcherClass The input record matcher class.
[ "Sets", "the", "job", "input", "record", "matcher", "class", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L80-L82
42,209
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.getInputRecordMatcher
public static Class<? extends CobolTypeFinder> getInputRecordMatcher(Configuration conf) { return conf.getClass(CONF_INPUT_RECORD_MATCHER_CLASS, null, CobolTypeFinder.class); }
java
public static Class<? extends CobolTypeFinder> getInputRecordMatcher(Configuration conf) { return conf.getClass(CONF_INPUT_RECORD_MATCHER_CLASS, null, CobolTypeFinder.class); }
[ "public", "static", "Class", "<", "?", "extends", "CobolTypeFinder", ">", "getInputRecordMatcher", "(", "Configuration", "conf", ")", "{", "return", "conf", ".", "getClass", "(", "CONF_INPUT_RECORD_MATCHER_CLASS", ",", "null", ",", "CobolTypeFinder", ".", "class", ...
Gets the job input record matcher class. @param conf The job configuration. @return The job input record matcher class, or null if not set.
[ "Gets", "the", "job", "input", "record", "matcher", "class", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L90-L92
42,210
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.setInputChoiceStrategy
public static void setInputChoiceStrategy(Job job, Class<? extends FromCobolChoiceStrategy> choiceStrategyClass) { job.getConfiguration().setClass(CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS, choiceStrategyClass, FromCobolChoiceStrategy.class); }
java
public static void setInputChoiceStrategy(Job job, Class<? extends FromCobolChoiceStrategy> choiceStrategyClass) { job.getConfiguration().setClass(CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS, choiceStrategyClass, FromCobolChoiceStrategy.class); }
[ "public", "static", "void", "setInputChoiceStrategy", "(", "Job", "job", ",", "Class", "<", "?", "extends", "FromCobolChoiceStrategy", ">", "choiceStrategyClass", ")", "{", "job", ".", "getConfiguration", "(", ")", ".", "setClass", "(", "CONF_INPUT_RECORD_CHOICE_STR...
Sets the job input record choice strategy class. @param job The job to configure. @param choiceStrategyClass The input record choice strategy class.
[ "Sets", "the", "job", "input", "record", "choice", "strategy", "class", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L100-L102
42,211
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.getInputChoiceStrategy
public static Class<? extends FromCobolChoiceStrategy> getInputChoiceStrategy(Configuration conf) { return conf.getClass(CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS, null, FromCobolChoiceStrategy.class); }
java
public static Class<? extends FromCobolChoiceStrategy> getInputChoiceStrategy(Configuration conf) { return conf.getClass(CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS, null, FromCobolChoiceStrategy.class); }
[ "public", "static", "Class", "<", "?", "extends", "FromCobolChoiceStrategy", ">", "getInputChoiceStrategy", "(", "Configuration", "conf", ")", "{", "return", "conf", ".", "getClass", "(", "CONF_INPUT_RECORD_CHOICE_STRATEGY_CLASS", ",", "null", ",", "FromCobolChoiceStrat...
Gets the job input record choice strategy class. @param conf The job configuration. @return The job input record choice strategy class, or null if not set.
[ "Gets", "the", "job", "input", "record", "choice", "strategy", "class", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L110-L112
42,212
legsem/legstar.avro
legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/AbstractZosDatumReader.java
AbstractZosDatumReader.readFully
public int readFully(byte b[], int off, int len) throws IOException { IOUtils.readFully(inStream, b, off, len); return len; }
java
public int readFully(byte b[], int off, int len) throws IOException { IOUtils.readFully(inStream, b, off, len); return len; }
[ "public", "int", "readFully", "(", "byte", "b", "[", "]", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "IOUtils", ".", "readFully", "(", "inStream", ",", "b", ",", "off", ",", "len", ")", ";", "return", "len", ";", "}" ]
Read a number of bytes from the input stream, blocking until all requested bytes are read or end of file is reached. @param b the buffer to bill @param off offset in buffer where to start filling @param len how many bytes we should read @return the total number of bytes read @throws IOException if end of file reached ...
[ "Read", "a", "number", "of", "bytes", "from", "the", "input", "stream", "blocking", "until", "all", "requested", "bytes", "are", "read", "or", "end", "of", "file", "is", "reached", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/AbstractZosDatumReader.java#L255-L258
42,213
legsem/legstar.avro
legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/AbstractZosDatumReader.java
AbstractZosDatumReader.read
public int read(byte b[], int off, int len) throws IOException { return IOUtils.read(inStream, b, off, len); }
java
public int read(byte b[], int off, int len) throws IOException { return IOUtils.read(inStream, b, off, len); }
[ "public", "int", "read", "(", "byte", "b", "[", "]", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "return", "IOUtils", ".", "read", "(", "inStream", ",", "b", ",", "off", ",", "len", ")", ";", "}" ]
Same as above but does not throw an exception at end of file, just returns the actual data read. @param b the buffer to bill @param off offset in buffer where to start filling @param len how many bytes we should read @return the total number of bytes read @throws IOException if a read error occurs
[ "Same", "as", "above", "but", "does", "not", "throw", "an", "exception", "at", "end", "of", "file", "just", "returns", "the", "actual", "data", "read", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/AbstractZosDatumReader.java#L270-L272
42,214
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java
CommandParamsContext.addNamedParam
public void addNamedParam(final String name, final ParamInfo paramInfo) { check(!named.containsKey(name), "Duplicate parameter %s declaration at position %s", name, paramInfo.position); named.put(name, paramInfo); }
java
public void addNamedParam(final String name, final ParamInfo paramInfo) { check(!named.containsKey(name), "Duplicate parameter %s declaration at position %s", name, paramInfo.position); named.put(name, paramInfo); }
[ "public", "void", "addNamedParam", "(", "final", "String", "name", ",", "final", "ParamInfo", "paramInfo", ")", "{", "check", "(", "!", "named", ".", "containsKey", "(", "name", ")", ",", "\"Duplicate parameter %s declaration at position %s\"", ",", "name", ",", ...
Register parameter as named. @param name parameter name @param paramInfo parameter object
[ "Register", "parameter", "as", "named", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java#L48-L52
42,215
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java
CommandParamsContext.addStaticElVarValue
public void addStaticElVarValue(final String name, final String value) { check(!staticElValues.containsKey(name), "Duplicate el variable %s value declaration: %s (original: %s)", name, value, staticElValues.get(name)); check(!dynamicElValues.contains(name), ...
java
public void addStaticElVarValue(final String name, final String value) { check(!staticElValues.containsKey(name), "Duplicate el variable %s value declaration: %s (original: %s)", name, value, staticElValues.get(name)); check(!dynamicElValues.contains(name), ...
[ "public", "void", "addStaticElVarValue", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "check", "(", "!", "staticElValues", ".", "containsKey", "(", "name", ")", ",", "\"Duplicate el variable %s value declaration: %s (original: %s)\"", ","...
Register static query el variable value. @param name variable name @param value variable value
[ "Register", "static", "query", "el", "variable", "value", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java#L60-L68
42,216
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java
CommandParamsContext.addDynamicElVarValue
public void addDynamicElVarValue(final String name) { check(!dynamicElValues.contains(name), "Duplicate dynamic el variable %s declaration", name); check(!staticElValues.containsKey(name), "El variable %s can't be registered as dynamic, because static declaration already ...
java
public void addDynamicElVarValue(final String name) { check(!dynamicElValues.contains(name), "Duplicate dynamic el variable %s declaration", name); check(!staticElValues.containsKey(name), "El variable %s can't be registered as dynamic, because static declaration already ...
[ "public", "void", "addDynamicElVarValue", "(", "final", "String", "name", ")", "{", "check", "(", "!", "dynamicElValues", ".", "contains", "(", "name", ")", ",", "\"Duplicate dynamic el variable %s declaration\"", ",", "name", ")", ";", "check", "(", "!", "stati...
Register dynamic query el variable value. Variable will be completely handled by extension. Registration is required to validated not handled variables. @param name variable name
[ "Register", "dynamic", "query", "el", "variable", "value", ".", "Variable", "will", "be", "completely", "handled", "by", "extension", ".", "Registration", "is", "required", "to", "validated", "not", "handled", "variables", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/param/CommandParamsContext.java#L76-L83
42,217
legsem/legstar.avro
legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java
Cob2AvroGenerator.generateXmlSchema
private String generateXmlSchema(Reader cobolReader, String targetNamespace, String targetXmlSchemaName, final String xsltFileName) { log.debug("XML schema {} generation started", targetXmlSchemaName + XSD_FILE_EXTENSION); String xmlSchemaSource = cob2xsd.transla...
java
private String generateXmlSchema(Reader cobolReader, String targetNamespace, String targetXmlSchemaName, final String xsltFileName) { log.debug("XML schema {} generation started", targetXmlSchemaName + XSD_FILE_EXTENSION); String xmlSchemaSource = cob2xsd.transla...
[ "private", "String", "generateXmlSchema", "(", "Reader", "cobolReader", ",", "String", "targetNamespace", ",", "String", "targetXmlSchemaName", ",", "final", "String", "xsltFileName", ")", "{", "log", ".", "debug", "(", "\"XML schema {} generation started\"", ",", "ta...
Translate the COBOL copybook to XML Schema. @param cobolReader the input COBOL copybook (as a reader) @param targetNamespace the target XML schema namespace @param targetXmlSchemaName the target XML schema name @param xsltFileName an optional XSLT to apply on the XML schema @return the XML schema source
[ "Translate", "the", "COBOL", "copybook", "to", "XML", "Schema", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java#L172-L188
42,218
legsem/legstar.avro
legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java
Cob2AvroGenerator.generateConverterClasses
private Map < String, String > generateConverterClasses( String xmlSchemaSource, String targetPackageName) { log.debug("Converter support classes generation started"); Map < String, String > codeMap = xsd2CobolTypes.generate( new StringReader(xmlSchemaSource), targetPackageN...
java
private Map < String, String > generateConverterClasses( String xmlSchemaSource, String targetPackageName) { log.debug("Converter support classes generation started"); Map < String, String > codeMap = xsd2CobolTypes.generate( new StringReader(xmlSchemaSource), targetPackageN...
[ "private", "Map", "<", "String", ",", "String", ">", "generateConverterClasses", "(", "String", "xmlSchemaSource", ",", "String", "targetPackageName", ")", "{", "log", ".", "debug", "(", "\"Converter support classes generation started\"", ")", ";", "Map", "<", "Stri...
Produce the LegStar converter support classes. @param xmlSchemaSource the XML schema source @param targetPackageName the target Avro package name @return a map of lass names associated with their code
[ "Produce", "the", "LegStar", "converter", "support", "classes", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java#L197-L212
42,219
legsem/legstar.avro
legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java
Cob2AvroGenerator.generateAvroSchema
private String generateAvroSchema(String xmlSchemaSource, String targetPackageName, String targetAvroSchemaName) throws IOException { log.debug("Avro schema {} generation started", targetAvroSchemaName + AVSC_FILE_EXTENSION); String avroSchemaSource = cob2AvroTra...
java
private String generateAvroSchema(String xmlSchemaSource, String targetPackageName, String targetAvroSchemaName) throws IOException { log.debug("Avro schema {} generation started", targetAvroSchemaName + AVSC_FILE_EXTENSION); String avroSchemaSource = cob2AvroTra...
[ "private", "String", "generateAvroSchema", "(", "String", "xmlSchemaSource", ",", "String", "targetPackageName", ",", "String", "targetAvroSchemaName", ")", "throws", "IOException", "{", "log", ".", "debug", "(", "\"Avro schema {} generation started\"", ",", "targetAvroSc...
Produce the avro schema. @param xmlSchemaSource the XML schema source @param targetPackageName the target Avro package name @param targetAvroSchemaName the target Avro schema name @return the generated Avro schema @throws IOException if serialization fails
[ "Produce", "the", "avro", "schema", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java#L232-L248
42,220
legsem/legstar.avro
legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java
Cob2AvroGenerator.avroCompile
private void avroCompile(String avroSchemaSource, File avroSchemaFile, File javaTargetFolder) throws IOException { log.debug("Avro compiler started for: {}", avroSchemaFile); Schema.Parser parser = new Schema.Parser(); Schema schema = parser.parse(avroSchemaSource); Specifi...
java
private void avroCompile(String avroSchemaSource, File avroSchemaFile, File javaTargetFolder) throws IOException { log.debug("Avro compiler started for: {}", avroSchemaFile); Schema.Parser parser = new Schema.Parser(); Schema schema = parser.parse(avroSchemaSource); Specifi...
[ "private", "void", "avroCompile", "(", "String", "avroSchemaSource", ",", "File", "avroSchemaFile", ",", "File", "javaTargetFolder", ")", "throws", "IOException", "{", "log", ".", "debug", "(", "\"Avro compiler started for: {}\"", ",", "avroSchemaFile", ")", ";", "S...
Given an Avro schema produce java specific classes. @param avroSchemaFile the Avro schema file (used by avro for timestamp checking) @param avroSchemaSource the Avro schema source @param javaTargetFolder the target folder for java classes @throws IOException if compilation fails
[ "Given", "an", "Avro", "schema", "produce", "java", "specific", "classes", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java#L259-L271
42,221
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/AnnotationTxConfigBuilder.java
AnnotationTxConfigBuilder.buildConfig
public static TxConfig buildConfig(final Class<?> type, final Method method, final boolean useDefaults) { final Transactional transactional = findAnnotation(type, method, Transactional.class, useDefaults); TxConfig res = null; if (transactional != null) { final TxType txType = findAn...
java
public static TxConfig buildConfig(final Class<?> type, final Method method, final boolean useDefaults) { final Transactional transactional = findAnnotation(type, method, Transactional.class, useDefaults); TxConfig res = null; if (transactional != null) { final TxType txType = findAn...
[ "public", "static", "TxConfig", "buildConfig", "(", "final", "Class", "<", "?", ">", "type", ",", "final", "Method", "method", ",", "final", "boolean", "useDefaults", ")", "{", "final", "Transactional", "transactional", "=", "findAnnotation", "(", "type", ",",...
Build transaction config for type. @param type type to analyze @param method method to analyze @param useDefaults true to build default config if annotation not found @return tx config for found annotation, null if useDefaults false and default config otherwise
[ "Build", "transaction", "config", "for", "type", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/AnnotationTxConfigBuilder.java#L33-L42
42,222
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/AnnotationTxConfigBuilder.java
AnnotationTxConfigBuilder.wrapExceptions
private static List<Class<? extends Exception>> wrapExceptions(final Class<? extends Exception>... list) { return list.length == 0 ? null : Arrays.asList(list); }
java
private static List<Class<? extends Exception>> wrapExceptions(final Class<? extends Exception>... list) { return list.length == 0 ? null : Arrays.asList(list); }
[ "private", "static", "List", "<", "Class", "<", "?", "extends", "Exception", ">", ">", "wrapExceptions", "(", "final", "Class", "<", "?", "extends", "Exception", ">", "...", "list", ")", "{", "return", "list", ".", "length", "==", "0", "?", "null", ":"...
Avoid creation of empty list. @param list array of exceptions @return converted list or null if array os empty
[ "Avoid", "creation", "of", "empty", "list", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/AnnotationTxConfigBuilder.java#L67-L69
42,223
caduandrade/japura-gui
src/main/java/org/japura/gui/TitleBar.java
TitleBar.setTitleGaps
public void setTitleGaps(int gapBetweenIconAndTitle, int gapBetweenTitleAndComponents, int gapBetweenComponents) { gapBetweenIconAndTitle = Math.max(gapBetweenIconAndTitle, 0); gapBetweenTitleAndComponents = Math.max(gapBetweenTitleAndComponents, 0); gapBetweenComponents = Math.max(gapBetweenComponents,...
java
public void setTitleGaps(int gapBetweenIconAndTitle, int gapBetweenTitleAndComponents, int gapBetweenComponents) { gapBetweenIconAndTitle = Math.max(gapBetweenIconAndTitle, 0); gapBetweenTitleAndComponents = Math.max(gapBetweenTitleAndComponents, 0); gapBetweenComponents = Math.max(gapBetweenComponents,...
[ "public", "void", "setTitleGaps", "(", "int", "gapBetweenIconAndTitle", ",", "int", "gapBetweenTitleAndComponents", ",", "int", "gapBetweenComponents", ")", "{", "gapBetweenIconAndTitle", "=", "Math", ".", "max", "(", "gapBetweenIconAndTitle", ",", "0", ")", ";", "g...
Defines the title gaps @param gapBetweenIconAndTitle gap between the icon and title @param gapBetweenTitleAndComponents gap between the title and title components @param gapBetweenComponents gap between title components
[ "Defines", "the", "title", "gaps" ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/TitleBar.java#L139-L145
42,224
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/MethodExecutionException.java
MethodExecutionException.checkExec
public static void checkExec(final boolean condition, final String message, final Object... args) { if (!condition) { throw new MethodExecutionException(String.format(message, args)); } }
java
public static void checkExec(final boolean condition, final String message, final Object... args) { if (!condition) { throw new MethodExecutionException(String.format(message, args)); } }
[ "public", "static", "void", "checkExec", "(", "final", "boolean", "condition", ",", "final", "String", "message", ",", "final", "Object", "...", "args", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "MethodExecutionException", "(", "String...
Shortcut to check and throw execution exception. @param condition condition to validate @param message fail message @param args fail message arguments
[ "Shortcut", "to", "check", "and", "throw", "execution", "exception", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/MethodExecutionException.java#L28-L32
42,225
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElUtils.java
ElUtils.findVars
public static List<String> findVars(final String str) { final List<String> vars = new ArrayList<String>(); final char[] strArray = str.toCharArray(); int i = 0; while (i < strArray.length - 1) { if (strArray[i] == VAR_START && strArray[i + 1] == VAR_LEFT_BOUND) { ...
java
public static List<String> findVars(final String str) { final List<String> vars = new ArrayList<String>(); final char[] strArray = str.toCharArray(); int i = 0; while (i < strArray.length - 1) { if (strArray[i] == VAR_START && strArray[i + 1] == VAR_LEFT_BOUND) { ...
[ "public", "static", "List", "<", "String", ">", "findVars", "(", "final", "String", "str", ")", "{", "final", "List", "<", "String", ">", "vars", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "final", "char", "[", "]", "strArray", "=", ...
Analyze string for variables. @param str string to analyze @return found variable names
[ "Analyze", "string", "for", "variables", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElUtils.java#L33-L53
42,226
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElUtils.java
ElUtils.replace
public static String replace(final String str, final Map<String, String> params) { final StringBuilder sb = new StringBuilder(str.length()); final char[] strArray = str.toCharArray(); int i = 0; while (i < strArray.length - 1) { if (strArray[i] == VAR_START && strArray[i + 1]...
java
public static String replace(final String str, final Map<String, String> params) { final StringBuilder sb = new StringBuilder(str.length()); final char[] strArray = str.toCharArray(); int i = 0; while (i < strArray.length - 1) { if (strArray[i] == VAR_START && strArray[i + 1]...
[ "public", "static", "String", "replace", "(", "final", "String", "str", ",", "final", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "str", ".", "length", "(", ")", ")", "...
Replace placeholders in string. @param str string to replace placeholders @param params placeholder values map @return string with replaced placeholders @throws java.lang.IllegalStateException if string placeholder value is null or not provided
[ "Replace", "placeholders", "in", "string", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElUtils.java#L63-L88
42,227
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElUtils.java
ElUtils.validate
public static void validate(final String string, final List<String> params) { final List<String> vars = findVars(string); for (String param : params) { Preconditions.checkState(vars.contains(param), "Variable '%s' not found in target string '%s'", param, string); ...
java
public static void validate(final String string, final List<String> params) { final List<String> vars = findVars(string); for (String param : params) { Preconditions.checkState(vars.contains(param), "Variable '%s' not found in target string '%s'", param, string); ...
[ "public", "static", "void", "validate", "(", "final", "String", "string", ",", "final", "List", "<", "String", ">", "params", ")", "{", "final", "List", "<", "String", ">", "vars", "=", "findVars", "(", "string", ")", ";", "for", "(", "String", "param"...
Validate string variables and declared values for correctness. @param string template string @param params provided param names
[ "Validate", "string", "variables", "and", "declared", "values", "for", "correctness", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElUtils.java#L96-L106
42,228
caduandrade/japura-gui
src/main/java/org/japura/gui/CollapsiblePanel.java
CollapsiblePanel.expand
private void expand(boolean immediately) { if (locked == false && inAction == false && collapsed) { inAction = true; CollapsiblePanelListener[] array = listeners.getListeners(CollapsiblePanelListener.class); for (CollapsiblePanelListener cpl : array) { cpl.panelWillExpand(new CollapsiblePanelEvent(this)...
java
private void expand(boolean immediately) { if (locked == false && inAction == false && collapsed) { inAction = true; CollapsiblePanelListener[] array = listeners.getListeners(CollapsiblePanelListener.class); for (CollapsiblePanelListener cpl : array) { cpl.panelWillExpand(new CollapsiblePanelEvent(this)...
[ "private", "void", "expand", "(", "boolean", "immediately", ")", "{", "if", "(", "locked", "==", "false", "&&", "inAction", "==", "false", "&&", "collapsed", ")", "{", "inAction", "=", "true", ";", "CollapsiblePanelListener", "[", "]", "array", "=", "liste...
Expand the panel. @param immediately a boolean value, where true expand immediately the panel and false not.
[ "Expand", "the", "panel", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/CollapsiblePanel.java#L759-L780
42,229
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/LinearLayoutManager.java
LinearLayoutManager.setReverseLayout
public void setReverseLayout(boolean reverseLayout) { if (mPendingSavedState != null && mPendingSavedState.mReverseLayout != reverseLayout) { // override pending state mPendingSavedState.mReverseLayout = reverseLayout; } if (reverseLayout == mReverseLayout) { ...
java
public void setReverseLayout(boolean reverseLayout) { if (mPendingSavedState != null && mPendingSavedState.mReverseLayout != reverseLayout) { // override pending state mPendingSavedState.mReverseLayout = reverseLayout; } if (reverseLayout == mReverseLayout) { ...
[ "public", "void", "setReverseLayout", "(", "boolean", "reverseLayout", ")", "{", "if", "(", "mPendingSavedState", "!=", "null", "&&", "mPendingSavedState", ".", "mReverseLayout", "!=", "reverseLayout", ")", "{", "// override pending state", "mPendingSavedState", ".", ...
Used to reverse item traversal and layout order. This behaves similar to the layout change for RTL views. When set to true, first item is rendered at the end of the UI, second item is render before it etc. For horizontal layouts, it depends on the layout direction. When set to true, If {@link com.twotoasters.android.s...
[ "Used", "to", "reverse", "item", "traversal", "and", "layout", "order", ".", "This", "behaves", "similar", "to", "the", "layout", "change", "for", "RTL", "views", ".", "When", "set", "to", "true", "first", "item", "is", "rendered", "at", "the", "end", "o...
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/LinearLayoutManager.java#L296-L306
42,230
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/util/SchemeUtils.java
SchemeUtils.command
public static void command(final ODatabaseObject db, final String command, final Object... args) { db.command(new OCommandSQL(String.format(command, args))).execute(); }
java
public static void command(final ODatabaseObject db, final String command, final Object... args) { db.command(new OCommandSQL(String.format(command, args))).execute(); }
[ "public", "static", "void", "command", "(", "final", "ODatabaseObject", "db", ",", "final", "String", "command", ",", "final", "Object", "...", "args", ")", "{", "db", ".", "command", "(", "new", "OCommandSQL", "(", "String", ".", "format", "(", "command",...
Calls schema change sql command. @param db database object @param command command with string format placeholders @param args string format placeholders args (important: not query args!)
[ "Calls", "schema", "change", "sql", "command", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/util/SchemeUtils.java#L82-L84
42,231
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/util/SchemeUtils.java
SchemeUtils.dropIndex
@SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public static void dropIndex(final ODatabaseObject db, final String indexName) { // Separated to overcome findbugs false positive "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" for dropIndex method. db.getMetadata().getIndexManager().dropIndex(...
java
@SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public static void dropIndex(final ODatabaseObject db, final String indexName) { // Separated to overcome findbugs false positive "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" for dropIndex method. db.getMetadata().getIndexManager().dropIndex(...
[ "@", "SuppressFBWarnings", "(", "\"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT\"", ")", "public", "static", "void", "dropIndex", "(", "final", "ODatabaseObject", "db", ",", "final", "String", "indexName", ")", "{", "// Separated to overcome findbugs false positive \"RV_RETURN_VALUE_...
Drops named index. Safe to call even if index not exist. @param db database object @param indexName index name @see com.orientechnologies.orient.core.index.OIndexManagerProxy#dropIndex(java.lang.String)
[ "Drops", "named", "index", ".", "Safe", "to", "call", "even", "if", "index", "not", "exist", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/util/SchemeUtils.java#L93-L97
42,232
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/OrientModule.java
OrientModule.configureCustomTypes
private void configureCustomTypes() { // empty binding is required in any case final Multibinder<OObjectSerializer> typesBinder = Multibinder.newSetBinder(binder(), OObjectSerializer.class); if (!customTypes.isEmpty()) { for (Class<? extends OObjectSerializer> type : ...
java
private void configureCustomTypes() { // empty binding is required in any case final Multibinder<OObjectSerializer> typesBinder = Multibinder.newSetBinder(binder(), OObjectSerializer.class); if (!customTypes.isEmpty()) { for (Class<? extends OObjectSerializer> type : ...
[ "private", "void", "configureCustomTypes", "(", ")", "{", "// empty binding is required in any case", "final", "Multibinder", "<", "OObjectSerializer", ">", "typesBinder", "=", "Multibinder", ".", "newSetBinder", "(", "binder", "(", ")", ",", "OObjectSerializer", ".", ...
Binds registered custom types as guice singletons and register them with multibinder.
[ "Binds", "registered", "custom", "types", "as", "guice", "singletons", "and", "register", "them", "with", "multibinder", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/OrientModule.java#L298-L308
42,233
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/OrientModule.java
OrientModule.loadOptionalPool
protected void loadOptionalPool(final String poolBinder) { try { final Method bindPool = OrientModule.class.getDeclaredMethod("bindPool", Class.class, Class.class); bindPool.setAccessible(true); try { Class.forName(poolBinder) .getConst...
java
protected void loadOptionalPool(final String poolBinder) { try { final Method bindPool = OrientModule.class.getDeclaredMethod("bindPool", Class.class, Class.class); bindPool.setAccessible(true); try { Class.forName(poolBinder) .getConst...
[ "protected", "void", "loadOptionalPool", "(", "final", "String", "poolBinder", ")", "{", "try", "{", "final", "Method", "bindPool", "=", "OrientModule", ".", "class", ".", "getDeclaredMethod", "(", "\"bindPool\"", ",", "Class", ".", "class", ",", "Class", ".",...
Allows to load pool only if required jars are in classpath. For example, no need for graph dependencies if only object db is used. @param poolBinder pool binder class @see ru.vyarus.guice.persist.orient.support.pool.ObjectPoolBinder as example
[ "Allows", "to", "load", "pool", "only", "if", "required", "jars", "are", "in", "classpath", ".", "For", "example", "no", "need", "for", "graph", "dependencies", "if", "only", "object", "db", "is", "used", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/OrientModule.java#L357-L373
42,234
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/delegate/method/TargetMethodAnalyzer.java
TargetMethodAnalyzer.isParametersCompatible
@SuppressWarnings("unchecked") private static boolean isParametersCompatible(final List<Class<?>> params, final List<ParamInfo> ordinalParamInfos) { boolean resolution = params.size() == ordinalParamInfos.size(); if (resolution && !params.isEmpty()) ...
java
@SuppressWarnings("unchecked") private static boolean isParametersCompatible(final List<Class<?>> params, final List<ParamInfo> ordinalParamInfos) { boolean resolution = params.size() == ordinalParamInfos.size(); if (resolution && !params.isEmpty()) ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "boolean", "isParametersCompatible", "(", "final", "List", "<", "Class", "<", "?", ">", ">", "params", ",", "final", "List", "<", "ParamInfo", ">", "ordinalParamInfos", ")", "{", "boolean...
Checking method parameters compatibility. @param params repository method params to check against @param ordinalParamInfos target method ordinal params (excluding extension parameters) @return true if method is compatible, false otherwise
[ "Checking", "method", "parameters", "compatibility", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/delegate/method/TargetMethodAnalyzer.java#L127-L144
42,235
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElAnalyzer.java
ElAnalyzer.analyzeQuery
public static ElDescriptor analyzeQuery(final GenericsContext genericsContext, final String query) { final List<String> vars = ElUtils.findVars(query); ElDescriptor descriptor = null; if (!vars.isEmpty()) { descriptor = new ElDescriptor(vars); checkGenericVars(descriptor,...
java
public static ElDescriptor analyzeQuery(final GenericsContext genericsContext, final String query) { final List<String> vars = ElUtils.findVars(query); ElDescriptor descriptor = null; if (!vars.isEmpty()) { descriptor = new ElDescriptor(vars); checkGenericVars(descriptor,...
[ "public", "static", "ElDescriptor", "analyzeQuery", "(", "final", "GenericsContext", "genericsContext", ",", "final", "String", "query", ")", "{", "final", "List", "<", "String", ">", "vars", "=", "ElUtils", ".", "findVars", "(", "query", ")", ";", "ElDescript...
Analyze query string for variables. @param genericsContext generics context (set to the method owner type) @param query query string @return descriptor object if variables found, null otherwise
[ "Analyze", "query", "string", "for", "variables", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/core/el/ElAnalyzer.java#L31-L39
42,236
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/MethodDefinitionException.java
MethodDefinitionException.check
public static void check(final boolean condition, final String message, final Object... args) { if (!condition) { throw new MethodDefinitionException(String.format(message, args)); } }
java
public static void check(final boolean condition, final String message, final Object... args) { if (!condition) { throw new MethodDefinitionException(String.format(message, args)); } }
[ "public", "static", "void", "check", "(", "final", "boolean", "condition", ",", "final", "String", "message", ",", "final", "Object", "...", "args", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "MethodDefinitionException", "(", "String", ...
Shortcut to check and throw definition exception. @param condition condition to validate @param message fail message @param args fail message arguments
[ "Shortcut", "to", "check", "and", "throw", "definition", "exception", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/MethodDefinitionException.java#L28-L32
42,237
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/service/result/converter/Optionals.java
Optionals.jdk8
private static Object jdk8(final Class<?> type, final Object object) { try { // a bit faster than resolving it each time if (jdk8OptionalFactory == null) { lookupOptionalFactoryMethod(type); } return jdk8OptionalFactory.invoke(null, object); ...
java
private static Object jdk8(final Class<?> type, final Object object) { try { // a bit faster than resolving it each time if (jdk8OptionalFactory == null) { lookupOptionalFactoryMethod(type); } return jdk8OptionalFactory.invoke(null, object); ...
[ "private", "static", "Object", "jdk8", "(", "final", "Class", "<", "?", ">", "type", ",", "final", "Object", "object", ")", "{", "try", "{", "// a bit faster than resolving it each time", "if", "(", "jdk8OptionalFactory", "==", "null", ")", "{", "lookupOptionalF...
Only this will cause optional class loading and fail for earlier jdk. @param object object for conversion @return optional instance
[ "Only", "this", "will", "cause", "optional", "class", "loading", "and", "fail", "for", "earlier", "jdk", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/service/result/converter/Optionals.java#L49-L59
42,238
rythmengine/spring-rythm
src/main/java/org/rythmengine/spring/RythmEngineFactory.java
RythmEngineFactory.setEngineConfigMap
public void setEngineConfigMap(Map<String, Object> engineConfigMap) { if (engineConfigMap != null) { this.engineConfig.putAll(engineConfigMap); } }
java
public void setEngineConfigMap(Map<String, Object> engineConfigMap) { if (engineConfigMap != null) { this.engineConfig.putAll(engineConfigMap); } }
[ "public", "void", "setEngineConfigMap", "(", "Map", "<", "String", ",", "Object", ">", "engineConfigMap", ")", "{", "if", "(", "engineConfigMap", "!=", "null", ")", "{", "this", ".", "engineConfig", ".", "putAll", "(", "engineConfigMap", ")", ";", "}", "}"...
Set Rythm properties as Map, to allow for non-String values like "ds.resource.loader.instance". @see #setEngineConfig
[ "Set", "Rythm", "properties", "as", "Map", "to", "allow", "for", "non", "-", "String", "values", "like", "ds", ".", "resource", ".", "loader", ".", "instance", "." ]
a654016371c72dabaea50ac9a57626da7614d236
https://github.com/rythmengine/spring-rythm/blob/a654016371c72dabaea50ac9a57626da7614d236/src/main/java/org/rythmengine/spring/RythmEngineFactory.java#L115-L119
42,239
rythmengine/spring-rythm
src/main/java/org/rythmengine/spring/RythmEngineFactory.java
RythmEngineFactory.createRythmEngine
public RythmEngine createRythmEngine() throws IOException, RythmException { Map<String, Object> p = new HashMap<String, Object>(); p.put(RythmConfigurationKey.ENGINE_PLUGIN_VERSION.getKey(), Version.VALUE); // Load config file if set. if (this.configLocation != null) { logger.info("Loading Ryth...
java
public RythmEngine createRythmEngine() throws IOException, RythmException { Map<String, Object> p = new HashMap<String, Object>(); p.put(RythmConfigurationKey.ENGINE_PLUGIN_VERSION.getKey(), Version.VALUE); // Load config file if set. if (this.configLocation != null) { logger.info("Loading Ryth...
[ "public", "RythmEngine", "createRythmEngine", "(", ")", "throws", "IOException", ",", "RythmException", "{", "Map", "<", "String", ",", "Object", ">", "p", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "p", ".", "put", "(", "...
Prepare the RythmEngine instance and return it. @return the RythmEngine instance @throws java.io.IOException if the config file wasn't found @throws RythmException on Rythm initialization failure
[ "Prepare", "the", "RythmEngine", "instance", "and", "return", "it", "." ]
a654016371c72dabaea50ac9a57626da7614d236
https://github.com/rythmengine/spring-rythm/blob/a654016371c72dabaea50ac9a57626da7614d236/src/main/java/org/rythmengine/spring/RythmEngineFactory.java#L208-L276
42,240
legsem/legstar.avro
legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/ZosVarRdwDatumReader.java
ZosVarRdwDatumReader.getRecordLen
private static int getRecordLen(byte[] hostData, int start, int length) { int len = getRawRdw(hostData, start, length); if (len < RDW_LEN || len > hostData.length) { throw new IllegalArgumentException( "Record does not start with a Record Descriptor Word"); } ...
java
private static int getRecordLen(byte[] hostData, int start, int length) { int len = getRawRdw(hostData, start, length); if (len < RDW_LEN || len > hostData.length) { throw new IllegalArgumentException( "Record does not start with a Record Descriptor Word"); } ...
[ "private", "static", "int", "getRecordLen", "(", "byte", "[", "]", "hostData", ",", "int", "start", ",", "int", "length", ")", "{", "int", "len", "=", "getRawRdw", "(", "hostData", ",", "start", ",", "length", ")", ";", "if", "(", "len", "<", "RDW_LE...
RDW is a 4 bytes numeric stored in Big Endian as a binary 2's complement. @param hostData the mainframe data @param start where the RDW starts @param length the total size of the mainframe data @return the size of the record (actual data without the rdw itself)
[ "RDW", "is", "a", "4", "bytes", "numeric", "stored", "in", "Big", "Endian", "as", "a", "binary", "2", "s", "complement", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/ZosVarRdwDatumReader.java#L96-L105
42,241
legsem/legstar.avro
legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java
Xsd2AvroTranslator.translate
public String translate(XmlSchema xmlSchema, String avroNamespace, String avroSchemaName) throws Xsd2AvroTranslatorException { log.debug("XML Schema to Avro Schema translator started"); final Map < QName, XmlSchemaElement > items = xmlSchema.getElements(); ObjectNode rootAvroSchema...
java
public String translate(XmlSchema xmlSchema, String avroNamespace, String avroSchemaName) throws Xsd2AvroTranslatorException { log.debug("XML Schema to Avro Schema translator started"); final Map < QName, XmlSchemaElement > items = xmlSchema.getElements(); ObjectNode rootAvroSchema...
[ "public", "String", "translate", "(", "XmlSchema", "xmlSchema", ",", "String", "avroNamespace", ",", "String", "avroSchemaName", ")", "throws", "Xsd2AvroTranslatorException", "{", "log", ".", "debug", "(", "\"XML Schema to Avro Schema translator started\"", ")", ";", "f...
Translate the input XML Schema. @param xmlSchema the input XML Schema @param avroNamespace the target Avro namespace @param avroSchemaName the target Avro schema name @return the Avro schema as a JSON string @throws Xsd2AvroTranslatorException if translation fails
[ "Translate", "the", "input", "XML", "Schema", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java#L149-L189
42,242
legsem/legstar.avro
legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java
Xsd2AvroTranslator.visit
private void visit(XmlSchema xmlSchema, final XmlSchemaElement xsdElement, final int level, final ArrayNode avroFields) throws Xsd2AvroTranslatorException { /* * If this element is referencing another, it might not be useful to * process it. */ if (xsd...
java
private void visit(XmlSchema xmlSchema, final XmlSchemaElement xsdElement, final int level, final ArrayNode avroFields) throws Xsd2AvroTranslatorException { /* * If this element is referencing another, it might not be useful to * process it. */ if (xsd...
[ "private", "void", "visit", "(", "XmlSchema", "xmlSchema", ",", "final", "XmlSchemaElement", "xsdElement", ",", "final", "int", "level", ",", "final", "ArrayNode", "avroFields", ")", "throws", "Xsd2AvroTranslatorException", "{", "/*\n * If this element is referenc...
Process a regular XML schema element. @param xmlSchema the input XML schema @param xsdElement the XML Schema element to process @param level the current level in the elements hierarchy. @param avroFields array of fields being populated @throws Xsd2AvroTranslatorException if processing fails
[ "Process", "a", "regular", "XML", "schema", "element", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java#L232-L269
42,243
legsem/legstar.avro
legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java
Xsd2AvroTranslator.visit
private void visit(XmlSchema xmlSchema, XmlSchemaComplexType xsdType, final int level, final ArrayNode avroFields) { visit(xmlSchema, xsdType.getParticle(), level, avroFields); }
java
private void visit(XmlSchema xmlSchema, XmlSchemaComplexType xsdType, final int level, final ArrayNode avroFields) { visit(xmlSchema, xsdType.getParticle(), level, avroFields); }
[ "private", "void", "visit", "(", "XmlSchema", "xmlSchema", ",", "XmlSchemaComplexType", "xsdType", ",", "final", "int", "level", ",", "final", "ArrayNode", "avroFields", ")", "{", "visit", "(", "xmlSchema", ",", "xsdType", ".", "getParticle", "(", ")", ",", ...
Create an avro complex type field using an XML schema type. @param xsdType the XML schema complex type @param level the depth in the hierarchy @param avroFields array of avro fields being populated @throws Xsd2AvroTranslatorException if something abnormal in the xsd
[ "Create", "an", "avro", "complex", "type", "field", "using", "an", "XML", "schema", "type", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java#L279-L284
42,244
legsem/legstar.avro
legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java
Xsd2AvroTranslator.visit
private void visit(XmlSchemaSimpleType xsdType, final int level, final String avroFieldName, long minOccurs, long maxOccurs, ArrayNode avroFields) throws Xsd2AvroTranslatorException { Object avroType = getAvroPrimitiveType(avroFieldName, xsdType, maxOccurs > 1, minOccurs...
java
private void visit(XmlSchemaSimpleType xsdType, final int level, final String avroFieldName, long minOccurs, long maxOccurs, ArrayNode avroFields) throws Xsd2AvroTranslatorException { Object avroType = getAvroPrimitiveType(avroFieldName, xsdType, maxOccurs > 1, minOccurs...
[ "private", "void", "visit", "(", "XmlSchemaSimpleType", "xsdType", ",", "final", "int", "level", ",", "final", "String", "avroFieldName", ",", "long", "minOccurs", ",", "long", "maxOccurs", ",", "ArrayNode", "avroFields", ")", "throws", "Xsd2AvroTranslatorException"...
Create an avro primitive type field using an XML schema type. @param xsdType the XML schema simple type @param level the depth in the hierarchy @param avroFieldName to use as the field name for this avro field @param minOccurs lower dimension for arrays & zero for optional fields @param maxOccurs dimension for arrays ...
[ "Create", "an", "avro", "primitive", "type", "field", "using", "an", "XML", "schema", "type", "." ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslator.java#L297-L315
42,245
legsem/legstar.avro
legstar.avro.generator/src/main/java/com/legstar/avro/generator/CustomSpecificCompiler.java
CustomSpecificCompiler.isBigDecimal
public static boolean isBigDecimal(Schema schema) { if (Type.BYTES == schema.getType()) { JsonNode logicalTypeNode = schema.getJsonProp("logicalType"); if (logicalTypeNode != null && "decimal".equals(logicalTypeNode.asText())) { return true; ...
java
public static boolean isBigDecimal(Schema schema) { if (Type.BYTES == schema.getType()) { JsonNode logicalTypeNode = schema.getJsonProp("logicalType"); if (logicalTypeNode != null && "decimal".equals(logicalTypeNode.asText())) { return true; ...
[ "public", "static", "boolean", "isBigDecimal", "(", "Schema", "schema", ")", "{", "if", "(", "Type", ".", "BYTES", "==", "schema", ".", "getType", "(", ")", ")", "{", "JsonNode", "logicalTypeNode", "=", "schema", ".", "getJsonProp", "(", "\"logicalType\"", ...
Tests whether a field is to be externalized as a BigDecimal
[ "Tests", "whether", "a", "field", "is", "to", "be", "externalized", "as", "a", "BigDecimal" ]
bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.generator/src/main/java/com/legstar/avro/generator/CustomSpecificCompiler.java#L36-L45
42,246
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/RepositoryModule.java
RepositoryModule.configureAop
protected void configureAop() { final RepositoryMethodInterceptor proxy = new RepositoryMethodInterceptor(); requestInjection(proxy); // repository specific method annotations (query, function, delegate, etc.) bindInterceptor(Matchers.any(), new AbstractMatcher<Method>() { @O...
java
protected void configureAop() { final RepositoryMethodInterceptor proxy = new RepositoryMethodInterceptor(); requestInjection(proxy); // repository specific method annotations (query, function, delegate, etc.) bindInterceptor(Matchers.any(), new AbstractMatcher<Method>() { @O...
[ "protected", "void", "configureAop", "(", ")", "{", "final", "RepositoryMethodInterceptor", "proxy", "=", "new", "RepositoryMethodInterceptor", "(", ")", ";", "requestInjection", "(", "proxy", ")", ";", "// repository specific method annotations (query, function, delegate, et...
Configures repository annotations interceptor.
[ "Configures", "repository", "annotations", "interceptor", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/RepositoryModule.java#L108-L124
42,247
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/RepositoryModule.java
RepositoryModule.bindExecutor
protected void bindExecutor(final Class<? extends RepositoryExecutor> executor) { bind(executor).in(Singleton.class); executorsMultibinder.addBinding().to(executor); }
java
protected void bindExecutor(final Class<? extends RepositoryExecutor> executor) { bind(executor).in(Singleton.class); executorsMultibinder.addBinding().to(executor); }
[ "protected", "void", "bindExecutor", "(", "final", "Class", "<", "?", "extends", "RepositoryExecutor", ">", "executor", ")", "{", "bind", "(", "executor", ")", ".", "in", "(", "Singleton", ".", "class", ")", ";", "executorsMultibinder", ".", "addBinding", "(...
Register executor for specific connection type. @param executor executor type
[ "Register", "executor", "for", "specific", "connection", "type", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/RepositoryModule.java#L142-L145
42,248
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/RepositoryModule.java
RepositoryModule.loadOptionalExecutor
protected void loadOptionalExecutor(final String executorBinder) { try { final Method bindExecutor = RepositoryModule.class.getDeclaredMethod("bindExecutor", Class.class); bindExecutor.setAccessible(true); try { Class.forName(executorBinder) ...
java
protected void loadOptionalExecutor(final String executorBinder) { try { final Method bindExecutor = RepositoryModule.class.getDeclaredMethod("bindExecutor", Class.class); bindExecutor.setAccessible(true); try { Class.forName(executorBinder) ...
[ "protected", "void", "loadOptionalExecutor", "(", "final", "String", "executorBinder", ")", "{", "try", "{", "final", "Method", "bindExecutor", "=", "RepositoryModule", ".", "class", ".", "getDeclaredMethod", "(", "\"bindExecutor\"", ",", "Class", ".", "class", ")...
Allows to load executor only if required jars are in classpath. For example, no need for graph dependencies if only object db is used. @param executorBinder executor binder class @see ru.vyarus.guice.persist.orient.support.repository.ObjectExecutorBinder as example
[ "Allows", "to", "load", "executor", "only", "if", "required", "jars", "are", "in", "classpath", ".", "For", "example", "no", "need", "for", "graph", "dependencies", "if", "only", "object", "db", "is", "used", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/RepositoryModule.java#L154-L170
42,249
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.setAdapter
public void setAdapter(Adapter adapter) { if (mAdapter != null) { mAdapter.unregisterAdapterDataObserver(mObserver); } // end all running animations if (mItemAnimator != null) { mItemAnimator.endAnimations(); } // Since animations are ended, mLayou...
java
public void setAdapter(Adapter adapter) { if (mAdapter != null) { mAdapter.unregisterAdapterDataObserver(mObserver); } // end all running animations if (mItemAnimator != null) { mItemAnimator.endAnimations(); } // Since animations are ended, mLayou...
[ "public", "void", "setAdapter", "(", "Adapter", "adapter", ")", "{", "if", "(", "mAdapter", "!=", "null", ")", "{", "mAdapter", ".", "unregisterAdapterDataObserver", "(", "mObserver", ")", ";", "}", "// end all running animations", "if", "(", "mItemAnimator", "!...
Set a new adapter to provide child views on demand. @param adapter The new adapter to set, or null to set no adapter.
[ "Set", "a", "new", "adapter", "to", "provide", "child", "views", "on", "demand", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L290-L318
42,250
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.addAnimatingView
private void addAnimatingView(View view) { boolean alreadyAdded = false; if (mNumAnimatingViews > 0) { for (int i = mAnimatingViewIndex; i < getChildCount(); ++i) { if (getChildAt(i) == view) { alreadyAdded = true; break; ...
java
private void addAnimatingView(View view) { boolean alreadyAdded = false; if (mNumAnimatingViews > 0) { for (int i = mAnimatingViewIndex; i < getChildCount(); ++i) { if (getChildAt(i) == view) { alreadyAdded = true; break; ...
[ "private", "void", "addAnimatingView", "(", "View", "view", ")", "{", "boolean", "alreadyAdded", "=", "false", ";", "if", "(", "mNumAnimatingViews", ">", "0", ")", "{", "for", "(", "int", "i", "=", "mAnimatingViewIndex", ";", "i", "<", "getChildCount", "("...
Adds a view to the animatingViews list. mAnimatingViews holds the child views that are currently being kept around purely for the purpose of being animated out of view. They are drawn as a regular part of the child list of the RecyclerView, but they are invisible to the LayoutManager as they are managed separately from...
[ "Adds", "a", "view", "to", "the", "animatingViews", "list", ".", "mAnimatingViews", "holds", "the", "child", "views", "that", "are", "currently", "being", "kept", "around", "purely", "for", "the", "purpose", "of", "being", "animated", "out", "of", "view", "....
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L414-L432
42,251
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.removeAnimatingView
private void removeAnimatingView(View view) { if (mNumAnimatingViews > 0) { for (int i = mAnimatingViewIndex; i < getChildCount(); ++i) { if (getChildAt(i) == view) { removeViewAt(i); --mNumAnimatingViews; if (mNumAnimatingV...
java
private void removeAnimatingView(View view) { if (mNumAnimatingViews > 0) { for (int i = mAnimatingViewIndex; i < getChildCount(); ++i) { if (getChildAt(i) == view) { removeViewAt(i); --mNumAnimatingViews; if (mNumAnimatingV...
[ "private", "void", "removeAnimatingView", "(", "View", "view", ")", "{", "if", "(", "mNumAnimatingViews", ">", "0", ")", "{", "for", "(", "int", "i", "=", "mAnimatingViewIndex", ";", "i", "<", "getChildCount", "(", ")", ";", "++", "i", ")", "{", "if", ...
Removes a view from the animatingViews list. @param view The view to be removed @see #addAnimatingView(android.view.View)
[ "Removes", "a", "view", "from", "the", "animatingViews", "list", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L439-L453
42,252
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.scrollByInternal
void scrollByInternal(int x, int y) { int overscrollX = 0, overscrollY = 0; consumePendingUpdateOperations(); if (mAdapter != null) { eatRequestLayout(); if (x != 0) { final int hresult = mLayout.scrollHorizontallyBy(x, mRecycler, mState); ...
java
void scrollByInternal(int x, int y) { int overscrollX = 0, overscrollY = 0; consumePendingUpdateOperations(); if (mAdapter != null) { eatRequestLayout(); if (x != 0) { final int hresult = mLayout.scrollHorizontallyBy(x, mRecycler, mState); ...
[ "void", "scrollByInternal", "(", "int", "x", ",", "int", "y", ")", "{", "int", "overscrollX", "=", "0", ",", "overscrollY", "=", "0", ";", "consumePendingUpdateOperations", "(", ")", ";", "if", "(", "mAdapter", "!=", "null", ")", "{", "eatRequestLayout", ...
Does not perform bounds checking. Used by internal methods that have already validated input.
[ "Does", "not", "perform", "bounds", "checking", ".", "Used", "by", "internal", "methods", "that", "have", "already", "validated", "input", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L686-L714
42,253
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.fling
public boolean fling(int velocityX, int velocityY) { if (Math.abs(velocityX) < mMinFlingVelocity) { velocityX = 0; } if (Math.abs(velocityY) < mMinFlingVelocity) { velocityY = 0; } velocityX = Math.max(-mMaxFlingVelocity, Math.min(velocityX, mMaxFlingVeloc...
java
public boolean fling(int velocityX, int velocityY) { if (Math.abs(velocityX) < mMinFlingVelocity) { velocityX = 0; } if (Math.abs(velocityY) < mMinFlingVelocity) { velocityY = 0; } velocityX = Math.max(-mMaxFlingVelocity, Math.min(velocityX, mMaxFlingVeloc...
[ "public", "boolean", "fling", "(", "int", "velocityX", ",", "int", "velocityY", ")", "{", "if", "(", "Math", ".", "abs", "(", "velocityX", ")", "<", "mMinFlingVelocity", ")", "{", "velocityX", "=", "0", ";", "}", "if", "(", "Math", ".", "abs", "(", ...
Begin a standard fling with an initial velocity along each axis in pixels per second. If the velocity given is below the system-defined minimum this method will return false and no fling will occur. @param velocityX Initial horizontal velocity in pixels per second @param velocityY Initial vertical velocity in pixels p...
[ "Begin", "a", "standard", "fling", "with", "an", "initial", "velocity", "along", "each", "axis", "in", "pixels", "per", "second", ".", "If", "the", "velocity", "given", "is", "below", "the", "system", "-", "defined", "minimum", "this", "method", "will", "r...
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L885-L899
42,254
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.pullGlows
private void pullGlows(int overscrollX, int overscrollY) { if (overscrollX < 0) { if (mLeftGlow == null) { mLeftGlow = new EdgeEffectCompat(getContext()); mLeftGlow.setSize(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(), getMeasured...
java
private void pullGlows(int overscrollX, int overscrollY) { if (overscrollX < 0) { if (mLeftGlow == null) { mLeftGlow = new EdgeEffectCompat(getContext()); mLeftGlow.setSize(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(), getMeasured...
[ "private", "void", "pullGlows", "(", "int", "overscrollX", ",", "int", "overscrollY", ")", "{", "if", "(", "overscrollX", "<", "0", ")", "{", "if", "(", "mLeftGlow", "==", "null", ")", "{", "mLeftGlow", "=", "new", "EdgeEffectCompat", "(", "getContext", ...
Apply a pull to relevant overscroll glow effects
[ "Apply", "a", "pull", "to", "relevant", "overscroll", "glow", "effects" ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L913-L949
42,255
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.viewRangeUpdate
void viewRangeUpdate(int positionStart, int itemCount) { final int childCount = getChildCount(); final int positionEnd = positionStart + itemCount; for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewHolderInt(getChildAt(i)); if (holder == null) ...
java
void viewRangeUpdate(int positionStart, int itemCount) { final int childCount = getChildCount(); final int positionEnd = positionStart + itemCount; for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewHolderInt(getChildAt(i)); if (holder == null) ...
[ "void", "viewRangeUpdate", "(", "int", "positionStart", ",", "int", "itemCount", ")", "{", "final", "int", "childCount", "=", "getChildCount", "(", ")", ";", "final", "int", "positionEnd", "=", "positionStart", "+", "itemCount", ";", "for", "(", "int", "i", ...
Rebind existing views for the given range, or create as needed. @param positionStart Adapter position to start at @param itemCount Number of views that must explicitly be rebound
[ "Rebind", "existing", "views", "for", "the", "given", "range", "or", "create", "as", "needed", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L1880-L1898
42,256
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.markKnownViewsInvalid
void markKnownViewsInvalid() { final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewHolderInt(getChildAt(i)); if (holder != null) { holder.addFlags(ViewHolder.FLAG_UPDATE | ViewHolder.FLAG_INVALID); ...
java
void markKnownViewsInvalid() { final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final ViewHolder holder = getChildViewHolderInt(getChildAt(i)); if (holder != null) { holder.addFlags(ViewHolder.FLAG_UPDATE | ViewHolder.FLAG_INVALID); ...
[ "void", "markKnownViewsInvalid", "(", ")", "{", "final", "int", "childCount", "=", "getChildCount", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "childCount", ";", "i", "++", ")", "{", "final", "ViewHolder", "holder", "=", "getChildV...
Mark all known views as invalid. Used in response to a, "the whole world might have changed" data change event.
[ "Mark", "all", "known", "views", "as", "invalid", ".", "Used", "in", "response", "to", "a", "the", "whole", "world", "might", "have", "changed", "data", "change", "event", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L1904-L1914
42,257
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.postAdapterUpdate
void postAdapterUpdate(UpdateOp op) { mPendingUpdates.add(op); if (mPendingUpdates.size() == 1) { if (mPostUpdatesOnAnimation && mHasFixedSize && mIsAttached) { ViewCompat.postOnAnimation(this, mUpdateChildViewsRunnable); } else { mAdapterUpdateDur...
java
void postAdapterUpdate(UpdateOp op) { mPendingUpdates.add(op); if (mPendingUpdates.size() == 1) { if (mPostUpdatesOnAnimation && mHasFixedSize && mIsAttached) { ViewCompat.postOnAnimation(this, mUpdateChildViewsRunnable); } else { mAdapterUpdateDur...
[ "void", "postAdapterUpdate", "(", "UpdateOp", "op", ")", "{", "mPendingUpdates", ".", "add", "(", "op", ")", ";", "if", "(", "mPendingUpdates", ".", "size", "(", ")", "==", "1", ")", "{", "if", "(", "mPostUpdatesOnAnimation", "&&", "mHasFixedSize", "&&", ...
Schedule an update of data from the adapter to occur on the next frame. On newer platform versions this happens via the postOnAnimation mechanism and RecyclerView attempts to avoid relayouts if possible. On older platform versions the RecyclerView requests a layout the same way ListView does.
[ "Schedule", "an", "update", "of", "data", "from", "the", "adapter", "to", "occur", "on", "the", "next", "frame", ".", "On", "newer", "platform", "versions", "this", "happens", "via", "the", "postOnAnimation", "mechanism", "and", "RecyclerView", "attempts", "to...
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L1922-L1932
42,258
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.getChildPosition
public int getChildPosition(View child) { final ViewHolder holder = getChildViewHolderInt(child); return holder != null ? holder.getPosition() : NO_POSITION; }
java
public int getChildPosition(View child) { final ViewHolder holder = getChildViewHolderInt(child); return holder != null ? holder.getPosition() : NO_POSITION; }
[ "public", "int", "getChildPosition", "(", "View", "child", ")", "{", "final", "ViewHolder", "holder", "=", "getChildViewHolderInt", "(", "child", ")", ";", "return", "holder", "!=", "null", "?", "holder", ".", "getPosition", "(", ")", ":", "NO_POSITION", ";"...
Return the adapter position that the given child view corresponds to. @param child Child View to query @return Adapter position corresponding to the given view or {@link #NO_POSITION}
[ "Return", "the", "adapter", "position", "that", "the", "given", "child", "view", "corresponds", "to", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L1962-L1965
42,259
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.getChildItemId
public long getChildItemId(View child) { if (mAdapter == null || !mAdapter.hasStableIds()) { return NO_ID; } final ViewHolder holder = getChildViewHolderInt(child); return holder != null ? holder.getItemId() : NO_ID; }
java
public long getChildItemId(View child) { if (mAdapter == null || !mAdapter.hasStableIds()) { return NO_ID; } final ViewHolder holder = getChildViewHolderInt(child); return holder != null ? holder.getItemId() : NO_ID; }
[ "public", "long", "getChildItemId", "(", "View", "child", ")", "{", "if", "(", "mAdapter", "==", "null", "||", "!", "mAdapter", ".", "hasStableIds", "(", ")", ")", "{", "return", "NO_ID", ";", "}", "final", "ViewHolder", "holder", "=", "getChildViewHolderI...
Return the stable item id that the given child view corresponds to. @param child Child View to query @return Item id corresponding to the given view or {@link #NO_ID}
[ "Return", "the", "stable", "item", "id", "that", "the", "given", "child", "view", "corresponds", "to", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L1973-L1979
42,260
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java
RecyclerView.findChildViewUnder
public View findChildViewUnder(float x, float y) { final int count = getChildCount(); for (int i = count - 1; i >= 0; i--) { final View child = getChildAt(i); final float translationX = ViewCompat.getTranslationX(child); final float translationY = ViewCompat.getTransl...
java
public View findChildViewUnder(float x, float y) { final int count = getChildCount(); for (int i = count - 1; i >= 0; i--) { final View child = getChildAt(i); final float translationX = ViewCompat.getTranslationX(child); final float translationY = ViewCompat.getTransl...
[ "public", "View", "findChildViewUnder", "(", "float", "x", ",", "float", "y", ")", "{", "final", "int", "count", "=", "getChildCount", "(", ")", ";", "for", "(", "int", "i", "=", "count", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", ...
Find the topmost view under the given point. @param x Horizontal position in pixels to search @param y Vertical position in pixels to search @return The child view under (x, y) or null if no matching child is found
[ "Find", "the", "topmost", "view", "under", "the", "given", "point", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/RecyclerView.java#L2035-L2049
42,261
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java
LinearSmoothScroller.getHorizontalSnapPreference
protected int getHorizontalSnapPreference() { return mTargetVector == null || mTargetVector.x == 0 ? SNAP_TO_ANY : mTargetVector.x > 0 ? SNAP_TO_END : SNAP_TO_START; }
java
protected int getHorizontalSnapPreference() { return mTargetVector == null || mTargetVector.x == 0 ? SNAP_TO_ANY : mTargetVector.x > 0 ? SNAP_TO_END : SNAP_TO_START; }
[ "protected", "int", "getHorizontalSnapPreference", "(", ")", "{", "return", "mTargetVector", "==", "null", "||", "mTargetVector", ".", "x", "==", "0", "?", "SNAP_TO_ANY", ":", "mTargetVector", ".", "x", ">", "0", "?", "SNAP_TO_END", ":", "SNAP_TO_START", ";", ...
When scrolling towards a child view, this method defines whether we should align the left or the right edge of the child with the parent RecyclerView. @return SNAP_TO_START, SNAP_TO_END or SNAP_TO_ANY; depending on the current target vector @see #SNAP_TO_START @see #SNAP_TO_END @see #SNAP_TO_ANY
[ "When", "scrolling", "towards", "a", "child", "view", "this", "method", "defines", "whether", "we", "should", "align", "the", "left", "or", "the", "right", "edge", "of", "the", "child", "with", "the", "parent", "RecyclerView", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java#L199-L202
42,262
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java
LinearSmoothScroller.getVerticalSnapPreference
protected int getVerticalSnapPreference() { return mTargetVector == null || mTargetVector.y == 0 ? SNAP_TO_ANY : mTargetVector.y > 0 ? SNAP_TO_END : SNAP_TO_START; }
java
protected int getVerticalSnapPreference() { return mTargetVector == null || mTargetVector.y == 0 ? SNAP_TO_ANY : mTargetVector.y > 0 ? SNAP_TO_END : SNAP_TO_START; }
[ "protected", "int", "getVerticalSnapPreference", "(", ")", "{", "return", "mTargetVector", "==", "null", "||", "mTargetVector", ".", "y", "==", "0", "?", "SNAP_TO_ANY", ":", "mTargetVector", ".", "y", ">", "0", "?", "SNAP_TO_END", ":", "SNAP_TO_START", ";", ...
When scrolling towards a child view, this method defines whether we should align the top or the bottom edge of the child with the parent RecyclerView. @return SNAP_TO_START, SNAP_TO_END or SNAP_TO_ANY; depending on the current target vector @see #SNAP_TO_START @see #SNAP_TO_END @see #SNAP_TO_ANY
[ "When", "scrolling", "towards", "a", "child", "view", "this", "method", "defines", "whether", "we", "should", "align", "the", "top", "or", "the", "bottom", "edge", "of", "the", "child", "with", "the", "parent", "RecyclerView", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java#L213-L216
42,263
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java
LinearSmoothScroller.updateActionForInterimTarget
protected void updateActionForInterimTarget(Action action) { // find an interim target position PointF scrollVector = computeScrollVectorForPosition(getTargetPosition()); if (scrollVector == null || (scrollVector.x == 0 && scrollVector.y == 0)) { Log.e(TAG, "To support smooth scrolli...
java
protected void updateActionForInterimTarget(Action action) { // find an interim target position PointF scrollVector = computeScrollVectorForPosition(getTargetPosition()); if (scrollVector == null || (scrollVector.x == 0 && scrollVector.y == 0)) { Log.e(TAG, "To support smooth scrolli...
[ "protected", "void", "updateActionForInterimTarget", "(", "Action", "action", ")", "{", "// find an interim target position", "PointF", "scrollVector", "=", "computeScrollVectorForPosition", "(", "getTargetPosition", "(", ")", ")", ";", "if", "(", "scrollVector", "==", ...
When the target scroll position is not a child of the RecyclerView, this method calculates a direction vector towards that child and triggers a smooth scroll. @see #computeScrollVectorForPosition(int)
[ "When", "the", "target", "scroll", "position", "is", "not", "a", "child", "of", "the", "RecyclerView", "this", "method", "calculates", "a", "direction", "vector", "towards", "that", "child", "and", "triggers", "a", "smooth", "scroll", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java#L224-L248
42,264
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java
LinearSmoothScroller.calculateDyToMakeVisible
public int calculateDyToMakeVisible(View view, int snapPreference) { final RecyclerView.LayoutManager layoutManager = getLayoutManager(); if (!layoutManager.canScrollVertically()) { return 0; } final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) ...
java
public int calculateDyToMakeVisible(View view, int snapPreference) { final RecyclerView.LayoutManager layoutManager = getLayoutManager(); if (!layoutManager.canScrollVertically()) { return 0; } final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) ...
[ "public", "int", "calculateDyToMakeVisible", "(", "View", "view", ",", "int", "snapPreference", ")", "{", "final", "RecyclerView", ".", "LayoutManager", "layoutManager", "=", "getLayoutManager", "(", ")", ";", "if", "(", "!", "layoutManager", ".", "canScrollVertic...
Calculates the vertical scroll amount necessary to make the given view fully visible inside the RecyclerView. @param view The view which we want to make fully visible @param snapPreference The edge which the view should snap to when entering the visible area. One of {@link #SNAP_TO_START}, {@link #SNAP_TO_EN...
[ "Calculates", "the", "vertical", "scroll", "amount", "necessary", "to", "make", "the", "given", "view", "fully", "visible", "inside", "the", "RecyclerView", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java#L298-L310
42,265
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java
LinearSmoothScroller.calculateDxToMakeVisible
public int calculateDxToMakeVisible(View view, int snapPreference) { final RecyclerView.LayoutManager layoutManager = getLayoutManager(); if (!layoutManager.canScrollHorizontally()) { return 0; } final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) ...
java
public int calculateDxToMakeVisible(View view, int snapPreference) { final RecyclerView.LayoutManager layoutManager = getLayoutManager(); if (!layoutManager.canScrollHorizontally()) { return 0; } final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) ...
[ "public", "int", "calculateDxToMakeVisible", "(", "View", "view", ",", "int", "snapPreference", ")", "{", "final", "RecyclerView", ".", "LayoutManager", "layoutManager", "=", "getLayoutManager", "(", ")", ";", "if", "(", "!", "layoutManager", ".", "canScrollHorizo...
Calculates the horizontal scroll amount necessary to make the given view fully visible inside the RecyclerView. @param view The view which we want to make fully visible @param snapPreference The edge which the view should snap to when entering the visible area. One of {@link #SNAP_TO_START}, {@link #SNAP_TO_...
[ "Calculates", "the", "horizontal", "scroll", "amount", "necessary", "to", "make", "the", "given", "view", "fully", "visible", "inside", "the", "RecyclerView", "." ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/android/support/v7/widget/LinearSmoothScroller.java#L323-L335
42,266
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/command/ext/listen/ListenParamExtension.java
ListenParamExtension.resolveTargetType
private Class<?> resolveTargetType(final Class<?> listenerType, final Class<?> declaredTargetType) { Class<?> target = null; if (RequiresRecordConversion.class.isAssignableFrom(listenerType)) { target = GenericsResolver.resolve(listenerType) .type(RequiresRecordConversion...
java
private Class<?> resolveTargetType(final Class<?> listenerType, final Class<?> declaredTargetType) { Class<?> target = null; if (RequiresRecordConversion.class.isAssignableFrom(listenerType)) { target = GenericsResolver.resolve(listenerType) .type(RequiresRecordConversion...
[ "private", "Class", "<", "?", ">", "resolveTargetType", "(", "final", "Class", "<", "?", ">", "listenerType", ",", "final", "Class", "<", "?", ">", "declaredTargetType", ")", "{", "Class", "<", "?", ">", "target", "=", "null", ";", "if", "(", "Requires...
Resolve target conversion type either from listener instance or, if its not possible, from listener parameter declaration. @param listenerType listener instance type @param declaredTargetType listener generic declared in method declaration @return target conversion type or null if conversion is not required
[ "Resolve", "target", "conversion", "type", "either", "from", "listener", "instance", "or", "if", "its", "not", "possible", "from", "listener", "parameter", "declaration", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/command/ext/listen/ListenParamExtension.java#L147-L159
42,267
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/util/RepositoryUtils.java
RepositoryUtils.methodToString
public static String methodToString(final Class<?> type, final Method method) { final StringBuilder res = new StringBuilder(); res.append(type.getSimpleName()).append('#').append(method.getName()).append('('); int i = 0; for (Class<?> param : method.getParameterTypes()) { if ...
java
public static String methodToString(final Class<?> type, final Method method) { final StringBuilder res = new StringBuilder(); res.append(type.getSimpleName()).append('#').append(method.getName()).append('('); int i = 0; for (Class<?> param : method.getParameterTypes()) { if ...
[ "public", "static", "String", "methodToString", "(", "final", "Class", "<", "?", ">", "type", ",", "final", "Method", "method", ")", "{", "final", "StringBuilder", "res", "=", "new", "StringBuilder", "(", ")", ";", "res", ".", "append", "(", "type", ".",...
Converts method signature to human readable string. @param type root type (method may be called not from declaring class) @param method method to print @return string representation for method
[ "Converts", "method", "signature", "to", "human", "readable", "string", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/util/RepositoryUtils.java#L57-L76
42,268
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtCompatibilityUtils.java
ExtCompatibilityUtils.checkParamExtensionCompatibility
public static void checkParamExtensionCompatibility( final Class<? extends RepositoryMethodDescriptor> descriptorType, final Class<? extends MethodParamExtension> paramExtType) { check(isCompatible(paramExtType, MethodParamExtension.class, descriptorType), "Param extensio...
java
public static void checkParamExtensionCompatibility( final Class<? extends RepositoryMethodDescriptor> descriptorType, final Class<? extends MethodParamExtension> paramExtType) { check(isCompatible(paramExtType, MethodParamExtension.class, descriptorType), "Param extensio...
[ "public", "static", "void", "checkParamExtensionCompatibility", "(", "final", "Class", "<", "?", "extends", "RepositoryMethodDescriptor", ">", "descriptorType", ",", "final", "Class", "<", "?", "extends", "MethodParamExtension", ">", "paramExtType", ")", "{", "check",...
Checks that parameter extension is compatible with descriptor and throws error if extension incompatible. @param descriptorType method descriptor type @param paramExtType parameter extension type
[ "Checks", "that", "parameter", "extension", "is", "compatible", "with", "descriptor", "and", "throws", "error", "if", "extension", "incompatible", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtCompatibilityUtils.java#L43-L49
42,269
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtCompatibilityUtils.java
ExtCompatibilityUtils.checkAmendExtensionsCompatibility
public static void checkAmendExtensionsCompatibility( final Class<? extends RepositoryMethodDescriptor> descriptorType, final List<Annotation> extensions) { final List<Class<? extends AmendMethodExtension>> exts = Lists.transform(extensions, new Function<Annotation, Class...
java
public static void checkAmendExtensionsCompatibility( final Class<? extends RepositoryMethodDescriptor> descriptorType, final List<Annotation> extensions) { final List<Class<? extends AmendMethodExtension>> exts = Lists.transform(extensions, new Function<Annotation, Class...
[ "public", "static", "void", "checkAmendExtensionsCompatibility", "(", "final", "Class", "<", "?", "extends", "RepositoryMethodDescriptor", ">", "descriptorType", ",", "final", "List", "<", "Annotation", ">", "extensions", ")", "{", "final", "List", "<", "Class", "...
Checks that amend extensions strictly compatible with descriptor object. Used for amend annotations defined on method. @param descriptorType method descriptor type @param extensions amend extension annotations
[ "Checks", "that", "amend", "extensions", "strictly", "compatible", "with", "descriptor", "object", ".", "Used", "for", "amend", "annotations", "defined", "on", "method", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtCompatibilityUtils.java#L58-L74
42,270
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtCompatibilityUtils.java
ExtCompatibilityUtils.filterCompatibleExtensions
public static List<AmendExecutionExtension> filterCompatibleExtensions( final List<AmendExecutionExtension> extensions, final Class<? extends RepositoryMethodDescriptor> descriptorType) { @SuppressWarnings("unchecked") final Class<? extends AmendExecutionExtension> supportedExten...
java
public static List<AmendExecutionExtension> filterCompatibleExtensions( final List<AmendExecutionExtension> extensions, final Class<? extends RepositoryMethodDescriptor> descriptorType) { @SuppressWarnings("unchecked") final Class<? extends AmendExecutionExtension> supportedExten...
[ "public", "static", "List", "<", "AmendExecutionExtension", ">", "filterCompatibleExtensions", "(", "final", "List", "<", "AmendExecutionExtension", ">", "extensions", ",", "final", "Class", "<", "?", "extends", "RepositoryMethodDescriptor", ">", "descriptorType", ")", ...
Checks resolved amend extensions compatibility with method specific extension type. Extension may be universal and support some methods and doesn't support other. @param extensions extensions to check @param descriptorType repository method descriptor type @return filtered extensions list (safe to use by method ex...
[ "Checks", "resolved", "amend", "extensions", "compatibility", "with", "method", "specific", "extension", "type", ".", "Extension", "may", "be", "universal", "and", "support", "some", "methods", "and", "doesn", "t", "support", "other", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtCompatibilityUtils.java#L99-L118
42,271
caduandrade/japura-gui
src/main/java/org/japura/gui/ToolTipButton.java
ToolTipButton.disposeTooltip
public void disposeTooltip() { if (popup != null) { timer.stop(); popup.setVisible(false); popup = null; } }
java
public void disposeTooltip() { if (popup != null) { timer.stop(); popup.setVisible(false); popup = null; } }
[ "public", "void", "disposeTooltip", "(", ")", "{", "if", "(", "popup", "!=", "null", ")", "{", "timer", ".", "stop", "(", ")", ";", "popup", ".", "setVisible", "(", "false", ")", ";", "popup", "=", "null", ";", "}", "}" ]
Dispose the tooltip
[ "Dispose", "the", "tooltip" ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/ToolTipButton.java#L271-L277
42,272
caduandrade/japura-gui
src/main/java/org/japura/gui/ToolTipButton.java
ToolTipButton.showTooltip
private void showTooltip() { Wrap tooltipLabel = new Wrap(toolTipWrapWidth); tooltipLabel.setForeground(getForeground()); tooltipLabel.setFont(ToolTipButton.this.getFont()); tooltipLabel.setText(text); JPanel panel = new JPanel(); panel.setBackground(toolTipBackground); panel.setLayout(new ...
java
private void showTooltip() { Wrap tooltipLabel = new Wrap(toolTipWrapWidth); tooltipLabel.setForeground(getForeground()); tooltipLabel.setFont(ToolTipButton.this.getFont()); tooltipLabel.setText(text); JPanel panel = new JPanel(); panel.setBackground(toolTipBackground); panel.setLayout(new ...
[ "private", "void", "showTooltip", "(", ")", "{", "Wrap", "tooltipLabel", "=", "new", "Wrap", "(", "toolTipWrapWidth", ")", ";", "tooltipLabel", ".", "setForeground", "(", "getForeground", "(", ")", ")", ";", "tooltipLabel", ".", "setFont", "(", "ToolTipButton"...
Show the tooltip.
[ "Show", "the", "tooltip", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/ToolTipButton.java#L282-L335
42,273
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/delegate/method/MethodFilters.java
MethodFilters.filterByClosestParams
public static Collection<MatchedMethod> filterByClosestParams( final Collection<MatchedMethod> possibilities, final int paramsCount) { Collection<MatchedMethod> res = null; for (int i = 0; i < paramsCount; i++) { final Collection<MatchedMethod> filtered = filterByParam(possibilit...
java
public static Collection<MatchedMethod> filterByClosestParams( final Collection<MatchedMethod> possibilities, final int paramsCount) { Collection<MatchedMethod> res = null; for (int i = 0; i < paramsCount; i++) { final Collection<MatchedMethod> filtered = filterByParam(possibilit...
[ "public", "static", "Collection", "<", "MatchedMethod", ">", "filterByClosestParams", "(", "final", "Collection", "<", "MatchedMethod", ">", "possibilities", ",", "final", "int", "paramsCount", ")", "{", "Collection", "<", "MatchedMethod", ">", "res", "=", "null",...
Looks for most specific type for each parameter. @param possibilities methods to reduce @param paramsCount repository method params count @return possibly reduced collection or original one
[ "Looks", "for", "most", "specific", "type", "for", "each", "parameter", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/delegate/method/MethodFilters.java#L45-L59
42,274
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/pool/DocumentPool.java
DocumentPool.checkAndAcquireConnection
private ODatabaseDocument checkAndAcquireConnection() { final ODatabaseDocument res; if (userManager.isSpecificUser()) { // non pool-managed connection for different user res = orientDB.get().open(database, userManager.getUser(), userManager.getPassword()); } else { ...
java
private ODatabaseDocument checkAndAcquireConnection() { final ODatabaseDocument res; if (userManager.isSpecificUser()) { // non pool-managed connection for different user res = orientDB.get().open(database, userManager.getUser(), userManager.getPassword()); } else { ...
[ "private", "ODatabaseDocument", "checkAndAcquireConnection", "(", ")", "{", "final", "ODatabaseDocument", "res", ";", "if", "(", "userManager", ".", "isSpecificUser", "(", ")", ")", "{", "// non pool-managed connection for different user", "res", "=", "orientDB", ".", ...
Its definitely not normal that pool returns closed connections, but possible if used improperly. @return connection itself or new valid connection
[ "Its", "definitely", "not", "normal", "that", "pool", "returns", "closed", "connections", "but", "possible", "if", "used", "improperly", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/pool/DocumentPool.java#L171-L187
42,275
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/util/RidUtils.java
RidUtils.trackIdChange
public static void trackIdChange(final ODocument document, final Object pojo) { if (document.getIdentity().isNew()) { ORecordInternal.addIdentityChangeListener(document, new OIdentityChangeListener() { @Override public void onBeforeIdentityChange(final ORecord record)...
java
public static void trackIdChange(final ODocument document, final Object pojo) { if (document.getIdentity().isNew()) { ORecordInternal.addIdentityChangeListener(document, new OIdentityChangeListener() { @Override public void onBeforeIdentityChange(final ORecord record)...
[ "public", "static", "void", "trackIdChange", "(", "final", "ODocument", "document", ",", "final", "Object", "pojo", ")", "{", "if", "(", "document", ".", "getIdentity", "(", ")", ".", "isNew", "(", ")", ")", "{", "ORecordInternal", ".", "addIdentityChangeLis...
When just created object is detached to pure pojo it gets temporary id. Real id is assigned only after transaction commit. This method tracks original document, intercepts its id change and sets correct id and version into pojo. So it become safe to use such pojo id outside of transaction. @param document original doc...
[ "When", "just", "created", "object", "is", "detached", "to", "pure", "pojo", "it", "gets", "temporary", "id", ".", "Real", "id", "is", "assigned", "only", "after", "transaction", "commit", ".", "This", "method", "tracks", "original", "document", "intercepts", ...
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/util/RidUtils.java#L89-L104
42,276
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/util/RidUtils.java
RidUtils.findIdField
private static Field findIdField(final Object value) { Field res = null; final Class<?> type = value.getClass(); if (ODatabaseRecordThreadLocal.instance().isDefined()) { res = OObjectEntitySerializer.getIdField(type); } else { final String idField = OObjectSeriali...
java
private static Field findIdField(final Object value) { Field res = null; final Class<?> type = value.getClass(); if (ODatabaseRecordThreadLocal.instance().isDefined()) { res = OObjectEntitySerializer.getIdField(type); } else { final String idField = OObjectSeriali...
[ "private", "static", "Field", "findIdField", "(", "final", "Object", "value", ")", "{", "Field", "res", "=", "null", ";", "final", "Class", "<", "?", ">", "type", "=", "value", ".", "getClass", "(", ")", ";", "if", "(", "ODatabaseRecordThreadLocal", ".",...
Core orient field resolve method relies on bound connection, but it may be required to resolve id outside of transaction. So we use orient method under transaction and do manual scan outside of transaction. @param value object instance (non proxy) @return object id field or null if not found
[ "Core", "orient", "field", "resolve", "method", "relies", "on", "bound", "connection", "but", "it", "may", "be", "required", "to", "resolve", "id", "outside", "of", "transaction", ".", "So", "we", "use", "orient", "method", "under", "transaction", "and", "do...
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/util/RidUtils.java#L142-L159
42,277
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.getCurrentModal_
private static Component getCurrentModal_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { if (modal.getSize() > 0) { return modal.components.get(modal.components.size() - 1); } } return null; } }
java
private static Component getCurrentModal_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { if (modal.getSize() > 0) { return modal.components.get(modal.components.size() - 1); } } return null; } }
[ "private", "static", "Component", "getCurrentModal_", "(", "RootPaneContainer", "rootPane", ")", "{", "synchronized", "(", "modals", ")", "{", "Modal", "modal", "=", "modals", ".", "get", "(", "rootPane", ")", ";", "if", "(", "modal", "!=", "null", ")", "{...
Get the current modal component of a specific RootPaneContainer. @param rootPane the RootPaneContainer with a modal @return Component or <code>NULL</code>
[ "Get", "the", "current", "modal", "component", "of", "a", "specific", "RootPaneContainer", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L120-L130
42,278
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.closeCurrentModal_
private static void closeCurrentModal_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { modal.closeCurrent(); if (modal.getSize() == 0) { modals.remove(rootPane); } } } }
java
private static void closeCurrentModal_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { modal.closeCurrent(); if (modal.getSize() == 0) { modals.remove(rootPane); } } } }
[ "private", "static", "void", "closeCurrentModal_", "(", "RootPaneContainer", "rootPane", ")", "{", "synchronized", "(", "modals", ")", "{", "Modal", "modal", "=", "modals", ".", "get", "(", "rootPane", ")", ";", "if", "(", "modal", "!=", "null", ")", "{", ...
Close the current modal component of a specific RootPaneContainer. @param rootPane the RootPaneContainer with a modal
[ "Close", "the", "current", "modal", "component", "of", "a", "specific", "RootPaneContainer", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L168-L178
42,279
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.closeModal
public static void closeModal(Component component) { synchronized (modals) { RootPaneContainer frame = null; Modal modal = null; Iterator<Entry<RootPaneContainer, Modal>> it = modals.entrySet().iterator(); while (it.hasNext()) { Entry<RootPaneContainer, Modal> entry = it.next(); modal = entry.getV...
java
public static void closeModal(Component component) { synchronized (modals) { RootPaneContainer frame = null; Modal modal = null; Iterator<Entry<RootPaneContainer, Modal>> it = modals.entrySet().iterator(); while (it.hasNext()) { Entry<RootPaneContainer, Modal> entry = it.next(); modal = entry.getV...
[ "public", "static", "void", "closeModal", "(", "Component", "component", ")", "{", "synchronized", "(", "modals", ")", "{", "RootPaneContainer", "frame", "=", "null", ";", "Modal", "modal", "=", "null", ";", "Iterator", "<", "Entry", "<", "RootPaneContainer", ...
Close a specific modal component. @param component the modal's component
[ "Close", "a", "specific", "modal", "component", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L186-L212
42,280
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.closeAllModals_
private static void closeAllModals_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { modal.closeAll(); modals.remove(rootPane); } } }
java
private static void closeAllModals_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { modal.closeAll(); modals.remove(rootPane); } } }
[ "private", "static", "void", "closeAllModals_", "(", "RootPaneContainer", "rootPane", ")", "{", "synchronized", "(", "modals", ")", "{", "Modal", "modal", "=", "modals", ".", "get", "(", "rootPane", ")", ";", "if", "(", "modal", "!=", "null", ")", "{", "...
Close all modals of a specific RootPaneContainer. @param rootPane the RootPaneContainer with a modal
[ "Close", "all", "modals", "of", "a", "specific", "RootPaneContainer", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L250-L258
42,281
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.hasModal_
private static boolean hasModal_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null && modal.getSize() > 0) { return true; } return false; } }
java
private static boolean hasModal_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null && modal.getSize() > 0) { return true; } return false; } }
[ "private", "static", "boolean", "hasModal_", "(", "RootPaneContainer", "rootPane", ")", "{", "synchronized", "(", "modals", ")", "{", "Modal", "modal", "=", "modals", ".", "get", "(", "rootPane", ")", ";", "if", "(", "modal", "!=", "null", "&&", "modal", ...
Indicates whether the RootPaneContainer has a modal. @param rootPane the RootPaneContainer with a modal @return boolean
[ "Indicates", "whether", "the", "RootPaneContainer", "has", "a", "modal", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L300-L308
42,282
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.getModal
private static Modal getModal(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal == null) { modal = new Modal(rootPane); modals.put(rootPane, modal); } return modal; } }
java
private static Modal getModal(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal == null) { modal = new Modal(rootPane); modals.put(rootPane, modal); } return modal; } }
[ "private", "static", "Modal", "getModal", "(", "RootPaneContainer", "rootPane", ")", "{", "synchronized", "(", "modals", ")", "{", "Modal", "modal", "=", "modals", ".", "get", "(", "rootPane", ")", ";", "if", "(", "modal", "==", "null", ")", "{", "modal"...
Get the modal of a specific frame @param rootPane the RootPaneContainer with a modal @return {@link Modal}
[ "Get", "the", "modal", "of", "a", "specific", "frame" ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L317-L326
42,283
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.isModal
public static boolean isModal(Component component) { synchronized (modals) { Iterator<Entry<RootPaneContainer, Modal>> it = modals.entrySet().iterator(); while (it.hasNext()) { Entry<RootPaneContainer, Modal> entry = it.next(); if (entry.getValue().components.contains(component)) { return true; } ...
java
public static boolean isModal(Component component) { synchronized (modals) { Iterator<Entry<RootPaneContainer, Modal>> it = modals.entrySet().iterator(); while (it.hasNext()) { Entry<RootPaneContainer, Modal> entry = it.next(); if (entry.getValue().components.contains(component)) { return true; } ...
[ "public", "static", "boolean", "isModal", "(", "Component", "component", ")", "{", "synchronized", "(", "modals", ")", "{", "Iterator", "<", "Entry", "<", "RootPaneContainer", ",", "Modal", ">", ">", "it", "=", "modals", ".", "entrySet", "(", ")", ".", "...
Indicates whether the component is a modal component. @param component the component @return boolean
[ "Indicates", "whether", "the", "component", "is", "a", "modal", "component", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L335-L347
42,284
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.addModal
public static void addModal(JInternalFrame frame, Component component, ModalListener listener) { addModal_(frame, component, listener, defaultModalDepth); }
java
public static void addModal(JInternalFrame frame, Component component, ModalListener listener) { addModal_(frame, component, listener, defaultModalDepth); }
[ "public", "static", "void", "addModal", "(", "JInternalFrame", "frame", ",", "Component", "component", ",", "ModalListener", "listener", ")", "{", "addModal_", "(", "frame", ",", "component", ",", "listener", ",", "defaultModalDepth", ")", ";", "}" ]
Add a modal component in the internal frame. @param frame the internal frame @param component the component for modal @param listener the listener for modal
[ "Add", "a", "modal", "component", "in", "the", "internal", "frame", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L371-L374
42,285
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.addModal
public static void addModal(JFrame frame, Component component, ModalListener listener, Integer modalDepth) { addModal_(frame, component, listener, modalDepth); }
java
public static void addModal(JFrame frame, Component component, ModalListener listener, Integer modalDepth) { addModal_(frame, component, listener, modalDepth); }
[ "public", "static", "void", "addModal", "(", "JFrame", "frame", ",", "Component", "component", ",", "ModalListener", "listener", ",", "Integer", "modalDepth", ")", "{", "addModal_", "(", "frame", ",", "component", ",", "listener", ",", "modalDepth", ")", ";", ...
Add a modal component in the frame. @param frame the frame @param component the component for modal @param listener the listener for modal @param modalDepth the depth for modal
[ "Add", "a", "modal", "component", "in", "the", "frame", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L499-L502
42,286
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.addModal_
private static void addModal_(RootPaneContainer rootPane, Component component, ModalListener listener, Integer modalDepth) { synchronized (modals) { if (isModal(component) == false) { getModal(rootPane).addModal(component, listener, modalDepth); } } }
java
private static void addModal_(RootPaneContainer rootPane, Component component, ModalListener listener, Integer modalDepth) { synchronized (modals) { if (isModal(component) == false) { getModal(rootPane).addModal(component, listener, modalDepth); } } }
[ "private", "static", "void", "addModal_", "(", "RootPaneContainer", "rootPane", ",", "Component", "component", ",", "ModalListener", "listener", ",", "Integer", "modalDepth", ")", "{", "synchronized", "(", "modals", ")", "{", "if", "(", "isModal", "(", "componen...
Add a modal component in the RootPaneContainer. @param rootPane the RootPaneContainer @param component the component for modal @param listener the listener for modal @param modalDepth the depth for modal
[ "Add", "a", "modal", "component", "in", "the", "RootPaneContainer", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L516-L524
42,287
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.getModalCount_
private static int getModalCount_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { return modal.getSize(); } return 0; } }
java
private static int getModalCount_(RootPaneContainer rootPane) { synchronized (modals) { Modal modal = modals.get(rootPane); if (modal != null) { return modal.getSize(); } return 0; } }
[ "private", "static", "int", "getModalCount_", "(", "RootPaneContainer", "rootPane", ")", "{", "synchronized", "(", "modals", ")", "{", "Modal", "modal", "=", "modals", ".", "get", "(", "rootPane", ")", ";", "if", "(", "modal", "!=", "null", ")", "{", "re...
Get the modal count of a specific RootPaneContainer. @param frame the RootPaneContainer with a modal @return int
[ "Get", "the", "modal", "count", "of", "a", "specific", "RootPaneContainer", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L590-L598
42,288
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.closeCurrent
private void closeCurrent() { if (components.size() > 0) { Component component = components.remove(components.size() - 1); getModalPanel().removeAll(); fireCloseActionListener(listeners.get(component)); listeners.remove(component); if (components.size() > 0) { showNextComponent(); } else { resto...
java
private void closeCurrent() { if (components.size() > 0) { Component component = components.remove(components.size() - 1); getModalPanel().removeAll(); fireCloseActionListener(listeners.get(component)); listeners.remove(component); if (components.size() > 0) { showNextComponent(); } else { resto...
[ "private", "void", "closeCurrent", "(", ")", "{", "if", "(", "components", ".", "size", "(", ")", ">", "0", ")", "{", "Component", "component", "=", "components", ".", "remove", "(", "components", ".", "size", "(", ")", "-", "1", ")", ";", "getModalP...
Close the current modal.
[ "Close", "the", "current", "modal", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L663-L676
42,289
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.close
private void close(Component component) { if (components.size() > 0) { if (components.contains(component) == false) { return; } components.remove(component); depths.remove(component); getModalPanel().removeAll(); fireCloseActionListener(listeners.get(component)); listeners.remove(component); ...
java
private void close(Component component) { if (components.size() > 0) { if (components.contains(component) == false) { return; } components.remove(component); depths.remove(component); getModalPanel().removeAll(); fireCloseActionListener(listeners.get(component)); listeners.remove(component); ...
[ "private", "void", "close", "(", "Component", "component", ")", "{", "if", "(", "components", ".", "size", "(", ")", ">", "0", ")", "{", "if", "(", "components", ".", "contains", "(", "component", ")", "==", "false", ")", "{", "return", ";", "}", "...
Close a modal @param component - the modal's component
[ "Close", "a", "modal" ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L719-L737
42,290
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.closeAll
private void closeAll() { getModalPanel().removeAll(); components.clear(); depths.clear(); listeners.clear(); restoreRootPane(); }
java
private void closeAll() { getModalPanel().removeAll(); components.clear(); depths.clear(); listeners.clear(); restoreRootPane(); }
[ "private", "void", "closeAll", "(", ")", "{", "getModalPanel", "(", ")", ".", "removeAll", "(", ")", ";", "components", ".", "clear", "(", ")", ";", "depths", ".", "clear", "(", ")", ";", "listeners", ".", "clear", "(", ")", ";", "restoreRootPane", "...
Close all modals.
[ "Close", "all", "modals", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L760-L766
42,291
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.addModal
private void addModal(Component component, ModalListener listener, Integer modalDepth) { if (modalDepth == null) { modalDepth = defaultModalDepth; } if (components.contains(component) == false) { rootPane.getLayeredPane().remove(getModalPanel()); rootPane.getLayeredPane().add(getModalPanel(), modalDe...
java
private void addModal(Component component, ModalListener listener, Integer modalDepth) { if (modalDepth == null) { modalDepth = defaultModalDepth; } if (components.contains(component) == false) { rootPane.getLayeredPane().remove(getModalPanel()); rootPane.getLayeredPane().add(getModalPanel(), modalDe...
[ "private", "void", "addModal", "(", "Component", "component", ",", "ModalListener", "listener", ",", "Integer", "modalDepth", ")", "{", "if", "(", "modalDepth", "==", "null", ")", "{", "modalDepth", "=", "defaultModalDepth", ";", "}", "if", "(", "components", ...
Add a modal component @param component {@link Component} @param listener {@link ModalListener} @param modalDepth
[ "Add", "a", "modal", "component" ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L777-L798
42,292
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.getModalPanel
private ModalPanel getModalPanel() { if (modalPanel == null) { modalPanel = new ModalPanel(); modalPanel.setLayout(new ModalLayout()); } return modalPanel; }
java
private ModalPanel getModalPanel() { if (modalPanel == null) { modalPanel = new ModalPanel(); modalPanel.setLayout(new ModalLayout()); } return modalPanel; }
[ "private", "ModalPanel", "getModalPanel", "(", ")", "{", "if", "(", "modalPanel", "==", "null", ")", "{", "modalPanel", "=", "new", "ModalPanel", "(", ")", ";", "modalPanel", ".", "setLayout", "(", "new", "ModalLayout", "(", ")", ")", ";", "}", "return",...
Get the transparent modal panel @return {@link ModalPanel}
[ "Get", "the", "transparent", "modal", "panel" ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L827-L833
42,293
caduandrade/japura-gui
src/main/java/org/japura/gui/modal/Modal.java
Modal.getRootPaneContainer
public static RootPaneContainer getRootPaneContainer(Component component) { if (component instanceof RootPaneContainer) { return (RootPaneContainer) component; } for (Container p = component.getParent(); p != null; p = p.getParent()) { if (p instanceof RootPaneContainer) { return (RootPaneContainer) p; }...
java
public static RootPaneContainer getRootPaneContainer(Component component) { if (component instanceof RootPaneContainer) { return (RootPaneContainer) component; } for (Container p = component.getParent(); p != null; p = p.getParent()) { if (p instanceof RootPaneContainer) { return (RootPaneContainer) p; }...
[ "public", "static", "RootPaneContainer", "getRootPaneContainer", "(", "Component", "component", ")", "{", "if", "(", "component", "instanceof", "RootPaneContainer", ")", "{", "return", "(", "RootPaneContainer", ")", "component", ";", "}", "for", "(", "Container", ...
Get the RootPaneContainer of the specific component. @param component @return the RootPaneContainer or <CODE>NULL</CODE> if its not exist.
[ "Get", "the", "RootPaneContainer", "of", "the", "specific", "component", "." ]
0ea556329843c978d2863d3731a6df244d18d4ca
https://github.com/caduandrade/japura-gui/blob/0ea556329843c978d2863d3731a6df244d18d4ca/src/main/java/org/japura/gui/modal/Modal.java#L885-L896
42,294
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/result/ResultAnalyzer.java
ResultAnalyzer.analyzeReturnType
public static ResultDescriptor analyzeReturnType(final DescriptorContext context, final Class<? extends Collection> returnCollectionType) { final Method method = context.method; final MethodGenericsContext generics = context.generics.method(method); ...
java
public static ResultDescriptor analyzeReturnType(final DescriptorContext context, final Class<? extends Collection> returnCollectionType) { final Method method = context.method; final MethodGenericsContext generics = context.generics.method(method); ...
[ "public", "static", "ResultDescriptor", "analyzeReturnType", "(", "final", "DescriptorContext", "context", ",", "final", "Class", "<", "?", "extends", "Collection", ">", "returnCollectionType", ")", "{", "final", "Method", "method", "=", "context", ".", "method", ...
Analyze return type. @param context repository method context @param returnCollectionType collection implementation to convert to or null if conversion not required @return result description object
[ "Analyze", "return", "type", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/result/ResultAnalyzer.java#L41-L69
42,295
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/layoutmanager/BaseLayoutManager.java
BaseLayoutManager.recycleByRenderState
protected void recycleByRenderState(RecyclerView.Recycler recycler, RenderState renderState) { if (renderState.mLayoutDirection == RenderState.LAYOUT_START) { recycleViewsFromEnd(recycler, renderState.mScrollingOffset); } else { recycleViewsFromStart(recycler, renderState.mScroll...
java
protected void recycleByRenderState(RecyclerView.Recycler recycler, RenderState renderState) { if (renderState.mLayoutDirection == RenderState.LAYOUT_START) { recycleViewsFromEnd(recycler, renderState.mScrollingOffset); } else { recycleViewsFromStart(recycler, renderState.mScroll...
[ "protected", "void", "recycleByRenderState", "(", "RecyclerView", ".", "Recycler", "recycler", ",", "RenderState", "renderState", ")", "{", "if", "(", "renderState", ".", "mLayoutDirection", "==", "RenderState", ".", "LAYOUT_START", ")", "{", "recycleViewsFromEnd", ...
Helper method to call appropriate recycle method depending on current render layout direction @param recycler Current recycler that is attached to RecyclerView @param renderState Current render state. Right now, this object does not change but we may consider moving it out of this view so passing around as a parame...
[ "Helper", "method", "to", "call", "appropriate", "recycle", "method", "depending", "on", "current", "render", "layout", "direction" ]
2379fd5bbf57d4dfc8b28046b7ace950905c75f0
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/layoutmanager/BaseLayoutManager.java#L969-L975
42,296
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ResultUtils.java
ResultUtils.check
public static void check(final Object result, final Class<?> targetType) { if (result != null && !targetType.isAssignableFrom(result.getClass())) { // note: conversion logic may go wrong (e.g. because converter expect collection input mostly and may // not work correctly for single eleme...
java
public static void check(final Object result, final Class<?> targetType) { if (result != null && !targetType.isAssignableFrom(result.getClass())) { // note: conversion logic may go wrong (e.g. because converter expect collection input mostly and may // not work correctly for single eleme...
[ "public", "static", "void", "check", "(", "final", "Object", "result", ",", "final", "Class", "<", "?", ">", "targetType", ")", "{", "if", "(", "result", "!=", "null", "&&", "!", "targetType", ".", "isAssignableFrom", "(", "result", ".", "getClass", "(",...
Check converted result compatibility with required type. @param result result object @param targetType target type @throws ResultConversionException if result doesn't match required type
[ "Check", "converted", "result", "compatibility", "with", "required", "type", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ResultUtils.java#L34-L41
42,297
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ResultUtils.java
ResultUtils.convertToCollection
@SuppressWarnings("unchecked") public static Object convertToCollection(final Object result, final Class collectionType, final Class targetEntity, final boolean projection) { final Object converted; if (collectionType.equals(Iterator.class)) { ...
java
@SuppressWarnings("unchecked") public static Object convertToCollection(final Object result, final Class collectionType, final Class targetEntity, final boolean projection) { final Object converted; if (collectionType.equals(Iterator.class)) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Object", "convertToCollection", "(", "final", "Object", "result", ",", "final", "Class", "collectionType", ",", "final", "Class", "targetEntity", ",", "final", "boolean", "projection", ")", "...
Convert result object to collection. In some cases, this could be do nothing case, because orient already returns collection. If projection is required or when collection type is different from requested type, result will be re-packaged into the new collection. @param result result instance @param collectionTy...
[ "Convert", "result", "object", "to", "collection", ".", "In", "some", "cases", "this", "could", "be", "do", "nothing", "case", "because", "orient", "already", "returns", "collection", ".", "If", "projection", "is", "required", "or", "when", "collection", "type...
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ResultUtils.java#L79-L97
42,298
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ResultUtils.java
ResultUtils.convertToArray
@SuppressWarnings("PMD.LooseCoupling") public static Object convertToArray(final Object result, final Class entityType, final boolean projection) { final Collection res = result instanceof Collection // no projection because its applied later ? (Collection) result : convertTo...
java
@SuppressWarnings("PMD.LooseCoupling") public static Object convertToArray(final Object result, final Class entityType, final boolean projection) { final Collection res = result instanceof Collection // no projection because its applied later ? (Collection) result : convertTo...
[ "@", "SuppressWarnings", "(", "\"PMD.LooseCoupling\"", ")", "public", "static", "Object", "convertToArray", "(", "final", "Object", "result", ",", "final", "Class", "entityType", ",", "final", "boolean", "projection", ")", "{", "final", "Collection", "res", "=", ...
Convert result object to array. @param result result object @param entityType target entity type @param projection true to apply projection, false otherwise @return converted result
[ "Convert", "result", "object", "to", "array", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ResultUtils.java#L107-L118
42,299
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/scheme/SchemeInitializationException.java
SchemeInitializationException.check
public static void check(final boolean condition, final String message, final Object... args) { if (!condition) { throw new SchemeInitializationException(String.format(message, args)); } }
java
public static void check(final boolean condition, final String message, final Object... args) { if (!condition) { throw new SchemeInitializationException(String.format(message, args)); } }
[ "public", "static", "void", "check", "(", "final", "boolean", "condition", ",", "final", "String", "message", ",", "final", "Object", "...", "args", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "SchemeInitializationException", "(", "Strin...
Shortcut to check and throw scheme exception. @param condition condition to validate @param message fail message @param args fail message arguments
[ "Shortcut", "to", "check", "and", "throw", "scheme", "exception", "." ]
5ef06fb4f734360512e9824a3b875c4906c56b5b
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/SchemeInitializationException.java#L28-L32