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
106,000
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrInvalidKindForAnnotationException
public static void assertTrueOrInvalidKindForAnnotationException(boolean expression, Element element, Class<? extends Annotation> annotationClazz) { if (!expression) { String msg = String.format("%s %s, only class can be annotated with @%s annotation", element.getKind(), element, annotationClazz.getSimpleN...
java
public static void assertTrueOrInvalidKindForAnnotationException(boolean expression, Element element, Class<? extends Annotation> annotationClazz) { if (!expression) { String msg = String.format("%s %s, only class can be annotated with @%s annotation", element.getKind(), element, annotationClazz.getSimpleN...
[ "public", "static", "void", "assertTrueOrInvalidKindForAnnotationException", "(", "boolean", "expression", ",", "Element", "element", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClazz", ")", "{", "if", "(", "!", "expression", ")", "{", "String...
Assert true or invalid kind for annotation exception. @param expression the expression @param element the element @param annotationClazz the annotation clazz
[ "Assert", "true", "or", "invalid", "kind", "for", "annotation", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L197-L204
106,001
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrInvalidTypeForAnnotationMethodParameterException
public static void assertTrueOrInvalidTypeForAnnotationMethodParameterException(boolean expression, Element classElement, ExecutableElement methodElement, VariableElement parameterElement, Class<? extends Annotation> annotationClazz) { if (!expression) { String msg = String.format("In method '%s.%s', paramet...
java
public static void assertTrueOrInvalidTypeForAnnotationMethodParameterException(boolean expression, Element classElement, ExecutableElement methodElement, VariableElement parameterElement, Class<? extends Annotation> annotationClazz) { if (!expression) { String msg = String.format("In method '%s.%s', paramet...
[ "public", "static", "void", "assertTrueOrInvalidTypeForAnnotationMethodParameterException", "(", "boolean", "expression", ",", "Element", "classElement", ",", "ExecutableElement", "methodElement", ",", "VariableElement", "parameterElement", ",", "Class", "<", "?", "extends", ...
In case a method's parameters is of a type incompatible with specific annotation. @param expression the expression @param classElement the class element @param methodElement the method element @param parameterElement the parameter element @param annotationClazz the annotation clazz
[ "In", "case", "a", "method", "s", "parameters", "is", "of", "a", "type", "incompatible", "with", "specific", "annotation", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L220-L230
106,002
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrUnknownPropertyInJQLException
public static void assertTrueOrUnknownPropertyInJQLException(boolean expression, JQLContext method, String columnName) { if (!expression) { throw (new UnknownPropertyInJQLException(method, columnName)); } }
java
public static void assertTrueOrUnknownPropertyInJQLException(boolean expression, JQLContext method, String columnName) { if (!expression) { throw (new UnknownPropertyInJQLException(method, columnName)); } }
[ "public", "static", "void", "assertTrueOrUnknownPropertyInJQLException", "(", "boolean", "expression", ",", "JQLContext", "method", ",", "String", "columnName", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "(", "new", "UnknownPropertyInJQLException", "...
Assert true or unknown property in JQL exception. @param expression the expression @param method the method @param columnName the column name
[ "Assert", "true", "or", "unknown", "property", "in", "JQL", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L257-L263
106,003
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrUnknownClassInJQLException
public static void assertTrueOrUnknownClassInJQLException(boolean expression, SQLiteModelMethod method, String className) { if (!expression) { throw (new UnknownClassInJQLException(method, className)); } }
java
public static void assertTrueOrUnknownClassInJQLException(boolean expression, SQLiteModelMethod method, String className) { if (!expression) { throw (new UnknownClassInJQLException(method, className)); } }
[ "public", "static", "void", "assertTrueOrUnknownClassInJQLException", "(", "boolean", "expression", ",", "SQLiteModelMethod", "method", ",", "String", "className", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "(", "new", "UnknownClassInJQLException", "...
Assert true or unknown class in JQL exception. @param expression the expression @param method the method @param className the class name
[ "Assert", "true", "or", "unknown", "class", "in", "JQL", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L275-L280
106,004
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrUnknownParamInJQLException
public static void assertTrueOrUnknownParamInJQLException(boolean expression, SQLiteModelMethod method, String paramName) { if (!expression) { throw (new UnknownParamUsedInJQLException(method, paramName)); } }
java
public static void assertTrueOrUnknownParamInJQLException(boolean expression, SQLiteModelMethod method, String paramName) { if (!expression) { throw (new UnknownParamUsedInJQLException(method, paramName)); } }
[ "public", "static", "void", "assertTrueOrUnknownParamInJQLException", "(", "boolean", "expression", ",", "SQLiteModelMethod", "method", ",", "String", "paramName", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "(", "new", "UnknownParamUsedInJQLException",...
Assert true or unknown param in JQL exception. @param expression the expression @param method the method @param paramName the param name
[ "Assert", "true", "or", "unknown", "param", "in", "JQL", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L292-L297
106,005
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.failUnknownPropertyInJQLException
public static void failUnknownPropertyInJQLException(SQLiteModelMethod method, Class<? extends Annotation> annotationClazz, AnnotationAttributeType attribute, String fieldName) { throw (new UnknownPropertyInJQLException(method, annotationClazz, attribute, fieldName)); }
java
public static void failUnknownPropertyInJQLException(SQLiteModelMethod method, Class<? extends Annotation> annotationClazz, AnnotationAttributeType attribute, String fieldName) { throw (new UnknownPropertyInJQLException(method, annotationClazz, attribute, fieldName)); }
[ "public", "static", "void", "failUnknownPropertyInJQLException", "(", "SQLiteModelMethod", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClazz", ",", "AnnotationAttributeType", "attribute", ",", "String", "fieldName", ")", "{", "throw", "(...
Fail unknown property in JQL exception. @param method the method @param annotationClazz the annotation clazz @param attribute the attribute @param fieldName the field name
[ "Fail", "unknown", "property", "in", "JQL", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L311-L315
106,006
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrInvalidPropertyName
public static void assertTrueOrInvalidPropertyName(boolean expression, SQLProperty item1, SQLProperty item2) { if (!expression) { String msg = String.format("Properties '%s#%s' and '%s#%s' must have same column name", item1.getParent().name, item1.name, item2.getParent().name, item2.name); throw (new Inval...
java
public static void assertTrueOrInvalidPropertyName(boolean expression, SQLProperty item1, SQLProperty item2) { if (!expression) { String msg = String.format("Properties '%s#%s' and '%s#%s' must have same column name", item1.getParent().name, item1.name, item2.getParent().name, item2.name); throw (new Inval...
[ "public", "static", "void", "assertTrueOrInvalidPropertyName", "(", "boolean", "expression", ",", "SQLProperty", "item1", ",", "SQLProperty", "item2", ")", "{", "if", "(", "!", "expression", ")", "{", "String", "msg", "=", "String", ".", "format", "(", "\"Prop...
Assert true or invalid property name. @param expression the expression @param item1 the item 1 @param item2 the item 2
[ "Assert", "true", "or", "invalid", "property", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L327-L334
106,007
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.asserTrueOrForeignKeyNotFound
public static void asserTrueOrForeignKeyNotFound(boolean expression, SQLiteEntity currentEntity, ClassName entity) { if (!expression) { throw (new ForeignKeyNotFoundException(currentEntity, entity)); } }
java
public static void asserTrueOrForeignKeyNotFound(boolean expression, SQLiteEntity currentEntity, ClassName entity) { if (!expression) { throw (new ForeignKeyNotFoundException(currentEntity, entity)); } }
[ "public", "static", "void", "asserTrueOrForeignKeyNotFound", "(", "boolean", "expression", ",", "SQLiteEntity", "currentEntity", ",", "ClassName", "entity", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "(", "new", "ForeignKeyNotFoundException", "(", ...
Asser true or foreign key not found. @param expression the expression @param currentEntity the current entity @param entity the entity
[ "Asser", "true", "or", "foreign", "key", "not", "found", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L347-L353
106,008
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.asserTrueOrMissedAnnotationOnClassException
public static void asserTrueOrMissedAnnotationOnClassException(boolean expression, TypeElement daoElement, String entityName) { if (!expression) { String msg = String.format("Dao '%s' referes a bean '%s' without @%s or @%s annotation", daoElement.getQualifiedName(), TypeUtility.className(entityName), BindT...
java
public static void asserTrueOrMissedAnnotationOnClassException(boolean expression, TypeElement daoElement, String entityName) { if (!expression) { String msg = String.format("Dao '%s' referes a bean '%s' without @%s or @%s annotation", daoElement.getQualifiedName(), TypeUtility.className(entityName), BindT...
[ "public", "static", "void", "asserTrueOrMissedAnnotationOnClassException", "(", "boolean", "expression", ",", "TypeElement", "daoElement", ",", "String", "entityName", ")", "{", "if", "(", "!", "expression", ")", "{", "String", "msg", "=", "String", ".", "format",...
Asser true or missed annotation on class exception. @param expression the expression @param daoElement the dao element @param entityName the entity name
[ "Asser", "true", "or", "missed", "annotation", "on", "class", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L366-L375
106,009
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.asserTrueOrUnspecifiedBeanException
public static void asserTrueOrUnspecifiedBeanException(boolean expression, SQLiteDatabaseSchema schema, SQLiteEntity entity, String foreignClassName) { if (!expression) { String msg = String.format( "In dao definition '%s' is referred a bean definition '%s' that is not defined in '%s' schema", entity....
java
public static void asserTrueOrUnspecifiedBeanException(boolean expression, SQLiteDatabaseSchema schema, SQLiteEntity entity, String foreignClassName) { if (!expression) { String msg = String.format( "In dao definition '%s' is referred a bean definition '%s' that is not defined in '%s' schema", entity....
[ "public", "static", "void", "asserTrueOrUnspecifiedBeanException", "(", "boolean", "expression", ",", "SQLiteDatabaseSchema", "schema", ",", "SQLiteEntity", "entity", ",", "String", "foreignClassName", ")", "{", "if", "(", "!", "expression", ")", "{", "String", "msg...
Asser true or unspecified bean exception. @param expression the expression @param schema the schema @param entity the entity @param foreignClassName the foreign class name
[ "Asser", "true", "or", "unspecified", "bean", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L389-L398
106,010
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOfInvalidDefinition
public static void assertTrueOfInvalidDefinition(boolean expression, ModelProperty property, String message) { if (!expression) { String msg = String.format("In class '%s', property '%s' has invalid definition: %s", property.getParent().getElement().asType().toString(), property.getName(), message); throw ...
java
public static void assertTrueOfInvalidDefinition(boolean expression, ModelProperty property, String message) { if (!expression) { String msg = String.format("In class '%s', property '%s' has invalid definition: %s", property.getParent().getElement().asType().toString(), property.getName(), message); throw ...
[ "public", "static", "void", "assertTrueOfInvalidDefinition", "(", "boolean", "expression", ",", "ModelProperty", "property", ",", "String", "message", ")", "{", "if", "(", "!", "expression", ")", "{", "String", "msg", "=", "String", ".", "format", "(", "\"In c...
Assert true of invalid definition. @param expression the expression @param property the property @param message the message
[ "Assert", "true", "of", "invalid", "definition", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L410-L416
106,011
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrInvalidGlobalTypeApdaterException
public static void assertTrueOrInvalidGlobalTypeApdaterException(boolean expression, SQLiteDatabaseSchema sqLiteDatabaseSchema, String typeAdapter, String typeAdapter2) { if (!expression) { String msg = String.format( "In data source '%s', there are two or more global type adapter that cover type '%s': '%s...
java
public static void assertTrueOrInvalidGlobalTypeApdaterException(boolean expression, SQLiteDatabaseSchema sqLiteDatabaseSchema, String typeAdapter, String typeAdapter2) { if (!expression) { String msg = String.format( "In data source '%s', there are two or more global type adapter that cover type '%s': '%s...
[ "public", "static", "void", "assertTrueOrInvalidGlobalTypeApdaterException", "(", "boolean", "expression", ",", "SQLiteDatabaseSchema", "sqLiteDatabaseSchema", ",", "String", "typeAdapter", ",", "String", "typeAdapter2", ")", "{", "if", "(", "!", "expression", ")", "{",...
Assert true or invalid global type apdater exception. @param expression the expression @param sqLiteDatabaseSchema the sq lite database schema @param typeAdapter the type adapter @param typeAdapter2 the type adapter 2
[ "Assert", "true", "or", "invalid", "global", "type", "apdater", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L448-L457
106,012
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/map/BindMapVisitor.java
BindMapVisitor.visitList
@SuppressWarnings("unchecked") static VisitorStatusType visitList(String name, List<Object> list, BindMapListener listener, VisitorStatusType status) { int i = 0; for (Object item : list) { if (item == null || item instanceof String) { visit(name + "." + i, (String) item, listener, status); } else if (it...
java
@SuppressWarnings("unchecked") static VisitorStatusType visitList(String name, List<Object> list, BindMapListener listener, VisitorStatusType status) { int i = 0; for (Object item : list) { if (item == null || item instanceof String) { visit(name + "." + i, (String) item, listener, status); } else if (it...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "VisitorStatusType", "visitList", "(", "String", "name", ",", "List", "<", "Object", ">", "list", ",", "BindMapListener", "listener", ",", "VisitorStatusType", "status", ")", "{", "int", "i", "=", "...
Visit list. @param name the name @param list the list @param listener the listener @param status the status @return the visitor status type
[ "Visit", "list", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/map/BindMapVisitor.java#L82-L100
106,013
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/CodeBuilderUtility.java
CodeBuilderUtility.extractUsedProperties
public static List<SQLProperty> extractUsedProperties(Builder methodBuilder, SQLiteModelMethod method, Class<? extends Annotation> annotationClazz) { SQLiteEntity entity = method.getEntity(); List<SQLProperty> listPropertyInContentValue = new ArrayList<SQLProperty>(); Set<String> foundColumns = JQLChecker.getIns...
java
public static List<SQLProperty> extractUsedProperties(Builder methodBuilder, SQLiteModelMethod method, Class<? extends Annotation> annotationClazz) { SQLiteEntity entity = method.getEntity(); List<SQLProperty> listPropertyInContentValue = new ArrayList<SQLProperty>(); Set<String> foundColumns = JQLChecker.getIns...
[ "public", "static", "List", "<", "SQLProperty", ">", "extractUsedProperties", "(", "Builder", "methodBuilder", ",", "SQLiteModelMethod", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClazz", ")", "{", "SQLiteEntity", "entity", "=", "me...
Generate code necessary to put bean properties in content values map. Return primary key @param methodBuilder used to code generation @param method the method @param annotationClazz the annotation clazz @return primary key.
[ "Generate", "code", "necessary", "to", "put", "bean", "properties", "in", "content", "values", "map", ".", "Return", "primary", "key" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/CodeBuilderUtility.java#L53-L71
106,014
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.analyzePathInternal
private <L extends UriBaseListener> void analyzePathInternal(final String input, L listener) { pathSegmentIndex = -1; walker.walk(listener, preparePath(input).value0); }
java
private <L extends UriBaseListener> void analyzePathInternal(final String input, L listener) { pathSegmentIndex = -1; walker.walk(listener, preparePath(input).value0); }
[ "private", "<", "L", "extends", "UriBaseListener", ">", "void", "analyzePathInternal", "(", "final", "String", "input", ",", "L", "listener", ")", "{", "pathSegmentIndex", "=", "-", "1", ";", "walker", ".", "walk", "(", "listener", ",", "preparePath", "(", ...
Analyze path internal. @param <L> the generic type @param input the input @param listener the listener
[ "Analyze", "path", "internal", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L122-L125
106,015
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.extractAsMap
public Map<String, ContentUriPlaceHolder> extractAsMap(String input) { HashMap<String, ContentUriPlaceHolder> result = new HashMap<>(); ArrayList<ContentUriPlaceHolder> list = extractPlaceHoldersFromURI(input, new ArrayList<ContentUriPlaceHolder>()); for (ContentUriPlaceHolder item : list) { result.put(item.v...
java
public Map<String, ContentUriPlaceHolder> extractAsMap(String input) { HashMap<String, ContentUriPlaceHolder> result = new HashMap<>(); ArrayList<ContentUriPlaceHolder> list = extractPlaceHoldersFromURI(input, new ArrayList<ContentUriPlaceHolder>()); for (ContentUriPlaceHolder item : list) { result.put(item.v...
[ "public", "Map", "<", "String", ",", "ContentUriPlaceHolder", ">", "extractAsMap", "(", "String", "input", ")", "{", "HashMap", "<", "String", ",", "ContentUriPlaceHolder", ">", "result", "=", "new", "HashMap", "<>", "(", ")", ";", "ArrayList", "<", "Content...
Extract all parameters from URI as a map. @param input the input @return the map
[ "Extract", "all", "parameters", "from", "URI", "as", "a", "map", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L143-L152
106,016
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.extractFromPath
public List<ContentUriPlaceHolder> extractFromPath(String input) { final List<ContentUriPlaceHolder> result = new ArrayList<>(); final One<Boolean> valid = new One<>(); valid.value0 = false; analyzePathInternal(input, new UriBaseListener() { @Override public void enterBind_parameter(Bind_parameterContex...
java
public List<ContentUriPlaceHolder> extractFromPath(String input) { final List<ContentUriPlaceHolder> result = new ArrayList<>(); final One<Boolean> valid = new One<>(); valid.value0 = false; analyzePathInternal(input, new UriBaseListener() { @Override public void enterBind_parameter(Bind_parameterContex...
[ "public", "List", "<", "ContentUriPlaceHolder", ">", "extractFromPath", "(", "String", "input", ")", "{", "final", "List", "<", "ContentUriPlaceHolder", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "One", "<", "Boolean", ">", "valid"...
Extract from path. @param input the input @return the list
[ "Extract", "from", "path", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L160-L179
106,017
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.extractPlaceHoldersFromURI
private <L extends Collection<ContentUriPlaceHolder>> L extractPlaceHoldersFromURI(String uri, final L result) { final One<Boolean> valid = new One<>(); valid.value0 = false; analyzeInternal(uri, new UriBaseListener() { @Override public void enterBind_parameter(Bind_parameterContext ctx) { result.add(...
java
private <L extends Collection<ContentUriPlaceHolder>> L extractPlaceHoldersFromURI(String uri, final L result) { final One<Boolean> valid = new One<>(); valid.value0 = false; analyzeInternal(uri, new UriBaseListener() { @Override public void enterBind_parameter(Bind_parameterContext ctx) { result.add(...
[ "private", "<", "L", "extends", "Collection", "<", "ContentUriPlaceHolder", ">", ">", "L", "extractPlaceHoldersFromURI", "(", "String", "uri", ",", "final", "L", "result", ")", "{", "final", "One", "<", "Boolean", ">", "valid", "=", "new", "One", "<>", "("...
Extract place holders from URI. @param <L> the generic type @param uri the uri @param result the result @return the l
[ "Extract", "place", "holders", "from", "URI", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L189-L207
106,018
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.preparePath
private Pair<ParserRuleContext, CommonTokenStream> preparePath(final String input) { UriLexer lexer = new UriLexer(CharStreams.fromString(input)); CommonTokenStream tokens = new CommonTokenStream(lexer); UriParser parser = new UriParser(tokens); parser.removeErrorListeners(); parser.addErrorListener(new Cont...
java
private Pair<ParserRuleContext, CommonTokenStream> preparePath(final String input) { UriLexer lexer = new UriLexer(CharStreams.fromString(input)); CommonTokenStream tokens = new CommonTokenStream(lexer); UriParser parser = new UriParser(tokens); parser.removeErrorListeners(); parser.addErrorListener(new Cont...
[ "private", "Pair", "<", "ParserRuleContext", ",", "CommonTokenStream", ">", "preparePath", "(", "final", "String", "input", ")", "{", "UriLexer", "lexer", "=", "new", "UriLexer", "(", "CharStreams", ".", "fromString", "(", "input", ")", ")", ";", "CommonTokenS...
Prepare path. @param input the input @return the pair
[ "Prepare", "path", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L215-L230
106,019
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.prepareUri
private Pair<ParserRuleContext, CommonTokenStream> prepareUri(final String input) { UriLexer lexer = new UriLexer(CharStreams.fromString(input)); CommonTokenStream tokens = new CommonTokenStream(lexer); UriParser parser = new UriParser(tokens); parser.removeErrorListeners(); parser.addErrorListener(new Conte...
java
private Pair<ParserRuleContext, CommonTokenStream> prepareUri(final String input) { UriLexer lexer = new UriLexer(CharStreams.fromString(input)); CommonTokenStream tokens = new CommonTokenStream(lexer); UriParser parser = new UriParser(tokens); parser.removeErrorListeners(); parser.addErrorListener(new Conte...
[ "private", "Pair", "<", "ParserRuleContext", ",", "CommonTokenStream", ">", "prepareUri", "(", "final", "String", "input", ")", "{", "UriLexer", "lexer", "=", "new", "UriLexer", "(", "CharStreams", ".", "fromString", "(", "input", ")", ")", ";", "CommonTokenSt...
Prepare uri. @param input the input @return the pair
[ "Prepare", "uri", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L238-L269
106,020
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.replaceInternalFromUri
private String replaceInternalFromUri(String input, final List<Triple<Token, Token, String>> replace, UriBaseListener rewriterListener) { Pair<ParserRuleContext, CommonTokenStream> parser = prepareUri(input); pathSegmentIndex = -1; walker.walk(rewriterListener, parser.value0); TokenStreamRewriter rewriter = ne...
java
private String replaceInternalFromUri(String input, final List<Triple<Token, Token, String>> replace, UriBaseListener rewriterListener) { Pair<ParserRuleContext, CommonTokenStream> parser = prepareUri(input); pathSegmentIndex = -1; walker.walk(rewriterListener, parser.value0); TokenStreamRewriter rewriter = ne...
[ "private", "String", "replaceInternalFromUri", "(", "String", "input", ",", "final", "List", "<", "Triple", "<", "Token", ",", "Token", ",", "String", ">", ">", "replace", ",", "UriBaseListener", "rewriterListener", ")", "{", "Pair", "<", "ParserRuleContext", ...
Replace internal from uri. @param input the input @param replace the replace @param rewriterListener the rewriter listener @return the string
[ "Replace", "internal", "from", "uri", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L279-L291
106,021
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BaseProcessor.java
BaseProcessor.parseBindType
protected void parseBindType(RoundEnvironment roundEnv) { for (Element item : roundEnv.getElementsAnnotatedWith(BindType.class)) { AssertKripton.assertTrueOrInvalidKindForAnnotationException(item.getKind() == ElementKind.CLASS, item, BindType.class); globalBeanElements.put(item.toString(), (TypeElement) item...
java
protected void parseBindType(RoundEnvironment roundEnv) { for (Element item : roundEnv.getElementsAnnotatedWith(BindType.class)) { AssertKripton.assertTrueOrInvalidKindForAnnotationException(item.getKind() == ElementKind.CLASS, item, BindType.class); globalBeanElements.put(item.toString(), (TypeElement) item...
[ "protected", "void", "parseBindType", "(", "RoundEnvironment", "roundEnv", ")", "{", "for", "(", "Element", "item", ":", "roundEnv", ".", "getElementsAnnotatedWith", "(", "BindType", ".", "class", ")", ")", "{", "AssertKripton", ".", "assertTrueOrInvalidKindForAnnot...
build bindType elements map. @param roundEnv the round env
[ "build", "bindType", "elements", "map", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BaseProcessor.java#L213-L220
106,022
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateParserOnXmlEndElement
private static void generateParserOnXmlEndElement(BindTypeContext context, MethodSpec.Builder methodBuilder, String instanceName, String parserName, BindEntity entity) { methodBuilder.beginControlFlow("if (elementName.equals($L.getName()))", parserName); methodBuilder.addStatement("currentTag = elementName"); ...
java
private static void generateParserOnXmlEndElement(BindTypeContext context, MethodSpec.Builder methodBuilder, String instanceName, String parserName, BindEntity entity) { methodBuilder.beginControlFlow("if (elementName.equals($L.getName()))", parserName); methodBuilder.addStatement("currentTag = elementName"); ...
[ "private", "static", "void", "generateParserOnXmlEndElement", "(", "BindTypeContext", "context", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "String", "instanceName", ",", "String", "parserName", ",", "BindEntity", "entity", ")", "{", "methodBuilder", "."...
Generate parser on xml end element. @param context the context @param methodBuilder the method builder @param instanceName the instance name @param parserName the parser name @param entity the entity
[ "Generate", "parser", "on", "xml", "end", "element", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L345-L352
106,023
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateParseOnXmlAttributes
private static void generateParseOnXmlAttributes(BindTypeContext context, MethodSpec.Builder methodBuilder, BindEntity entity) { BindTransform bindTransform; int count = 0; // count property to manage { // for each elements for (BindProperty property : entity.getCollection()) { if (property.xmlInf...
java
private static void generateParseOnXmlAttributes(BindTypeContext context, MethodSpec.Builder methodBuilder, BindEntity entity) { BindTransform bindTransform; int count = 0; // count property to manage { // for each elements for (BindProperty property : entity.getCollection()) { if (property.xmlInf...
[ "private", "static", "void", "generateParseOnXmlAttributes", "(", "BindTypeContext", "context", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "BindEntity", "entity", ")", "{", "BindTransform", "bindTransform", ";", "int", "count", "=", "0", ";", "// count...
Generate parse on xml attributes. @param context the context @param methodBuilder the method builder @param entity the entity
[ "Generate", "parse", "on", "xml", "attributes", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L364-L419
106,024
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateParserOnXmlStartElement
private static void generateParserOnXmlStartElement(BindTypeContext context, MethodSpec.Builder methodBuilder, String instanceName, String parserName, BindEntity entity) { BindTransform bindTransform; // start and inner bean methodBuilder.addStatement("currentTag = xmlParser.getName().toString()"); int coun...
java
private static void generateParserOnXmlStartElement(BindTypeContext context, MethodSpec.Builder methodBuilder, String instanceName, String parserName, BindEntity entity) { BindTransform bindTransform; // start and inner bean methodBuilder.addStatement("currentTag = xmlParser.getName().toString()"); int coun...
[ "private", "static", "void", "generateParserOnXmlStartElement", "(", "BindTypeContext", "context", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "String", "instanceName", ",", "String", "parserName", ",", "BindEntity", "entity", ")", "{", "BindTransform", "...
Generate parser on xml start element. @param context the context @param methodBuilder the method builder @param instanceName the instance name @param parserName the parser name @param entity the entity
[ "Generate", "parser", "on", "xml", "start", "element", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L435-L496
106,025
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateParserOnXmlCharacters
private static void generateParserOnXmlCharacters(BindTypeContext context, MethodSpec.Builder methodBuilder, String instanceName, String parserName, BindEntity entity) { BindTransform bindTransform; int count = 0; for (BindProperty property : entity.getCollection()) { if (property.xmlInfo.xmlType != XmlType...
java
private static void generateParserOnXmlCharacters(BindTypeContext context, MethodSpec.Builder methodBuilder, String instanceName, String parserName, BindEntity entity) { BindTransform bindTransform; int count = 0; for (BindProperty property : entity.getCollection()) { if (property.xmlInfo.xmlType != XmlType...
[ "private", "static", "void", "generateParserOnXmlCharacters", "(", "BindTypeContext", "context", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "String", "instanceName", ",", "String", "parserName", ",", "BindEntity", "entity", ")", "{", "BindTransform", "bi...
Parse entity properties and write code to read only CData Text fields. @param context the context @param methodBuilder the method builder @param instanceName the instance name @param parserName the parser name @param entity the entity
[ "Parse", "entity", "properties", "and", "write", "code", "to", "read", "only", "CData", "Text", "fields", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L512-L532
106,026
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateParseOnJackson
private static void generateParseOnJackson(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("parseOnJackson").addJavadoc("parse with jackson\n") .addAnnotation(Override.class).addModifiers(Modifier.PUBLIC) // .addParameter(typeName(A...
java
private static void generateParseOnJackson(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("parseOnJackson").addJavadoc("parse with jackson\n") .addAnnotation(Override.class).addModifiers(Modifier.PUBLIC) // .addParameter(typeName(A...
[ "private", "static", "void", "generateParseOnJackson", "(", "BindTypeContext", "context", ",", "BindEntity", "entity", ")", "{", "// @formatter:off", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"parseOnJackson\"", ")", ...
Generate parse on jackson. @param context the context @param entity the entity
[ "Generate", "parse", "on", "jackson", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L542-L613
106,027
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateSerializeOnJackson
private static void generateSerializeOnJackson(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("serializeOnJackson").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC) // .addParameter(typeName(AbstractJacksonContext.class...
java
private static void generateSerializeOnJackson(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("serializeOnJackson").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC) // .addParameter(typeName(AbstractJacksonContext.class...
[ "private", "static", "void", "generateSerializeOnJackson", "(", "BindTypeContext", "context", ",", "BindEntity", "entity", ")", "{", "// @formatter:off", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"serializeOnJackson\"",...
Generate serialize on jackson. @param context the context @param entity the entity
[ "Generate", "serialize", "on", "jackson", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L706-L749
106,028
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java
BindTypeBuilder.generateSerializeOnXml
private static void generateSerializeOnXml(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("serializeOnXml") .addJavadoc("method for xml serialization\n").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC) // .addParam...
java
private static void generateSerializeOnXml(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("serializeOnXml") .addJavadoc("method for xml serialization\n").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC) // .addParam...
[ "private", "static", "void", "generateSerializeOnXml", "(", "BindTypeContext", "context", ",", "BindEntity", "entity", ")", "{", "// @formatter:off", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"serializeOnXml\"", ")", ...
Generate serialize on xml. @param context the context @param entity the entity
[ "Generate", "serialize", "on", "xml", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/BindTypeBuilder.java#L813-L872
106,029
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/PagedResultImpl.java
PagedResultImpl.nextPage
@Override public void nextPage() { if (!paged) { this.firstPage(); paged = true; } else if (!isLast()) { offset = (getPageNumber() + 1) * pageSize; execute(); } }
java
@Override public void nextPage() { if (!paged) { this.firstPage(); paged = true; } else if (!isLast()) { offset = (getPageNumber() + 1) * pageSize; execute(); } }
[ "@", "Override", "public", "void", "nextPage", "(", ")", "{", "if", "(", "!", "paged", ")", "{", "this", ".", "firstPage", "(", ")", ";", "paged", "=", "true", ";", "}", "else", "if", "(", "!", "isLast", "(", ")", ")", "{", "offset", "=", "(", ...
Next page. @return true, if successful
[ "Next", "page", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/PagedResultImpl.java#L150-L160
106,030
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.buildJQL
public static JQL buildJQL(final SQLiteModelMethod method, String preparedJql) { Map<JQLDynamicStatementType, String> dynamicReplace = new HashMap<>(); final JQL result = new JQL(); // for each method's parameter forEachParameter(method, new OnMethodParameterListener() { @Override public void onMethodPa...
java
public static JQL buildJQL(final SQLiteModelMethod method, String preparedJql) { Map<JQLDynamicStatementType, String> dynamicReplace = new HashMap<>(); final JQL result = new JQL(); // for each method's parameter forEachParameter(method, new OnMethodParameterListener() { @Override public void onMethodPa...
[ "public", "static", "JQL", "buildJQL", "(", "final", "SQLiteModelMethod", "method", ",", "String", "preparedJql", ")", "{", "Map", "<", "JQLDynamicStatementType", ",", "String", ">", "dynamicReplace", "=", "new", "HashMap", "<>", "(", ")", ";", "final", "JQL",...
Builds the JQL. @param method the method @param preparedJql the prepared jql @return the jql
[ "Builds", "the", "JQL", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L151-L186
106,031
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.checkFieldsDefinitions
private static void checkFieldsDefinitions(SQLiteModelMethod method, Class<? extends Annotation> annotation) { List<String> includedFields = AnnotationUtility.extractAsStringArray(method.getElement(), annotation, AnnotationAttributeType.FIELDS); List<String> excludedFields = AnnotationUtility.extractAsStringArray(m...
java
private static void checkFieldsDefinitions(SQLiteModelMethod method, Class<? extends Annotation> annotation) { List<String> includedFields = AnnotationUtility.extractAsStringArray(method.getElement(), annotation, AnnotationAttributeType.FIELDS); List<String> excludedFields = AnnotationUtility.extractAsStringArray(m...
[ "private", "static", "void", "checkFieldsDefinitions", "(", "SQLiteModelMethod", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "List", "<", "String", ">", "includedFields", "=", "AnnotationUtility", ".", "extractAsStringArra...
Check fields definitions. @param method the method @param annotation the annotation
[ "Check", "fields", "definitions", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L196-L205
106,032
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.extractFieldsFromAnnotation
private static <A extends Annotation> LinkedHashSet<String> extractFieldsFromAnnotation(final SQLiteModelMethod method, Class<A> annotationClazz, final boolean includePrimaryKey) { final SQLiteEntity entity = method.getEntity(); List<String> annotatedFieldValues = AnnotationUtility.extractAsStringArray(method.getE...
java
private static <A extends Annotation> LinkedHashSet<String> extractFieldsFromAnnotation(final SQLiteModelMethod method, Class<A> annotationClazz, final boolean includePrimaryKey) { final SQLiteEntity entity = method.getEntity(); List<String> annotatedFieldValues = AnnotationUtility.extractAsStringArray(method.getE...
[ "private", "static", "<", "A", "extends", "Annotation", ">", "LinkedHashSet", "<", "String", ">", "extractFieldsFromAnnotation", "(", "final", "SQLiteModelMethod", "method", ",", "Class", "<", "A", ">", "annotationClazz", ",", "final", "boolean", "includePrimaryKey"...
Extract fields from annotation. @param <A> the generic type @param method the method @param annotationClazz the annotation clazz @param includePrimaryKey the include primary key @return the linked hash set
[ "Extract", "fields", "from", "annotation", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L817-L865
106,033
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.isInSet
private static boolean isInSet(String value, Set<JQLPlaceHolder> parametersUsedInWhereConditions) { for (JQLPlaceHolder ph : parametersUsedInWhereConditions) { if (ph.value.equals(value)) return true; } return false; }
java
private static boolean isInSet(String value, Set<JQLPlaceHolder> parametersUsedInWhereConditions) { for (JQLPlaceHolder ph : parametersUsedInWhereConditions) { if (ph.value.equals(value)) return true; } return false; }
[ "private", "static", "boolean", "isInSet", "(", "String", "value", ",", "Set", "<", "JQLPlaceHolder", ">", "parametersUsedInWhereConditions", ")", "{", "for", "(", "JQLPlaceHolder", "ph", ":", "parametersUsedInWhereConditions", ")", "{", "if", "(", "ph", ".", "v...
Checks if is in set. @param value the value @param parametersUsedInWhereConditions the parameters used in where conditions @return true, if is in set
[ "Checks", "if", "is", "in", "set", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L876-L882
106,034
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.defineOrderByStatement
private static <L extends Annotation> String defineOrderByStatement(final SQLiteModelMethod method, final JQL result, Class<L> annotation, Map<JQLDynamicStatementType, String> dynamicReplace) { StringBuilder builder = new StringBuilder(); String orderBy = AnnotationUtility.extractAsString(method.getElement(), anno...
java
private static <L extends Annotation> String defineOrderByStatement(final SQLiteModelMethod method, final JQL result, Class<L> annotation, Map<JQLDynamicStatementType, String> dynamicReplace) { StringBuilder builder = new StringBuilder(); String orderBy = AnnotationUtility.extractAsString(method.getElement(), anno...
[ "private", "static", "<", "L", "extends", "Annotation", ">", "String", "defineOrderByStatement", "(", "final", "SQLiteModelMethod", "method", ",", "final", "JQL", "result", ",", "Class", "<", "L", ">", "annotation", ",", "Map", "<", "JQLDynamicStatementType", ",...
Define ORDER BY statement. @param <L> the generic type @param method the method @param result the result @param annotation the annotation @param dynamicReplace the dynamic replace @return the string
[ "Define", "ORDER", "BY", "statement", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L962-L1016
106,035
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java
JQLBuilder.forEachParameter
private static void forEachParameter(SQLiteModelMethod method, OnMethodParameterListener listener) { for (VariableElement p : method.getElement().getParameters()) { listener.onMethodParameter(p); } }
java
private static void forEachParameter(SQLiteModelMethod method, OnMethodParameterListener listener) { for (VariableElement p : method.getElement().getParameters()) { listener.onMethodParameter(p); } }
[ "private", "static", "void", "forEachParameter", "(", "SQLiteModelMethod", "method", ",", "OnMethodParameterListener", "listener", ")", "{", "for", "(", "VariableElement", "p", ":", "method", ".", "getElement", "(", ")", ".", "getParameters", "(", ")", ")", "{",...
For each parameter. @param method the method @param listener the listener
[ "For", "each", "parameter", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLBuilder.java#L1106-L1110
106,036
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/utils/AnnotationProcessorUtilis.java
AnnotationProcessorUtilis.infoOnGeneratedClasses
public static void infoOnGeneratedClasses(Class<? extends Annotation> annotation, String packageName, String className) { String msg = String.format("class '%s' in package '%s' is generated by '@%s' annotation processor", className, packageName, annotation.getSimpleName()); printMessage(msg); }
java
public static void infoOnGeneratedClasses(Class<? extends Annotation> annotation, String packageName, String className) { String msg = String.format("class '%s' in package '%s' is generated by '@%s' annotation processor", className, packageName, annotation.getSimpleName()); printMessage(msg); }
[ "public", "static", "void", "infoOnGeneratedClasses", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ",", "String", "packageName", ",", "String", "className", ")", "{", "String", "msg", "=", "String", ".", "format", "(", "\"class '%s' in pac...
KRIPTON_DEBUG info about generated classes. @param annotation the annotation @param packageName the package name @param className the class name
[ "KRIPTON_DEBUG", "info", "about", "generated", "classes", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/utils/AnnotationProcessorUtilis.java#L49-L53
106,037
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/utils/AnnotationProcessorUtilis.java
AnnotationProcessorUtilis.infoOnGeneratedFile
public static void infoOnGeneratedFile(Class<BindDataSource> annotation, File schemaCreateFile) { String msg = String.format("file '%s' in directory '%s' is generated by '@%s' annotation processor", schemaCreateFile.getName(), schemaCreateFile.getParentFile(), annotation.getSimpleName()); printMessage(msg); }
java
public static void infoOnGeneratedFile(Class<BindDataSource> annotation, File schemaCreateFile) { String msg = String.format("file '%s' in directory '%s' is generated by '@%s' annotation processor", schemaCreateFile.getName(), schemaCreateFile.getParentFile(), annotation.getSimpleName()); printMessage(msg); }
[ "public", "static", "void", "infoOnGeneratedFile", "(", "Class", "<", "BindDataSource", ">", "annotation", ",", "File", "schemaCreateFile", ")", "{", "String", "msg", "=", "String", ".", "format", "(", "\"file '%s' in directory '%s' is generated by '@%s' annotation proces...
Info on generated file. @param annotation the annotation @param schemaCreateFile the schema create file
[ "Info", "on", "generated", "file", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/utils/AnnotationProcessorUtilis.java#L72-L76
106,038
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java
SqlSelectBuilder.getNameParameterOfType
public static String getNameParameterOfType(ModelMethod method, TypeName parameter) { for (Pair<String, TypeName> item : method.getParameters()) { if (item.value1.equals(parameter)) { return item.value0; } } return null; }
java
public static String getNameParameterOfType(ModelMethod method, TypeName parameter) { for (Pair<String, TypeName> item : method.getParameters()) { if (item.value1.equals(parameter)) { return item.value0; } } return null; }
[ "public", "static", "String", "getNameParameterOfType", "(", "ModelMethod", "method", ",", "TypeName", "parameter", ")", "{", "for", "(", "Pair", "<", "String", ",", "TypeName", ">", "item", ":", "method", ".", "getParameters", "(", ")", ")", "{", "if", "(...
Gets the name parameter of type. @param method the method @param parameter the parameter @return the name parameter of type
[ "Gets", "the", "name", "parameter", "of", "type", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java#L69-L77
106,039
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java
SqlSelectBuilder.generateSelect
public static void generateSelect(Builder builder, SQLiteModelMethod method) throws ClassNotFoundException { SelectType selectResultType = SelectBuilderUtility.detectSelectType(method); // generate select method selectResultType.generate(builder, method); if (method.hasLiveData()) { // generate selectRe...
java
public static void generateSelect(Builder builder, SQLiteModelMethod method) throws ClassNotFoundException { SelectType selectResultType = SelectBuilderUtility.detectSelectType(method); // generate select method selectResultType.generate(builder, method); if (method.hasLiveData()) { // generate selectRe...
[ "public", "static", "void", "generateSelect", "(", "Builder", "builder", ",", "SQLiteModelMethod", "method", ")", "throws", "ClassNotFoundException", "{", "SelectType", "selectResultType", "=", "SelectBuilderUtility", ".", "detectSelectType", "(", "method", ")", ";", ...
Generate select. @param builder the builder @param method the method @throws ClassNotFoundException the class not found exception
[ "Generate", "select", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java#L89-L104
106,040
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java
SqlSelectBuilder.convertJQL2SQL
public static String convertJQL2SQL(final SQLiteModelMethod method, final boolean replaceWithQuestion) { JQLChecker jqlChecker = JQLChecker.getInstance(); // convert jql to sql String sql = jqlChecker.replace(method, method.jql, new JQLReplacerListenerImpl(method) { @Override public String onBindParameter(...
java
public static String convertJQL2SQL(final SQLiteModelMethod method, final boolean replaceWithQuestion) { JQLChecker jqlChecker = JQLChecker.getInstance(); // convert jql to sql String sql = jqlChecker.replace(method, method.jql, new JQLReplacerListenerImpl(method) { @Override public String onBindParameter(...
[ "public", "static", "String", "convertJQL2SQL", "(", "final", "SQLiteModelMethod", "method", ",", "final", "boolean", "replaceWithQuestion", ")", "{", "JQLChecker", "jqlChecker", "=", "JQLChecker", ".", "getInstance", "(", ")", ";", "// convert jql to sql", "String", ...
Convert JQL 2 SQL. @param method the method @param replaceWithQuestion the replace with question @return the string
[ "Convert", "JQL", "2", "SQL", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java#L438-L469
106,041
xcesco/kripton
kripton-arch-integration/src/main/java/android/arch/core/internal/SafeIterableMap.java
SafeIterableMap.descendingIterator
public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; }
java
public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; }
[ "public", "Iterator", "<", "Map", ".", "Entry", "<", "K", ",", "V", ">", ">", "descendingIterator", "(", ")", "{", "DescendingIterator", "<", "K", ",", "V", ">", "iterator", "=", "new", "DescendingIterator", "<>", "(", "mEnd", ",", "mStart", ")", ";", ...
Descending iterator. @return an descending iterator, which doesn't include new elements added during an iteration.
[ "Descending", "iterator", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-arch-integration/src/main/java/android/arch/core/internal/SafeIterableMap.java#L173-L177
106,042
xcesco/kripton
kripton-arch-integration/src/main/java/android/arch/core/internal/SafeIterableMap.java
SafeIterableMap.iteratorWithAdditions
public IteratorWithAdditions iteratorWithAdditions() { @SuppressWarnings("unchecked") IteratorWithAdditions iterator = new IteratorWithAdditions(); mIterators.put(iterator, false); return iterator; }
java
public IteratorWithAdditions iteratorWithAdditions() { @SuppressWarnings("unchecked") IteratorWithAdditions iterator = new IteratorWithAdditions(); mIterators.put(iterator, false); return iterator; }
[ "public", "IteratorWithAdditions", "iteratorWithAdditions", "(", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "IteratorWithAdditions", "iterator", "=", "new", "IteratorWithAdditions", "(", ")", ";", "mIterators", ".", "put", "(", "iterator", ",", "f...
return an iterator with additions. @return the iterator with additions
[ "return", "an", "iterator", "with", "additions", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-arch-integration/src/main/java/android/arch/core/internal/SafeIterableMap.java#L184-L189
106,043
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/core/JavadocUtility.java
JavadocUtility.generateJavadocGeneratedBy
public static void generateJavadocGeneratedBy(Builder builder) { if (!BindDataSourceSubProcessor.JUNIT_TEST_MODE) { builder.addJavadoc("<p><strong>This class is generated by Kripton Annotation Processor - v. $L</strong></p>\n", Version.getVersion()); builder.addJavadoc("<p><strong>Generation-time: $L</strong></...
java
public static void generateJavadocGeneratedBy(Builder builder) { if (!BindDataSourceSubProcessor.JUNIT_TEST_MODE) { builder.addJavadoc("<p><strong>This class is generated by Kripton Annotation Processor - v. $L</strong></p>\n", Version.getVersion()); builder.addJavadoc("<p><strong>Generation-time: $L</strong></...
[ "public", "static", "void", "generateJavadocGeneratedBy", "(", "Builder", "builder", ")", "{", "if", "(", "!", "BindDataSourceSubProcessor", ".", "JUNIT_TEST_MODE", ")", "{", "builder", ".", "addJavadoc", "(", "\"<p><strong>This class is generated by Kripton Annotation Proc...
Generate javadoc generated by. @param builder the builder
[ "Generate", "javadoc", "generated", "by", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/core/JavadocUtility.java#L61-L66
106,044
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.generateColumnCheckSet
public static String generateColumnCheckSet(TypeSpec.Builder builder, SQLiteModelMethod method, Set<String> columnNames) { String columnNameSet = method.contentProviderMethodName + "ColumnSet"; StringBuilder initBuilder = new StringBuilder(); String temp = ""; for (String item : columnNames) { initBuilder.a...
java
public static String generateColumnCheckSet(TypeSpec.Builder builder, SQLiteModelMethod method, Set<String> columnNames) { String columnNameSet = method.contentProviderMethodName + "ColumnSet"; StringBuilder initBuilder = new StringBuilder(); String temp = ""; for (String item : columnNames) { initBuilder.a...
[ "public", "static", "String", "generateColumnCheckSet", "(", "TypeSpec", ".", "Builder", "builder", ",", "SQLiteModelMethod", "method", ",", "Set", "<", "String", ">", "columnNames", ")", "{", "String", "columnNameSet", "=", "method", ".", "contentProviderMethodName...
check used columns. @param builder the builder @param method the method @param columnNames the column names @return name of column name set
[ "check", "used", "columns", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L74-L90
106,045
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.removeDynamicPlaceHolder
static List<JQLPlaceHolder> removeDynamicPlaceHolder(List<JQLPlaceHolder> placeHolders) { List<JQLPlaceHolder> result = new ArrayList<>(); for (JQLPlaceHolder item : placeHolders) { if (item.type != JQLPlaceHolderType.DYNAMIC_SQL) { result.add(item); } } return result; }
java
static List<JQLPlaceHolder> removeDynamicPlaceHolder(List<JQLPlaceHolder> placeHolders) { List<JQLPlaceHolder> result = new ArrayList<>(); for (JQLPlaceHolder item : placeHolders) { if (item.type != JQLPlaceHolderType.DYNAMIC_SQL) { result.add(item); } } return result; }
[ "static", "List", "<", "JQLPlaceHolder", ">", "removeDynamicPlaceHolder", "(", "List", "<", "JQLPlaceHolder", ">", "placeHolders", ")", "{", "List", "<", "JQLPlaceHolder", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "JQLPlaceHolder...
Removes the dynamic place holder. @param placeHolders the place holders @return the list
[ "Removes", "the", "dynamic", "place", "holder", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L129-L139
106,046
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.validate
static boolean validate(String value, List<JQLPlaceHolder> placeHolders, int pos) { return placeHolders.get(pos).value.equals(value); }
java
static boolean validate(String value, List<JQLPlaceHolder> placeHolders, int pos) { return placeHolders.get(pos).value.equals(value); }
[ "static", "boolean", "validate", "(", "String", "value", ",", "List", "<", "JQLPlaceHolder", ">", "placeHolders", ",", "int", "pos", ")", "{", "return", "placeHolders", ".", "get", "(", "pos", ")", ".", "value", ".", "equals", "(", "value", ")", ";", "...
look for variable name in place holders defined through path of content provider. @param value the value @param placeHolders the place holders @param pos the pos @return <code>true</code> if we found it path
[ "look", "for", "variable", "name", "in", "place", "holders", "defined", "through", "path", "of", "content", "provider", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L153-L155
106,047
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.generateJavaDocForContentProvider
public static void generateJavaDocForContentProvider(final SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { // javadoc String operation = method.jql.operationType.toString(); methodBuilder.addJavadoc("<h1>Content provider URI ($L operation):</h1>\n", operation); methodBuilder.addJavadoc("<pre>$L</...
java
public static void generateJavaDocForContentProvider(final SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { // javadoc String operation = method.jql.operationType.toString(); methodBuilder.addJavadoc("<h1>Content provider URI ($L operation):</h1>\n", operation); methodBuilder.addJavadoc("<pre>$L</...
[ "public", "static", "void", "generateJavaDocForContentProvider", "(", "final", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "// javadoc", "String", "operation", "=", "method", ".", "jql", ".", "operationType", ".", "to...
Generate java doc for content provider. @param method the method @param methodBuilder the method builder
[ "Generate", "java", "doc", "for", "content", "provider", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L165-L210
106,048
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.forEachMethods
public static void forEachMethods(TypeElement typeElement, MethodFoundListener listener) { Elements elementUtils = BaseProcessor.elementUtils; List<? extends Element> list = elementUtils.getAllMembers(typeElement); for (Element item : list) { if (item.getKind() == ElementKind.METHOD) { listener.onMethod((...
java
public static void forEachMethods(TypeElement typeElement, MethodFoundListener listener) { Elements elementUtils = BaseProcessor.elementUtils; List<? extends Element> list = elementUtils.getAllMembers(typeElement); for (Element item : list) { if (item.getKind() == ElementKind.METHOD) { listener.onMethod((...
[ "public", "static", "void", "forEachMethods", "(", "TypeElement", "typeElement", ",", "MethodFoundListener", "listener", ")", "{", "Elements", "elementUtils", "=", "BaseProcessor", ".", "elementUtils", ";", "List", "<", "?", "extends", "Element", ">", "list", "=",...
Iterate over methods. @param typeElement the type element @param listener the listener
[ "Iterate", "over", "methods", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L347-L356
106,049
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.searchInEachParameter
public static Pair<String, TypeName> searchInEachParameter(ModelMethod method, OnParameterListener listener) { for (Pair<String, TypeName> item : method.getParameters()) { if (listener.onParameter(item)) { return item; } } return null; }
java
public static Pair<String, TypeName> searchInEachParameter(ModelMethod method, OnParameterListener listener) { for (Pair<String, TypeName> item : method.getParameters()) { if (listener.onParameter(item)) { return item; } } return null; }
[ "public", "static", "Pair", "<", "String", ",", "TypeName", ">", "searchInEachParameter", "(", "ModelMethod", "method", ",", "OnParameterListener", "listener", ")", "{", "for", "(", "Pair", "<", "String", ",", "TypeName", ">", "item", ":", "method", ".", "ge...
Iterate for each method's parameter @param method @param listener @return
[ "Iterate", "for", "each", "method", "s", "parameter" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L382-L390
106,050
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.countParameterOfType
public static int countParameterOfType(ModelMethod method, TypeName parameter) { int counter = 0; for (Pair<String, TypeName> item : method.getParameters()) { if (item.value1.equals(parameter)) { counter++; } } return counter; }
java
public static int countParameterOfType(ModelMethod method, TypeName parameter) { int counter = 0; for (Pair<String, TypeName> item : method.getParameters()) { if (item.value1.equals(parameter)) { counter++; } } return counter; }
[ "public", "static", "int", "countParameterOfType", "(", "ModelMethod", "method", ",", "TypeName", "parameter", ")", "{", "int", "counter", "=", "0", ";", "for", "(", "Pair", "<", "String", ",", "TypeName", ">", "item", ":", "method", ".", "getParameters", ...
Count parameter of type. @param method the method @param parameter the parameter @return the int
[ "Count", "parameter", "of", "type", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L401-L410
106,051
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.generateLogForContentValuesContentProvider
public static void generateLogForContentValuesContentProvider(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { methodBuilder.addCode("\n// log for content values -- BEGIN\n"); methodBuilder.addStatement("Object _contentValue"); methodBuilder.beginControlFlow("for (String _contentKey:_contentValues.va...
java
public static void generateLogForContentValuesContentProvider(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { methodBuilder.addCode("\n// log for content values -- BEGIN\n"); methodBuilder.addStatement("Object _contentValue"); methodBuilder.beginControlFlow("for (String _contentKey:_contentValues.va...
[ "public", "static", "void", "generateLogForContentValuesContentProvider", "(", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "methodBuilder", ".", "addCode", "(", "\"\\n// log for content values -- BEGIN\\n\"", ")", ";", "metho...
Generate log for content values content provider. @param method the method @param methodBuilder the method builder
[ "Generate", "log", "for", "content", "values", "content", "provider", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L753-L766
106,052
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.orderContentValues
public static List<Pair<String, TypeName>> orderContentValues(final SQLiteModelMethod method, final List<Pair<String, TypeName>> updateableParams) { final List<Pair<String, TypeName>> result = new ArrayList<Pair<String, TypeName>>(); JQLChecker checker = JQLChecker.getInstance(); final One<Boolean> inserMode = n...
java
public static List<Pair<String, TypeName>> orderContentValues(final SQLiteModelMethod method, final List<Pair<String, TypeName>> updateableParams) { final List<Pair<String, TypeName>> result = new ArrayList<Pair<String, TypeName>>(); JQLChecker checker = JQLChecker.getInstance(); final One<Boolean> inserMode = n...
[ "public", "static", "List", "<", "Pair", "<", "String", ",", "TypeName", ">", ">", "orderContentValues", "(", "final", "SQLiteModelMethod", "method", ",", "final", "List", "<", "Pair", "<", "String", ",", "TypeName", ">", ">", "updateableParams", ")", "{", ...
Order content values. @param method the method @param updateableParams the updateable params @return the list
[ "Order", "content", "values", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L777-L832
106,053
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SelectBuilderUtility.java
SelectBuilderUtility.extractReturnType
public static TypeName extractReturnType(final SQLiteModelMethod method) { SQLiteEntity daoEntity = method.getParent().getEntity(); // if true, field must be associate to ben attributes TypeName returnTypeName = method.getReturnClass(); TypeName result = null; if (TypeUtility.isTypeIncludedIn(returnTypeName,...
java
public static TypeName extractReturnType(final SQLiteModelMethod method) { SQLiteEntity daoEntity = method.getParent().getEntity(); // if true, field must be associate to ben attributes TypeName returnTypeName = method.getReturnClass(); TypeName result = null; if (TypeUtility.isTypeIncludedIn(returnTypeName,...
[ "public", "static", "TypeName", "extractReturnType", "(", "final", "SQLiteModelMethod", "method", ")", "{", "SQLiteEntity", "daoEntity", "=", "method", ".", "getParent", "(", ")", ".", "getEntity", "(", ")", ";", "// if true, field must be associate to ben attributes", ...
Detect result type. @param method @return @throws ClassNotFoundException
[ "Detect", "result", "type", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SelectBuilderUtility.java#L189-L260
106,054
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java
BindM2MBuilder.generateDaoPart
private void generateDaoPart(M2MEntity entity) { String daoClassName = entity.daoName.simpleName(); String daoPackageName = entity.daoName.packageName(); String entityPackageName = entity.getPackageName(); String generatedDaoClassName = "Generated" + daoClassName; AnnotationProcessorUtilis.infoOnGeneratedCl...
java
private void generateDaoPart(M2MEntity entity) { String daoClassName = entity.daoName.simpleName(); String daoPackageName = entity.daoName.packageName(); String entityPackageName = entity.getPackageName(); String generatedDaoClassName = "Generated" + daoClassName; AnnotationProcessorUtilis.infoOnGeneratedCl...
[ "private", "void", "generateDaoPart", "(", "M2MEntity", "entity", ")", "{", "String", "daoClassName", "=", "entity", ".", "daoName", ".", "simpleName", "(", ")", ";", "String", "daoPackageName", "=", "entity", ".", "daoName", ".", "packageName", "(", ")", ";...
Generate dao part. @param entity the entity @throws IOException Signals that an I/O exception has occurred.
[ "Generate", "dao", "part", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java#L183-L222
106,055
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java
BindM2MBuilder.isMethodAlreadyDefined
private boolean isMethodAlreadyDefined(M2MEntity entity, final String methodName) { final One<Boolean> found = new One<Boolean>(false); SqlBuilderHelper.forEachMethods(entity.daoElement, new MethodFoundListener() { @Override public void onMethod(ExecutableElement executableMethod) { if (executableMethod...
java
private boolean isMethodAlreadyDefined(M2MEntity entity, final String methodName) { final One<Boolean> found = new One<Boolean>(false); SqlBuilderHelper.forEachMethods(entity.daoElement, new MethodFoundListener() { @Override public void onMethod(ExecutableElement executableMethod) { if (executableMethod...
[ "private", "boolean", "isMethodAlreadyDefined", "(", "M2MEntity", "entity", ",", "final", "String", "methodName", ")", "{", "final", "One", "<", "Boolean", ">", "found", "=", "new", "One", "<", "Boolean", ">", "(", "false", ")", ";", "SqlBuilderHelper", ".",...
analyze DAO definition to check if method is already defined. @param entity the entity @param methodName the method name @return true, if is method already defined
[ "analyze", "DAO", "definition", "to", "check", "if", "method", "is", "already", "defined", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java#L313-L328
106,056
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java
BindM2MBuilder.generateInsert
private void generateInsert(M2MEntity entity, String packageName) { if (!isMethodAlreadyDefined(entity, "insert")) { // @formatter:off MethodSpec methodSpec = MethodSpec.methodBuilder("insert").addModifiers(Modifier.PUBLIC) .addModifiers(Modifier.ABSTRACT).addAnnotation(AnnotationSpec.builder(BindSqlInsert...
java
private void generateInsert(M2MEntity entity, String packageName) { if (!isMethodAlreadyDefined(entity, "insert")) { // @formatter:off MethodSpec methodSpec = MethodSpec.methodBuilder("insert").addModifiers(Modifier.PUBLIC) .addModifiers(Modifier.ABSTRACT).addAnnotation(AnnotationSpec.builder(BindSqlInsert...
[ "private", "void", "generateInsert", "(", "M2MEntity", "entity", ",", "String", "packageName", ")", "{", "if", "(", "!", "isMethodAlreadyDefined", "(", "entity", ",", "\"insert\"", ")", ")", "{", "// @formatter:off", "MethodSpec", "methodSpec", "=", "MethodSpec", ...
Generate insert. @param entity the entity @param packageName the package name
[ "Generate", "insert", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java#L414-L427
106,057
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generate
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws Exception { BindDaoFactoryBuilder visitor = new BindDaoFactoryBuilder(elementUtils, filer, schema); visitor.buildDaoFactoryInterface(elementUtils, filer, schema); String daoFactoryName = BindDaoFactoryBuilder.gener...
java
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws Exception { BindDaoFactoryBuilder visitor = new BindDaoFactoryBuilder(elementUtils, filer, schema); visitor.buildDaoFactoryInterface(elementUtils, filer, schema); String daoFactoryName = BindDaoFactoryBuilder.gener...
[ "public", "static", "void", "generate", "(", "Elements", "elementUtils", ",", "Filer", "filer", ",", "SQLiteDatabaseSchema", "schema", ")", "throws", "Exception", "{", "BindDaoFactoryBuilder", "visitor", "=", "new", "BindDaoFactoryBuilder", "(", "elementUtils", ",", ...
Generate database. @param elementUtils the element utils @param filer the filer @param schema the schema @throws Exception the exception
[ "Generate", "database", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L138-L147
106,058
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.defineFileName
static String defineFileName(SQLiteDatabaseSchema model) { int lastIndex = model.fileName.lastIndexOf("."); String schemaName = model.fileName; if (lastIndex > -1) { schemaName = model.fileName.substring(0, lastIndex); } schemaName = schemaName.toLowerCase() + "_schema_" + model.version + ".sql"; retu...
java
static String defineFileName(SQLiteDatabaseSchema model) { int lastIndex = model.fileName.lastIndexOf("."); String schemaName = model.fileName; if (lastIndex > -1) { schemaName = model.fileName.substring(0, lastIndex); } schemaName = schemaName.toLowerCase() + "_schema_" + model.version + ".sql"; retu...
[ "static", "String", "defineFileName", "(", "SQLiteDatabaseSchema", "model", ")", "{", "int", "lastIndex", "=", "model", ".", "fileName", ".", "lastIndexOf", "(", "\".\"", ")", ";", "String", "schemaName", "=", "model", ".", "fileName", ";", "if", "(", "lastI...
Define file name. @param model the model @return the string
[ "Define", "file", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L206-L217
106,059
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateDataSourceName
public static ClassName generateDataSourceName(SQLiteDatabaseSchema schema) { String dataSourceName = schema.getName(); dataSourceName = PREFIX + dataSourceName; PackageElement pkg = BaseProcessor.elementUtils.getPackageOf(schema.getElement()); String packageName = pkg.isUnnamed() ? "" : pkg.getQualifiedName()...
java
public static ClassName generateDataSourceName(SQLiteDatabaseSchema schema) { String dataSourceName = schema.getName(); dataSourceName = PREFIX + dataSourceName; PackageElement pkg = BaseProcessor.elementUtils.getPackageOf(schema.getElement()); String packageName = pkg.isUnnamed() ? "" : pkg.getQualifiedName()...
[ "public", "static", "ClassName", "generateDataSourceName", "(", "SQLiteDatabaseSchema", "schema", ")", "{", "String", "dataSourceName", "=", "schema", ".", "getName", "(", ")", ";", "dataSourceName", "=", "PREFIX", "+", "dataSourceName", ";", "PackageElement", "pkg"...
Generate dataSource name. @param schema the schema @return associated class name
[ "Generate", "dataSource", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L226-L234
106,060
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateDaoUids
public static void generateDaoUids(TypeSpec.Builder classBuilder, SQLiteDatabaseSchema schema) { for (SQLiteDaoDefinition dao : schema.getCollection()) { classBuilder.addField( FieldSpec.builder(Integer.TYPE, dao.daoUidName, Modifier.FINAL, Modifier.STATIC, Modifier.PUBLIC) .initializer("" + dao.daoU...
java
public static void generateDaoUids(TypeSpec.Builder classBuilder, SQLiteDatabaseSchema schema) { for (SQLiteDaoDefinition dao : schema.getCollection()) { classBuilder.addField( FieldSpec.builder(Integer.TYPE, dao.daoUidName, Modifier.FINAL, Modifier.STATIC, Modifier.PUBLIC) .initializer("" + dao.daoU...
[ "public", "static", "void", "generateDaoUids", "(", "TypeSpec", ".", "Builder", "classBuilder", ",", "SQLiteDatabaseSchema", "schema", ")", "{", "for", "(", "SQLiteDaoDefinition", "dao", ":", "schema", ".", "getCollection", "(", ")", ")", "{", "classBuilder", "....
Generate Dao's UID. If specified, prefix will be used to @param classBuilder the class builder @param schema the schema
[ "Generate", "Dao", "s", "UID", ".", "If", "specified", "prefix", "will", "be", "used", "to" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L445-L454
106,061
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.extractDaoFieldNameForInternalDataSource
private String extractDaoFieldNameForInternalDataSource(SQLiteDaoDefinition dao) { return "_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, dao.getName()); }
java
private String extractDaoFieldNameForInternalDataSource(SQLiteDaoDefinition dao) { return "_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, dao.getName()); }
[ "private", "String", "extractDaoFieldNameForInternalDataSource", "(", "SQLiteDaoDefinition", "dao", ")", "{", "return", "\"_\"", "+", "CaseFormat", ".", "UPPER_CAMEL", ".", "to", "(", "CaseFormat", ".", "LOWER_CAMEL", ",", "dao", ".", "getName", "(", ")", ")", "...
Extract dao field name for internal data source. @param dao the dao @return the string
[ "Extract", "dao", "field", "name", "for", "internal", "data", "source", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L593-L595
106,062
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generatePopulate
private void generatePopulate(SQLiteDatabaseSchema schema, MethodSpec.Builder methodBuilder, boolean instance) { methodBuilder.beginControlFlow("try"); methodBuilder.addStatement("instance.openWritableDatabase()"); methodBuilder.addStatement("instance.close()"); if ((instance && schema.configPopulatorClazz !=...
java
private void generatePopulate(SQLiteDatabaseSchema schema, MethodSpec.Builder methodBuilder, boolean instance) { methodBuilder.beginControlFlow("try"); methodBuilder.addStatement("instance.openWritableDatabase()"); methodBuilder.addStatement("instance.close()"); if ((instance && schema.configPopulatorClazz !=...
[ "private", "void", "generatePopulate", "(", "SQLiteDatabaseSchema", "schema", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "boolean", "instance", ")", "{", "methodBuilder", ".", "beginControlFlow", "(", "\"try\"", ")", ";", "methodBuilder", ".", "addStat...
Generate populate. @param schema the schema @param methodBuilder the method builder @param instance the instance
[ "Generate", "populate", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L693-L724
106,063
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateOpen
private void generateOpen(String schemaName) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("open") .addModifiers(Modifier.PUBLIC, Modifier.STATIC).returns(className(schemaName)); methodBuilder.addJavadoc("Retrieve data source instance and open it.\n"); methodBuilder.addJavadoc("@return opened...
java
private void generateOpen(String schemaName) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("open") .addModifiers(Modifier.PUBLIC, Modifier.STATIC).returns(className(schemaName)); methodBuilder.addJavadoc("Retrieve data source instance and open it.\n"); methodBuilder.addJavadoc("@return opened...
[ "private", "void", "generateOpen", "(", "String", "schemaName", ")", "{", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"open\"", ")", ".", "addModifiers", "(", "Modifier", ".", "PUBLIC", ",", "Modifier", ".", "...
Generate open. @param schemaName the schema name
[ "Generate", "open", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L732-L745
106,064
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateOnConfigure
private void generateOnConfigure(boolean useForeignKey) { // onConfigure MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("onConfigure").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC); methodBuilder.addParameter(SQLiteDatabase.class, "database"); methodBuilder.addJavadoc("onConfigu...
java
private void generateOnConfigure(boolean useForeignKey) { // onConfigure MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("onConfigure").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC); methodBuilder.addParameter(SQLiteDatabase.class, "database"); methodBuilder.addJavadoc("onConfigu...
[ "private", "void", "generateOnConfigure", "(", "boolean", "useForeignKey", ")", "{", "// onConfigure", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"onConfigure\"", ")", ".", "addAnnotation", "(", "Override", ".", "c...
Generate on configure. @param useForeignKey the use foreign key
[ "Generate", "on", "configure", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L981-L999
106,065
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.orderEntitiesList
public static List<SQLiteEntity> orderEntitiesList(SQLiteDatabaseSchema schema) { List<SQLiteEntity> entities = schema.getEntitiesAsList(); Collections.sort(entities, new Comparator<SQLiteEntity>() { @Override public int compare(SQLiteEntity lhs, SQLiteEntity rhs) { return lhs.getTableName().compareTo(rh...
java
public static List<SQLiteEntity> orderEntitiesList(SQLiteDatabaseSchema schema) { List<SQLiteEntity> entities = schema.getEntitiesAsList(); Collections.sort(entities, new Comparator<SQLiteEntity>() { @Override public int compare(SQLiteEntity lhs, SQLiteEntity rhs) { return lhs.getTableName().compareTo(rh...
[ "public", "static", "List", "<", "SQLiteEntity", ">", "orderEntitiesList", "(", "SQLiteDatabaseSchema", "schema", ")", "{", "List", "<", "SQLiteEntity", ">", "entities", "=", "schema", ".", "getEntitiesAsList", "(", ")", ";", "Collections", ".", "sort", "(", "...
Generate ordered entities list. @param schema the schema @return the list
[ "Generate", "ordered", "entities", "list", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L1008-L1034
106,066
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateRxInterface
private void generateRxInterface(String daoFactory, RxInterfaceType interfaceType, Class<?> clazz) { // create interfaces { ParameterizedTypeName parameterizedTypeName = ParameterizedTypeName.get(ClassName.get(clazz), TypeVariableName.get("T")); String preExecutorName = clazz.getSimpleName().replace("Emi...
java
private void generateRxInterface(String daoFactory, RxInterfaceType interfaceType, Class<?> clazz) { // create interfaces { ParameterizedTypeName parameterizedTypeName = ParameterizedTypeName.get(ClassName.get(clazz), TypeVariableName.get("T")); String preExecutorName = clazz.getSimpleName().replace("Emi...
[ "private", "void", "generateRxInterface", "(", "String", "daoFactory", ",", "RxInterfaceType", "interfaceType", ",", "Class", "<", "?", ">", "clazz", ")", "{", "// create interfaces", "{", "ParameterizedTypeName", "parameterizedTypeName", "=", "ParameterizedTypeName", "...
Generate rx interface. @param daoFactory the dao factory @param interfaceType the interface type @param clazz the clazz
[ "Generate", "rx", "interface", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L1311-L1347
106,067
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateEditor
private static void generateEditor(PrefsEntity entity) { com.abubusoft.kripton.common.Converter<String, String> converter = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_CAMEL); Builder innerClassBuilder = TypeSpec.classBuilder("BindEditor").addModifiers(Modifier.PUBLIC).addJavadoc("editor class for shared pr...
java
private static void generateEditor(PrefsEntity entity) { com.abubusoft.kripton.common.Converter<String, String> converter = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_CAMEL); Builder innerClassBuilder = TypeSpec.classBuilder("BindEditor").addModifiers(Modifier.PUBLIC).addJavadoc("editor class for shared pr...
[ "private", "static", "void", "generateEditor", "(", "PrefsEntity", "entity", ")", "{", "com", ".", "abubusoft", ".", "kripton", ".", "common", ".", "Converter", "<", "String", ",", "String", ">", "converter", "=", "CaseFormat", ".", "LOWER_CAMEL", ".", "conv...
create editor. @param entity the entity
[ "create", "editor", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L417-L464
106,068
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateInstance
private static void generateInstance(String className) { builder.addField(FieldSpec.builder(className(className), "instance", Modifier.PRIVATE, Modifier.STATIC).addJavadoc("instance of shared preferences\n").build()); // instance MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("getInstance").addModifi...
java
private static void generateInstance(String className) { builder.addField(FieldSpec.builder(className(className), "instance", Modifier.PRIVATE, Modifier.STATIC).addJavadoc("instance of shared preferences\n").build()); // instance MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("getInstance").addModifi...
[ "private", "static", "void", "generateInstance", "(", "String", "className", ")", "{", "builder", ".", "addField", "(", "FieldSpec", ".", "builder", "(", "className", "(", "className", ")", ",", "\"instance\"", ",", "Modifier", ".", "PRIVATE", ",", "Modifier",...
Generate instance of shared preferences. @param className the class name
[ "Generate", "instance", "of", "shared", "preferences", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L472-L486
106,069
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateRefresh
private static void generateRefresh(String sharedPreferenceName, String className) { MethodSpec.Builder method = MethodSpec.methodBuilder("refresh").addModifiers(Modifier.PUBLIC).addJavadoc("force to refresh values\n").returns(className(className)); method.addStatement("createPrefs()"); method.addStatement("retu...
java
private static void generateRefresh(String sharedPreferenceName, String className) { MethodSpec.Builder method = MethodSpec.methodBuilder("refresh").addModifiers(Modifier.PUBLIC).addJavadoc("force to refresh values\n").returns(className(className)); method.addStatement("createPrefs()"); method.addStatement("retu...
[ "private", "static", "void", "generateRefresh", "(", "String", "sharedPreferenceName", ",", "String", "className", ")", "{", "MethodSpec", ".", "Builder", "method", "=", "MethodSpec", ".", "methodBuilder", "(", "\"refresh\"", ")", ".", "addModifiers", "(", "Modifi...
Generate refresh. @param sharedPreferenceName the shared preference name @param className the class name
[ "Generate", "refresh", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L521-L527
106,070
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateResetMethod
private static void generateResetMethod(PrefsEntity entity) { // write method MethodSpec.Builder method = MethodSpec.methodBuilder("reset").addModifiers(Modifier.PUBLIC).addJavadoc("reset shared preferences\n").returns(Void.TYPE); if (entity.isImmutablePojo()) { ImmutableUtility.generateImmutableVariableInit(...
java
private static void generateResetMethod(PrefsEntity entity) { // write method MethodSpec.Builder method = MethodSpec.methodBuilder("reset").addModifiers(Modifier.PUBLIC).addJavadoc("reset shared preferences\n").returns(Void.TYPE); if (entity.isImmutablePojo()) { ImmutableUtility.generateImmutableVariableInit(...
[ "private", "static", "void", "generateResetMethod", "(", "PrefsEntity", "entity", ")", "{", "// write method", "MethodSpec", ".", "Builder", "method", "=", "MethodSpec", ".", "methodBuilder", "(", "\"reset\"", ")", ".", "addModifiers", "(", "Modifier", ".", "PUBLI...
Generate reset method. @param entity the entity
[ "Generate", "reset", "method", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L535-L548
106,071
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateWriteMethod
private static void generateWriteMethod(PrefsEntity entity) { // write method MethodSpec.Builder method = MethodSpec.methodBuilder("write").addJavadoc("write bean entirely\n\n").addJavadoc("@param bean bean to entirely write\n").addModifiers(Modifier.PUBLIC) .addParameter(typeName(entity.getName()), "bean").ret...
java
private static void generateWriteMethod(PrefsEntity entity) { // write method MethodSpec.Builder method = MethodSpec.methodBuilder("write").addJavadoc("write bean entirely\n\n").addJavadoc("@param bean bean to entirely write\n").addModifiers(Modifier.PUBLIC) .addParameter(typeName(entity.getName()), "bean").ret...
[ "private", "static", "void", "generateWriteMethod", "(", "PrefsEntity", "entity", ")", "{", "// write method", "MethodSpec", ".", "Builder", "method", "=", "MethodSpec", ".", "methodBuilder", "(", "\"write\"", ")", ".", "addJavadoc", "(", "\"write bean entirely\\n\\n\...
Generate write method. @param entity the entity
[ "Generate", "write", "method", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L556-L576
106,072
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateReadMethod
private static void generateReadMethod(PrefsEntity entity) { // read method MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("read").addModifiers(Modifier.PUBLIC).addJavadoc("read bean entirely\n\n").addJavadoc("@return read bean\n") .returns(typeName(entity.getName())); // immutable management ...
java
private static void generateReadMethod(PrefsEntity entity) { // read method MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("read").addModifiers(Modifier.PUBLIC).addJavadoc("read bean entirely\n\n").addJavadoc("@return read bean\n") .returns(typeName(entity.getName())); // immutable management ...
[ "private", "static", "void", "generateReadMethod", "(", "PrefsEntity", "entity", ")", "{", "// read method", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"read\"", ")", ".", "addModifiers", "(", "Modifier", ".", "P...
Generate read method. @param entity the entity
[ "Generate", "read", "method", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L584-L625
106,073
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java
BindSharedPreferencesBuilder.generateSingleReadMethod
private static void generateSingleReadMethod(PrefsEntity entity) { // read method PrefsTransform transform; Converter<String, String> converter = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_CAMEL); for (PrefsProperty item : entity.getCollection()) { MethodSpec.Builder methodBuilder = MethodSpec.meth...
java
private static void generateSingleReadMethod(PrefsEntity entity) { // read method PrefsTransform transform; Converter<String, String> converter = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_CAMEL); for (PrefsProperty item : entity.getCollection()) { MethodSpec.Builder methodBuilder = MethodSpec.meth...
[ "private", "static", "void", "generateSingleReadMethod", "(", "PrefsEntity", "entity", ")", "{", "// read method", "PrefsTransform", "transform", ";", "Converter", "<", "String", ",", "String", ">", "converter", "=", "CaseFormat", ".", "LOWER_CAMEL", ".", "converter...
Generate single read method. @param entity the entity
[ "Generate", "single", "read", "method", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L633-L654
106,074
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/AbstractMapper.java
AbstractMapper.serialize
protected void serialize(BinderContext context, E object, SerializerWrapper serializerWrapper, boolean writeStartAndEnd) throws Exception { switch (context.getSupportedFormat()) { case XML: try { XmlWrapperSerializer wrapper = ((XmlWrapperSerializer) serializerWrapper); XMLSerializer xmlSerializer=wrapp...
java
protected void serialize(BinderContext context, E object, SerializerWrapper serializerWrapper, boolean writeStartAndEnd) throws Exception { switch (context.getSupportedFormat()) { case XML: try { XmlWrapperSerializer wrapper = ((XmlWrapperSerializer) serializerWrapper); XMLSerializer xmlSerializer=wrapp...
[ "protected", "void", "serialize", "(", "BinderContext", "context", ",", "E", "object", ",", "SerializerWrapper", "serializerWrapper", ",", "boolean", "writeStartAndEnd", ")", "throws", "Exception", "{", "switch", "(", "context", ".", "getSupportedFormat", "(", ")", ...
Serialize an object using the contxt and the serializerWrapper. @param context the context @param object the object @param serializerWrapper the serializer wrapper @param writeStartAndEnd the write start and end @throws Exception the exception
[ "Serialize", "an", "object", "using", "the", "contxt", "and", "the", "serializerWrapper", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/AbstractMapper.java#L111-L139
106,075
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asSet
@SuppressWarnings("unchecked") public static <T> Set<T> asSet(Class<T> itemType, T... objects) { LinkedHashSet<T> result = new LinkedHashSet<T>(); for (T item : objects) { result.add(item); } return result; }
java
@SuppressWarnings("unchecked") public static <T> Set<T> asSet(Class<T> itemType, T... objects) { LinkedHashSet<T> result = new LinkedHashSet<T>(); for (T item : objects) { result.add(item); } return result; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "Set", "<", "T", ">", "asSet", "(", "Class", "<", "T", ">", "itemType", ",", "T", "...", "objects", ")", "{", "LinkedHashSet", "<", "T", ">", "result", "=", "new",...
create a collection set, with initial values. @param <T> the generic type @param itemType the item type @param objects the objects @return the sets the
[ "create", "a", "collection", "set", "with", "initial", "values", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L42-L51
106,076
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asList
public static <E extends List<Boolean>> E asList(boolean[] array, Class<E> listType) { E result; try { result = listType.newInstance(); for (Object item : array) { result.add((boolean) item); } return result; } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); ...
java
public static <E extends List<Boolean>> E asList(boolean[] array, Class<E> listType) { E result; try { result = listType.newInstance(); for (Object item : array) { result.add((boolean) item); } return result; } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); ...
[ "public", "static", "<", "E", "extends", "List", "<", "Boolean", ">", ">", "E", "asList", "(", "boolean", "[", "]", "array", ",", "Class", "<", "E", ">", "listType", ")", "{", "E", "result", ";", "try", "{", "result", "=", "listType", ".", "newInst...
As list. @param <E> the element type @param array the array @param listType the list type @return the e
[ "As", "list", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L282-L296
106,077
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asByteTypeArray
public static byte[] asByteTypeArray(List<Byte> input) { byte[] result = new byte[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static byte[] asByteTypeArray(List<Byte> input) { byte[] result = new byte[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "byte", "[", "]", "asByteTypeArray", "(", "List", "<", "Byte", ">", "input", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i"...
As byte type array. @param input the input @return the byte[]
[ "As", "byte", "type", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L464-L472
106,078
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asCharacterTypeArray
public static char[] asCharacterTypeArray(List<Character> input) { char[] result = new char[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static char[] asCharacterTypeArray(List<Character> input) { char[] result = new char[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "char", "[", "]", "asCharacterTypeArray", "(", "List", "<", "Character", ">", "input", ")", "{", "char", "[", "]", "result", "=", "new", "char", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ...
As character type array. @param input the input @return the char[]
[ "As", "character", "type", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L480-L488
106,079
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asShortTypeArray
public static short[] asShortTypeArray(List<Short> input) { short[] result = new short[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static short[] asShortTypeArray(List<Short> input) { short[] result = new short[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "short", "[", "]", "asShortTypeArray", "(", "List", "<", "Short", ">", "input", ")", "{", "short", "[", "]", "result", "=", "new", "short", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", ...
As short type array. @param input the input @return the short[]
[ "As", "short", "type", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L496-L504
106,080
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asIntegerTypeArray
public static int[] asIntegerTypeArray(List<Integer> input) { int[] result = new int[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static int[] asIntegerTypeArray(List<Integer> input) { int[] result = new int[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "int", "[", "]", "asIntegerTypeArray", "(", "List", "<", "Integer", ">", "input", ")", "{", "int", "[", "]", "result", "=", "new", "int", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", ...
As integer type array. @param input the input @return the int[]
[ "As", "integer", "type", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L512-L520
106,081
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asLongTypeArray
public static long[] asLongTypeArray(List<Long> input) { long[] result = new long[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static long[] asLongTypeArray(List<Long> input) { long[] result = new long[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "long", "[", "]", "asLongTypeArray", "(", "List", "<", "Long", ">", "input", ")", "{", "long", "[", "]", "result", "=", "new", "long", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i"...
As long type array. @param input the input @return the long[]
[ "As", "long", "type", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L528-L536
106,082
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asFloatTypeArray
public static float[] asFloatTypeArray(List<Float> input) { float[] result = new float[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static float[] asFloatTypeArray(List<Float> input) { float[] result = new float[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "float", "[", "]", "asFloatTypeArray", "(", "List", "<", "Float", ">", "input", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", ...
As float type array. @param input the input @return the float[]
[ "As", "float", "type", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L544-L552
106,083
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asStringArray
public static String[] asStringArray(List<String> input) { String[] result = new String[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static String[] asStringArray(List<String> input) { String[] result = new String[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "String", "[", "]", "asStringArray", "(", "List", "<", "String", ">", "input", ")", "{", "String", "[", "]", "result", "=", "new", "String", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";",...
As string array. @param input the input @return the string[]
[ "As", "string", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L576-L584
106,084
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asBooleanArray
public static Boolean[] asBooleanArray(List<Boolean> input) { Boolean[] result = new Boolean[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static Boolean[] asBooleanArray(List<Boolean> input) { Boolean[] result = new Boolean[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "Boolean", "[", "]", "asBooleanArray", "(", "List", "<", "Boolean", ">", "input", ")", "{", "Boolean", "[", "]", "result", "=", "new", "Boolean", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ...
As boolean array. @param input the input @return the boolean[]
[ "As", "boolean", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L592-L600
106,085
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asArray
public static <E> E[] asArray(List<E> input, E[] newArray) { return input.toArray(newArray); }
java
public static <E> E[] asArray(List<E> input, E[] newArray) { return input.toArray(newArray); }
[ "public", "static", "<", "E", ">", "E", "[", "]", "asArray", "(", "List", "<", "E", ">", "input", ",", "E", "[", "]", "newArray", ")", "{", "return", "input", ".", "toArray", "(", "newArray", ")", ";", "}" ]
As array. @param <E> the element type @param input the input @param newArray the new array @return the e[]
[ "As", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L690-L692
106,086
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.asDoubleArray
public static Double[] asDoubleArray(List<Double> input) { Double[] result = new Double[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
java
public static Double[] asDoubleArray(List<Double> input) { Double[] result = new Double[input.size()]; for (int i = 0; i < result.length; i++) { result[i] = input.get(i); } return result; }
[ "public", "static", "Double", "[", "]", "asDoubleArray", "(", "List", "<", "Double", ">", "input", ")", "{", "Double", "[", "]", "result", "=", "new", "Double", "[", "input", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";",...
As double array. @param input the input @return the double[]
[ "As", "double", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L716-L724
106,087
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java
CollectionUtils.trim
public static void trim(List<String> value) { if (value==null) return; for (int i=0; i<value.size(); i++) { value.set(i, value.get(i).trim()); } }
java
public static void trim(List<String> value) { if (value==null) return; for (int i=0; i<value.size(); i++) { value.set(i, value.get(i).trim()); } }
[ "public", "static", "void", "trim", "(", "List", "<", "String", ">", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "value", ".", "size", "(", ")", ";", "i", "++", ")"...
trim each element of lists. @param value the value
[ "trim", "each", "element", "of", "lists", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CollectionUtils.java#L731-L737
106,088
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLReplacerListenerImpl.java
JQLReplacerListenerImpl.resolveFullyQualifiedColumnName
public static String resolveFullyQualifiedColumnName(SQLiteDatabaseSchema schema, SQLiteModelMethod method, String className, String columnName) { Finder<SQLProperty> currentEntity = method.getEntity(); if (StringUtils.hasText(className)) { currentEntity = schema.getEntityBySimpleName(className); AssertKripto...
java
public static String resolveFullyQualifiedColumnName(SQLiteDatabaseSchema schema, SQLiteModelMethod method, String className, String columnName) { Finder<SQLProperty> currentEntity = method.getEntity(); if (StringUtils.hasText(className)) { currentEntity = schema.getEntityBySimpleName(className); AssertKripto...
[ "public", "static", "String", "resolveFullyQualifiedColumnName", "(", "SQLiteDatabaseSchema", "schema", ",", "SQLiteModelMethod", "method", ",", "String", "className", ",", "String", "columnName", ")", "{", "Finder", "<", "SQLProperty", ">", "currentEntity", "=", "met...
given a fully qualified property name, it will be transformed in associated column name. If class or property does not exist, an exception will be thrown @param schema the schema @param method the method @param className the class name @param columnName the property name @return resolved name ex: "person.birth_date"
[ "given", "a", "fully", "qualified", "property", "name", "it", "will", "be", "transformed", "in", "associated", "column", "name", ".", "If", "class", "or", "property", "does", "not", "exist", "an", "exception", "will", "be", "thrown" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLReplacerListenerImpl.java#L268-L279
106,089
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.isLiveData
public static boolean isLiveData(SQLiteModelMethod methodDefinition) { boolean result = false; TypeName returnTypeName = methodDefinition.getReturnClass(); if (returnTypeName instanceof ParameterizedTypeName) { ParameterizedTypeName returnParameterizedTypeName = (ParameterizedTypeName) returnTypeName; Clas...
java
public static boolean isLiveData(SQLiteModelMethod methodDefinition) { boolean result = false; TypeName returnTypeName = methodDefinition.getReturnClass(); if (returnTypeName instanceof ParameterizedTypeName) { ParameterizedTypeName returnParameterizedTypeName = (ParameterizedTypeName) returnTypeName; Clas...
[ "public", "static", "boolean", "isLiveData", "(", "SQLiteModelMethod", "methodDefinition", ")", "{", "boolean", "result", "=", "false", ";", "TypeName", "returnTypeName", "=", "methodDefinition", ".", "getReturnClass", "(", ")", ";", "if", "(", "returnTypeName", "...
Checks if is live data. @param methodDefinition the method definition @return true, if is live data
[ "Checks", "if", "is", "live", "data", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L509-L531
106,090
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.getJQLDeclared
private String getJQLDeclared() { ModelAnnotation inserAnnotation = this.getAnnotation(BindSqlInsert.class); ModelAnnotation updateAnnotation = this.getAnnotation(BindSqlUpdate.class); ModelAnnotation selectAnnotation = this.getAnnotation(BindSqlSelect.class); ModelAnnotation deleteAnnotation = this.getAnnotati...
java
private String getJQLDeclared() { ModelAnnotation inserAnnotation = this.getAnnotation(BindSqlInsert.class); ModelAnnotation updateAnnotation = this.getAnnotation(BindSqlUpdate.class); ModelAnnotation selectAnnotation = this.getAnnotation(BindSqlSelect.class); ModelAnnotation deleteAnnotation = this.getAnnotati...
[ "private", "String", "getJQLDeclared", "(", ")", "{", "ModelAnnotation", "inserAnnotation", "=", "this", ".", "getAnnotation", "(", "BindSqlInsert", ".", "class", ")", ";", "ModelAnnotation", "updateAnnotation", "=", "this", ".", "getAnnotation", "(", "BindSqlUpdate...
Gets the JQL declared. @return the JQL declared
[ "Gets", "the", "JQL", "declared", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L549-L605
106,091
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.findStringDynamicStatement
private <A extends Annotation> void findStringDynamicStatement(SQLiteDaoDefinition parent, Class<A> annotationClazz, List<Class<? extends Annotation>> unsupportedQueryType, OnFoundDynamicParameter listener) { int counter = 0; for (VariableElement p : element.getParameters()) { A annotation = p.getAnnotation(...
java
private <A extends Annotation> void findStringDynamicStatement(SQLiteDaoDefinition parent, Class<A> annotationClazz, List<Class<? extends Annotation>> unsupportedQueryType, OnFoundDynamicParameter listener) { int counter = 0; for (VariableElement p : element.getParameters()) { A annotation = p.getAnnotation(...
[ "private", "<", "A", "extends", "Annotation", ">", "void", "findStringDynamicStatement", "(", "SQLiteDaoDefinition", "parent", ",", "Class", "<", "A", ">", "annotationClazz", ",", "List", "<", "Class", "<", "?", "extends", "Annotation", ">", ">", "unsupportedQue...
Look for a method parameter which is annotated with an annotationClass annotation. When it is found, a client action is required through listener. @param <A> the generic type @param parent the parent @param annotationClazz the annotation clazz @param unsupportedQueryType the unsupported query type @param listener the ...
[ "Look", "for", "a", "method", "parameter", "which", "is", "annotated", "with", "an", "annotationClass", "annotation", ".", "When", "it", "is", "found", "a", "client", "action", "is", "required", "through", "listener", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L649-L670
106,092
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.findParameterAliasByName
public String findParameterAliasByName(String name) { if (parameterName2Alias.containsKey(name)) { return parameterName2Alias.get(name); } return name; }
java
public String findParameterAliasByName(String name) { if (parameterName2Alias.containsKey(name)) { return parameterName2Alias.get(name); } return name; }
[ "public", "String", "findParameterAliasByName", "(", "String", "name", ")", "{", "if", "(", "parameterName2Alias", ".", "containsKey", "(", "name", ")", ")", "{", "return", "parameterName2Alias", ".", "get", "(", "name", ")", ";", "}", "return", "name", ";",...
Retrieve for a method's parameter its alias, used to work with queries. If no alias is present, typeName will be used. @param name the name @return the string
[ "Retrieve", "for", "a", "method", "s", "parameter", "its", "alias", "used", "to", "work", "with", "queries", ".", "If", "no", "alias", "is", "present", "typeName", "will", "be", "used", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L719-L725
106,093
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.getAdapterForParam
public TypeName getAdapterForParam(String paramName) { if (this.hasAdapterForParam(paramName)) { return TypeUtility.typeName(this.parameterName2Adapter.get(paramName)); } else { return null; } }
java
public TypeName getAdapterForParam(String paramName) { if (this.hasAdapterForParam(paramName)) { return TypeUtility.typeName(this.parameterName2Adapter.get(paramName)); } else { return null; } }
[ "public", "TypeName", "getAdapterForParam", "(", "String", "paramName", ")", "{", "if", "(", "this", ".", "hasAdapterForParam", "(", "paramName", ")", ")", "{", "return", "TypeUtility", ".", "typeName", "(", "this", ".", "parameterName2Adapter", ".", "get", "(...
Gets the adapter for param. @param paramName the param name @return the adapter for param
[ "Gets", "the", "adapter", "for", "param", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L906-L912
106,094
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.findEntityProperty
public String findEntityProperty() { SQLiteEntity entity = getEntity(); for (Pair<String, TypeName> item : this.parameters) { if (item.value1.equals(TypeUtility.typeName(entity.getElement()))) { return item.value0; } } return null; }
java
public String findEntityProperty() { SQLiteEntity entity = getEntity(); for (Pair<String, TypeName> item : this.parameters) { if (item.value1.equals(TypeUtility.typeName(entity.getElement()))) { return item.value0; } } return null; }
[ "public", "String", "findEntityProperty", "(", ")", "{", "SQLiteEntity", "entity", "=", "getEntity", "(", ")", ";", "for", "(", "Pair", "<", "String", ",", "TypeName", ">", "item", ":", "this", ".", "parameters", ")", "{", "if", "(", "item", ".", "valu...
Find entity property. @return the string
[ "Find", "entity", "property", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L919-L928
106,095
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java
SQLiteModelMethod.buildPreparedStatementName
public String buildPreparedStatementName() { if (!StringUtils.hasText(preparedStatementName)) { preparedStatementName = getParent().buildPreparedStatementName(getName()); } return preparedStatementName; }
java
public String buildPreparedStatementName() { if (!StringUtils.hasText(preparedStatementName)) { preparedStatementName = getParent().buildPreparedStatementName(getName()); } return preparedStatementName; }
[ "public", "String", "buildPreparedStatementName", "(", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "preparedStatementName", ")", ")", "{", "preparedStatementName", "=", "getParent", "(", ")", ".", "buildPreparedStatementName", "(", "getName", "("...
Builds the prepared statement name. @return the string
[ "Builds", "the", "prepared", "statement", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteModelMethod.java#L938-L943
106,096
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java
StringUtils.checkSize
public static String checkSize(Object value, int limitSize, String defaultValue) { if (value != null) { if (byte[].class.getSimpleName().equals(value.getClass().getSimpleName())) { return checkSize((byte[]) value, limitSize/2); } String str = value.toString(); if (str.length() > limitSize) { retu...
java
public static String checkSize(Object value, int limitSize, String defaultValue) { if (value != null) { if (byte[].class.getSimpleName().equals(value.getClass().getSimpleName())) { return checkSize((byte[]) value, limitSize/2); } String str = value.toString(); if (str.length() > limitSize) { retu...
[ "public", "static", "String", "checkSize", "(", "Object", "value", ",", "int", "limitSize", ",", "String", "defaultValue", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "byte", "[", "]", ".", "class", ".", "getSimpleName", "(", ")", ...
limit string size. @param value the value @param limitSize the limit size @param defaultValue the default value @return the string
[ "limit", "string", "size", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L76-L90
106,097
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java
StringUtils.bytesToHex
public static String bytesToHex(byte[] bytes, int size) { size=Math.min(bytes.length, size); char[] hexChars = new char[size * 2]; for ( int j = 0; j < size; j++ ) { int v = bytes[j] & 0xFF; hexChars[j * 2] = hexArray[v >>> 4]; hexChars[j * 2 + 1] = hexArray[v & 0x0F]; } ...
java
public static String bytesToHex(byte[] bytes, int size) { size=Math.min(bytes.length, size); char[] hexChars = new char[size * 2]; for ( int j = 0; j < size; j++ ) { int v = bytes[j] & 0xFF; hexChars[j * 2] = hexArray[v >>> 4]; hexChars[j * 2 + 1] = hexArray[v & 0x0F]; } ...
[ "public", "static", "String", "bytesToHex", "(", "byte", "[", "]", "bytes", ",", "int", "size", ")", "{", "size", "=", "Math", ".", "min", "(", "bytes", ".", "length", ",", "size", ")", ";", "char", "[", "]", "hexChars", "=", "new", "char", "[", ...
Bytes to hex. @param bytes the bytes @param size the size @return the string
[ "Bytes", "to", "hex", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L102-L111
106,098
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java
StringUtils.checkSize
public static String checkSize(byte[] value, int limitSize) { if (value != null) { if (value.length > limitSize) { return bytesToHex(value, limitSize-3) + "..."; } else return bytesToHex(value, value.length); } else return null; }
java
public static String checkSize(byte[] value, int limitSize) { if (value != null) { if (value.length > limitSize) { return bytesToHex(value, limitSize-3) + "..."; } else return bytesToHex(value, value.length); } else return null; }
[ "public", "static", "String", "checkSize", "(", "byte", "[", "]", "value", ",", "int", "limitSize", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "value", ".", "length", ">", "limitSize", ")", "{", "return", "bytesToHex", "(", "val...
Check size. @param value the value @param limitSize the limit size @return the string
[ "Check", "size", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L120-L129
106,099
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java
StringUtils.formatParam
public static String formatParam(Object value, String delimiter) { if (value != null) { if (byte[].class.getSimpleName().equals(value.getClass().getSimpleName())) { return checkSize((byte[]) value, VIEW_SIZE); } String str = value.toString(); if (str.length() > VIEW_SIZE) { return delimiter + str...
java
public static String formatParam(Object value, String delimiter) { if (value != null) { if (byte[].class.getSimpleName().equals(value.getClass().getSimpleName())) { return checkSize((byte[]) value, VIEW_SIZE); } String str = value.toString(); if (str.length() > VIEW_SIZE) { return delimiter + str...
[ "public", "static", "String", "formatParam", "(", "Object", "value", ",", "String", "delimiter", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "byte", "[", "]", ".", "class", ".", "getSimpleName", "(", ")", ".", "equals", "(", "val...
format as sql parameter. If value is not null, method will return 'value'. If value is not null, delimiter will be used to delimit return value. Otherwise, defaultValue will be returned, without delimiter. @param value the value @param delimiter the delimiter @return the string
[ "format", "as", "sql", "parameter", ".", "If", "value", "is", "not", "null", "method", "will", "return", "value", ".", "If", "value", "is", "not", "null", "delimiter", "will", "be", "used", "to", "delimit", "return", "value", ".", "Otherwise", "defaultValu...
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L140-L154