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
105,900
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java
RevisionEncoder.encodeDelete
private void encodeDelete(final DiffPart part) throws EncodingException { // C data.writeBit(0); data.writeBit(1); data.writeBit(1); // S data.writeValue(codecData.getBlocksizeS(), part.getStart()); // E data.writeValue(codecData.getBlocksizeE(), part.getLength()); data.writeFillBits(); }
java
private void encodeDelete(final DiffPart part) throws EncodingException { // C data.writeBit(0); data.writeBit(1); data.writeBit(1); // S data.writeValue(codecData.getBlocksizeS(), part.getStart()); // E data.writeValue(codecData.getBlocksizeE(), part.getLength()); data.writeFillBits(); }
[ "private", "void", "encodeDelete", "(", "final", "DiffPart", "part", ")", "throws", "EncodingException", "{", "// C", "data", ".", "writeBit", "(", "0", ")", ";", "data", ".", "writeBit", "(", "1", ")", ";", "data", ".", "writeBit", "(", "1", ")", ";",...
Encodes a Delete operation. @param part Reference to the Delete operation @throws EncodingException if the encoding failed
[ "Encodes", "a", "Delete", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java#L253-L269
105,901
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java
RevisionEncoder.encodeFullRevisionUncompressed
private void encodeFullRevisionUncompressed(final DiffPart part) throws UnsupportedEncodingException, EncodingException { // C data.writeBit(0); data.writeBit(0); data.writeBit(1); // L T String text = part.getText(); byte[] bText = text.getBytes(WIKIPEDIA_ENCODING); data.writeValue(codecData.getB...
java
private void encodeFullRevisionUncompressed(final DiffPart part) throws UnsupportedEncodingException, EncodingException { // C data.writeBit(0); data.writeBit(0); data.writeBit(1); // L T String text = part.getText(); byte[] bText = text.getBytes(WIKIPEDIA_ENCODING); data.writeValue(codecData.getB...
[ "private", "void", "encodeFullRevisionUncompressed", "(", "final", "DiffPart", "part", ")", "throws", "UnsupportedEncodingException", ",", "EncodingException", "{", "// C", "data", ".", "writeBit", "(", "0", ")", ";", "data", ".", "writeBit", "(", "0", ")", ";",...
Encodes a FullRevision operation. @param part Reference to the FullRevision operation @throws UnsupportedEncodingException if the character encoding is unsupported @throws EncodingException if the encoding failed
[ "Encodes", "a", "FullRevision", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java#L329-L345
105,902
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java
RevisionEncoder.encodePaste
private void encodePaste(final DiffPart part) throws EncodingException { // C data.writeBit(1); data.writeBit(1); data.writeBit(0); // S data.writeValue(codecData.getBlocksizeS(), part.getStart()); // B data.writeValue(codecData.getBlocksizeB(), Integer.parseInt(part.getText())); data.write...
java
private void encodePaste(final DiffPart part) throws EncodingException { // C data.writeBit(1); data.writeBit(1); data.writeBit(0); // S data.writeValue(codecData.getBlocksizeS(), part.getStart()); // B data.writeValue(codecData.getBlocksizeB(), Integer.parseInt(part.getText())); data.write...
[ "private", "void", "encodePaste", "(", "final", "DiffPart", "part", ")", "throws", "EncodingException", "{", "// C", "data", ".", "writeBit", "(", "1", ")", ";", "data", ".", "writeBit", "(", "1", ")", ";", "data", ".", "writeBit", "(", "0", ")", ";", ...
Encodes a Paste operation. @param part Reference to the Paste operation @throws EncodingException if the encoding failed
[ "Encodes", "a", "Paste", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java#L387-L404
105,903
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/XmlDumpReader.java
XmlDumpReader.readDump
public void readDump() throws IOException { try { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); SAXParser parser = factory.newSAXParser(); parser.parse(input, this); } catch (ParserConfigurationException e) { throw (IOE...
java
public void readDump() throws IOException { try { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); SAXParser parser = factory.newSAXParser(); parser.parse(input, this); } catch (ParserConfigurationException e) { throw (IOE...
[ "public", "void", "readDump", "(", ")", "throws", "IOException", "{", "try", "{", "SAXParserFactory", "factory", "=", "SAXParserFactory", ".", "newInstance", "(", ")", ";", "factory", ".", "setFeature", "(", "XMLConstants", ".", "FEATURE_SECURE_PROCESSING", ",", ...
Reads through the entire XML dump on the input stream, sending events to the DumpWriter as it goes. May throw exceptions on invalid input or due to problems with the output. @throws IOException
[ "Reads", "through", "the", "entire", "XML", "dump", "on", "the", "input", "stream", "sending", "events", "to", "the", "DumpWriter", "as", "it", "goes", ".", "May", "throw", "exceptions", "on", "invalid", "input", "or", "due", "to", "problems", "with", "the...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/XmlDumpReader.java#L84-L97
105,904
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/indices/ChronoIndexData.java
ChronoIndexData.compareTo
public int compareTo(final ChronoIndexData info) { long value; if (chronoSort) { value = this.time - info.time; } else { value = this.revisionCounter - info.revisionCounter; } if (value == 0) { return 0; } else if (value > 0) { return 1; } else { return -1; } }
java
public int compareTo(final ChronoIndexData info) { long value; if (chronoSort) { value = this.time - info.time; } else { value = this.revisionCounter - info.revisionCounter; } if (value == 0) { return 0; } else if (value > 0) { return 1; } else { return -1; } }
[ "public", "int", "compareTo", "(", "final", "ChronoIndexData", "info", ")", "{", "long", "value", ";", "if", "(", "chronoSort", ")", "{", "value", "=", "this", ".", "time", "-", "info", ".", "time", ";", "}", "else", "{", "value", "=", "this", ".", ...
Compares this ChronoInfo to the given info. @return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
[ "Compares", "this", "ChronoInfo", "to", "the", "given", "info", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/indices/ChronoIndexData.java#L67-L88
105,905
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPagesContainingTemplateNames
public Iterable<Page> getPagesContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPages(templateNames, true); }
java
public Iterable<Page> getPagesContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPages(templateNames, true); }
[ "public", "Iterable", "<", "Page", ">", "getPagesContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPages", "(", "templateNames", ",", "true", ")", ";", "}" ]
Return an iterable containing all pages that contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return An iterable with the page objects that contain any of the the specified templates @throws WikiApiException If there was any err...
[ "Return", "an", "iterable", "containing", "all", "pages", "that", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L511-L513
105,906
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPagesNotContainingTemplateNames
public Iterable<Page> getPagesNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPages(templateNames, false); }
java
public Iterable<Page> getPagesNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPages(templateNames, false); }
[ "public", "Iterable", "<", "Page", ">", "getPagesNotContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPages", "(", "templateNames", ",", "false", ")", ";", "}" ]
Return an iterable containing all pages that do NOT contain a template the name of which equals of the given Strings. @param templateNames the names of the template that we want to match @return An iterable with the page objects that do NOT contain any of the the specified templates @throws WikiApiException If there w...
[ "Return", "an", "iterable", "containing", "all", "pages", "that", "do", "NOT", "contain", "a", "template", "the", "name", "of", "which", "equals", "of", "the", "given", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L527-L529
105,907
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getRevisionsWithFirstTemplateAppearance
public List<Integer> getRevisionsWithFirstTemplateAppearance(String templateName) throws WikiApiException{ /* * Note: This method does not use any revision-template-index. Each revision has to be parsed until the first revision is found that does not contain a certain template. * TODO also create versi...
java
public List<Integer> getRevisionsWithFirstTemplateAppearance(String templateName) throws WikiApiException{ /* * Note: This method does not use any revision-template-index. Each revision has to be parsed until the first revision is found that does not contain a certain template. * TODO also create versi...
[ "public", "List", "<", "Integer", ">", "getRevisionsWithFirstTemplateAppearance", "(", "String", "templateName", ")", "throws", "WikiApiException", "{", "/*\n \t * Note: This method does not use any revision-template-index. Each revision has to be parsed until the first revision is foun...
This method first creates a list of pages containing templates that equal any of the provided Strings. It then returns a list of revision ids of the revisions in which the respective templates first appeared. @param templateName the template names that have to be matched @return An list with the revision ids of the fi...
[ "This", "method", "first", "creates", "a", "list", "of", "pages", "containing", "templates", "that", "equal", "any", "of", "the", "provided", "Strings", ".", "It", "then", "returns", "a", "list", "of", "revision", "ids", "of", "the", "revisions", "in", "wh...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L545-L614
105,908
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getIdsOfPagesThatEverContainedTemplateNames
public List<Integer> getIdsOfPagesThatEverContainedTemplateNames(List<String> templateNames) throws WikiApiException{ if(revApi==null){ revApi = new RevisionApi(wiki.getDatabaseConfiguration()); } Set<Integer> pageIdSet = new HashSet<Integer>(); //TODO instead of getting rev ids and then gett...
java
public List<Integer> getIdsOfPagesThatEverContainedTemplateNames(List<String> templateNames) throws WikiApiException{ if(revApi==null){ revApi = new RevisionApi(wiki.getDatabaseConfiguration()); } Set<Integer> pageIdSet = new HashSet<Integer>(); //TODO instead of getting rev ids and then gett...
[ "public", "List", "<", "Integer", ">", "getIdsOfPagesThatEverContainedTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "if", "(", "revApi", "==", "null", ")", "{", "revApi", "=", "new", "RevisionApi", "(",...
Returns the ids of all pages that ever contained any of the given template names in the history of their existence. @param templateNames template names to look for @return list of page ids of the pages that once contained any of the given template names @throws WikiApiException If there was any error retrieving the pa...
[ "Returns", "the", "ids", "of", "all", "pages", "that", "ever", "contained", "any", "of", "the", "given", "template", "names", "in", "the", "history", "of", "their", "existence", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L844-L860
105,909
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getIdsOfPagesThatEverContainedTemplateFragments
public List<Integer> getIdsOfPagesThatEverContainedTemplateFragments(List<String> templateFragments) throws WikiApiException{ if(revApi==null){ revApi = new RevisionApi(wiki.getDatabaseConfiguration()); } Set<Integer> pageIdSet = new HashSet<Integer>(); //TODO instead of getting rev ids and t...
java
public List<Integer> getIdsOfPagesThatEverContainedTemplateFragments(List<String> templateFragments) throws WikiApiException{ if(revApi==null){ revApi = new RevisionApi(wiki.getDatabaseConfiguration()); } Set<Integer> pageIdSet = new HashSet<Integer>(); //TODO instead of getting rev ids and t...
[ "public", "List", "<", "Integer", ">", "getIdsOfPagesThatEverContainedTemplateFragments", "(", "List", "<", "String", ">", "templateFragments", ")", "throws", "WikiApiException", "{", "if", "(", "revApi", "==", "null", ")", "{", "revApi", "=", "new", "RevisionApi"...
Returns the ids of all pages that ever contained any template that started with any of the given template fragments @param templateFragments template-fragments to look for @return list of page ids of the pages that once contained any template that started with any of the given template fragments @throws WikiApiExcepti...
[ "Returns", "the", "ids", "of", "all", "pages", "that", "ever", "contained", "any", "template", "that", "started", "with", "any", "of", "the", "given", "template", "fragments" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L870-L886
105,910
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPageIdsContainingTemplateNames
public List<Integer> getPageIdsContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, true); }
java
public List<Integer> getPageIdsContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, true); }
[ "public", "List", "<", "Integer", ">", "getPageIdsContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPageIds", "(", "templateNames", ",", "true", ")", ";", "}" ]
Returns a list containing the ids of all pages that contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return A list with the ids of all pages that contain any of the the specified templates @throws WikiApiException If there was a...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "pages", "that", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L975-L977
105,911
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPageIdsNotContainingTemplateNames
public List<Integer> getPageIdsNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, false); }
java
public List<Integer> getPageIdsNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, false); }
[ "public", "List", "<", "Integer", ">", "getPageIdsNotContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPageIds", "(", "templateNames", ",", "false", ")", ";", "}" ]
Returns a list containing the ids of all pages that do not contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return A list with the ids of all pages that do not contain any of the the specified templates @throws WikiApiException ...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "pages", "that", "do", "not", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L990-L992
105,912
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getRevisionIdsContainingTemplateNames
public List<Integer> getRevisionIdsContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredRevisionIds(templateNames, true); }
java
public List<Integer> getRevisionIdsContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredRevisionIds(templateNames, true); }
[ "public", "List", "<", "Integer", ">", "getRevisionIdsContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredRevisionIds", "(", "templateNames", ",", "true", ")", ";", "}" ]
Returns a list containing the ids of all revisions that contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return A list with the ids of all revisions that contain any of the the specified templates @throws WikiApiException If the...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "revisions", "that", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L1080-L1082
105,913
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getRevisionIdsNotContainingTemplateNames
public List<Integer> getRevisionIdsNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredRevisionIds(templateNames, false); }
java
public List<Integer> getRevisionIdsNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredRevisionIds(templateNames, false); }
[ "public", "List", "<", "Integer", ">", "getRevisionIdsNotContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredRevisionIds", "(", "templateNames", ",", "false", ")", ";", "}" ]
Returns a list containing the ids of all revisions that do not contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return A list with the ids of all revisions that do not contain any of the the specified templates @throws WikiApiEx...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "revisions", "that", "do", "not", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L1096-L1098
105,914
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getTemplateNamesFromRevision
public List<String> getTemplateNamesFromRevision(int revid) throws WikiApiException{ if(revid<1){ throw new WikiApiException("Revision ID must be > 0"); } try { PreparedStatement statement = null; ResultSet result = null; List<String> templateNames = new LinkedList<String>(); try...
java
public List<String> getTemplateNamesFromRevision(int revid) throws WikiApiException{ if(revid<1){ throw new WikiApiException("Revision ID must be > 0"); } try { PreparedStatement statement = null; ResultSet result = null; List<String> templateNames = new LinkedList<String>(); try...
[ "public", "List", "<", "String", ">", "getTemplateNamesFromRevision", "(", "int", "revid", ")", "throws", "WikiApiException", "{", "if", "(", "revid", "<", "1", ")", "{", "throw", "new", "WikiApiException", "(", "\"Revision ID must be > 0\"", ")", ";", "}", "t...
Returns the names of all templates contained in the specified revision. @param revid the revision id @return A List with the names of the templates contained in the specified revision @throws WikiApiException If there was any error retrieving the page object (most likely if the templates are corrupted)
[ "Returns", "the", "names", "of", "all", "templates", "contained", "in", "the", "specified", "revision", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L1204-L1242
105,915
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.revisionContainsTemplateFragment
public boolean revisionContainsTemplateFragment(int revId, String templateFragment) throws WikiApiException{ List<String> tplList = getTemplateNamesFromRevision(revId); for(String tpl:tplList){ if(tpl.toLowerCase().startsWith(templateFragment.toLowerCase())){ return true; } } retu...
java
public boolean revisionContainsTemplateFragment(int revId, String templateFragment) throws WikiApiException{ List<String> tplList = getTemplateNamesFromRevision(revId); for(String tpl:tplList){ if(tpl.toLowerCase().startsWith(templateFragment.toLowerCase())){ return true; } } retu...
[ "public", "boolean", "revisionContainsTemplateFragment", "(", "int", "revId", ",", "String", "templateFragment", ")", "throws", "WikiApiException", "{", "List", "<", "String", ">", "tplList", "=", "getTemplateNamesFromRevision", "(", "revId", ")", ";", "for", "(", ...
Determines whether a given revision contains a template starting witht the given fragment @param revId @param templateFragment @return @throws WikiApiException
[ "Determines", "whether", "a", "given", "revision", "contains", "a", "template", "starting", "witht", "the", "given", "fragment" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L1285-L1293
105,916
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.tableExists
public boolean tableExists(String table) throws SQLException { PreparedStatement statement = null; ResultSet result = null; try { statement = this.connection.prepareStatement("SHOW TABLES;"); result = execute(statement); if (result == null) { return false; } boolean found = false; while...
java
public boolean tableExists(String table) throws SQLException { PreparedStatement statement = null; ResultSet result = null; try { statement = this.connection.prepareStatement("SHOW TABLES;"); result = execute(statement); if (result == null) { return false; } boolean found = false; while...
[ "public", "boolean", "tableExists", "(", "String", "table", ")", "throws", "SQLException", "{", "PreparedStatement", "statement", "=", "null", ";", "ResultSet", "result", "=", "null", ";", "try", "{", "statement", "=", "this", ".", "connection", ".", "prepareS...
Checks if a specific table exists @param table the table to check @return true, if table exists, false else @throws SQLException if an error occurs connecting to or querying the db
[ "Checks", "if", "a", "specific", "table", "exists" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L1614-L1645
105,917
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoFullRevision.java
ChronoFullRevision.add
public void add(final ChronoStorageBlock block) { int revCount = block.getRevisionCounter(); this.size += block.length(); if (first == null) { first = block; } else { ChronoStorageBlock previous = null, current = first; do { if (revCount < current.getRevisionCounter()) { block.setCounte...
java
public void add(final ChronoStorageBlock block) { int revCount = block.getRevisionCounter(); this.size += block.length(); if (first == null) { first = block; } else { ChronoStorageBlock previous = null, current = first; do { if (revCount < current.getRevisionCounter()) { block.setCounte...
[ "public", "void", "add", "(", "final", "ChronoStorageBlock", "block", ")", "{", "int", "revCount", "=", "block", ".", "getRevisionCounter", "(", ")", ";", "this", ".", "size", "+=", "block", ".", "length", "(", ")", ";", "if", "(", "first", "==", "null...
Adds a ChonoStorageBlock to this chrono full revision object. @param block reference to the chrono storage block
[ "Adds", "a", "ChonoStorageBlock", "to", "this", "chrono", "full", "revision", "object", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoFullRevision.java#L111-L152
105,918
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoFullRevision.java
ChronoFullRevision.getNearest
public Revision getNearest(final int revisionCounter) { if (first != null) { ChronoStorageBlock previous = null, current = first; while (current != null && current.getRevisionCounter() <= revisionCounter) { previous = current; current = current.getCounterNext(); } return previous.getRev()...
java
public Revision getNearest(final int revisionCounter) { if (first != null) { ChronoStorageBlock previous = null, current = first; while (current != null && current.getRevisionCounter() <= revisionCounter) { previous = current; current = current.getCounterNext(); } return previous.getRev()...
[ "public", "Revision", "getNearest", "(", "final", "int", "revisionCounter", ")", "{", "if", "(", "first", "!=", "null", ")", "{", "ChronoStorageBlock", "previous", "=", "null", ",", "current", "=", "first", ";", "while", "(", "current", "!=", "null", "&&",...
Returns the nearest available revision to the specified revision counter. @param revisionCounter revision counter @return Revision
[ "Returns", "the", "nearest", "available", "revision", "to", "the", "specified", "revision", "counter", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoFullRevision.java#L161-L177
105,919
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoFullRevision.java
ChronoFullRevision.clean
public long clean(final int currentRevisionIndex, final int revisionIndex) { if (first == null) { return 0; } else if (this.set.isEmpty()) { this.first = null; this.size = 0; return 0; } ChronoStorageBlock next, prev, current = first; boolean remove; do { remove = false; if (current...
java
public long clean(final int currentRevisionIndex, final int revisionIndex) { if (first == null) { return 0; } else if (this.set.isEmpty()) { this.first = null; this.size = 0; return 0; } ChronoStorageBlock next, prev, current = first; boolean remove; do { remove = false; if (current...
[ "public", "long", "clean", "(", "final", "int", "currentRevisionIndex", ",", "final", "int", "revisionIndex", ")", "{", "if", "(", "first", "==", "null", ")", "{", "return", "0", ";", "}", "else", "if", "(", "this", ".", "set", ".", "isEmpty", "(", "...
Reduces the storage space. @param currentRevisionIndex index of the current revision @param revisionIndex index of the revision @return size of used storage
[ "Reduces", "the", "storage", "space", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoFullRevision.java#L270-L339
105,920
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/TemplateInfoGeneratorStarter.java
TemplateInfoGeneratorStarter.createSetFromProperty
public static HashSet<String> createSetFromProperty(String property) { HashSet<String> properties = new HashSet<String>(); if (property != null && !property.equals("null")) { // "([\\w]*)=([\\w]*);" Pattern params = Pattern.compile("([\\w]+)[;]*"); Matcher matcher = params.matcher(property.trim()); wh...
java
public static HashSet<String> createSetFromProperty(String property) { HashSet<String> properties = new HashSet<String>(); if (property != null && !property.equals("null")) { // "([\\w]*)=([\\w]*);" Pattern params = Pattern.compile("([\\w]+)[;]*"); Matcher matcher = params.matcher(property.trim()); wh...
[ "public", "static", "HashSet", "<", "String", ">", "createSetFromProperty", "(", "String", "property", ")", "{", "HashSet", "<", "String", ">", "properties", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "if", "(", "property", "!=", "null", "...
Parses property string into HashSet @param property string to parse @return
[ "Parses", "property", "string", "into", "HashSet" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/TemplateInfoGeneratorStarter.java#L249-L264
105,921
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/dump/xml/AbstractXmlDumpReader.java
AbstractXmlDumpReader.notAllowedStart
private boolean notAllowedStart(String startTag) { errorState = errorState && startElements.containsKey(startTag) && forbiddenIdStartElements.containsKey(startTag); return errorState; }
java
private boolean notAllowedStart(String startTag) { errorState = errorState && startElements.containsKey(startTag) && forbiddenIdStartElements.containsKey(startTag); return errorState; }
[ "private", "boolean", "notAllowedStart", "(", "String", "startTag", ")", "{", "errorState", "=", "errorState", "&&", "startElements", ".", "containsKey", "(", "startTag", ")", "&&", "forbiddenIdStartElements", ".", "containsKey", "(", "startTag", ")", ";", "return...
If error with wrong id tag occurs, the errorState flag will be set. In this case some start tags have to be ignored. @param startTag @return {@code true} if {@code startTag} is not allowed and will be ignored @see #setupForbiddenStartElements()
[ "If", "error", "with", "wrong", "id", "tag", "occurs", "the", "errorState", "flag", "will", "be", "set", ".", "In", "this", "case", "some", "start", "tags", "have", "to", "be", "ignored", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/dump/xml/AbstractXmlDumpReader.java#L232-L236
105,922
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/dump/xml/AbstractXmlDumpReader.java
AbstractXmlDumpReader.notAllowedEnd
private boolean notAllowedEnd(String endTag) { errorState = errorState && endElements.containsKey(endTag) && forbiddenIdEndElements.containsKey(endTag); return errorState; }
java
private boolean notAllowedEnd(String endTag) { errorState = errorState && endElements.containsKey(endTag) && forbiddenIdEndElements.containsKey(endTag); return errorState; }
[ "private", "boolean", "notAllowedEnd", "(", "String", "endTag", ")", "{", "errorState", "=", "errorState", "&&", "endElements", ".", "containsKey", "(", "endTag", ")", "&&", "forbiddenIdEndElements", ".", "containsKey", "(", "endTag", ")", ";", "return", "errorS...
If error with wrong id tag occurs, the errorState flag will be set. In this case some end tags have to be ignored. @param endTag @return {@code true} if {@code endTag} is not allowed and will be ignored @see #setupForbiddenEndElements()
[ "If", "error", "with", "wrong", "id", "tag", "occurs", "the", "errorState", "flag", "will", "be", "set", ".", "In", "this", "case", "some", "end", "tags", "have", "to", "be", "ignored", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/dump/xml/AbstractXmlDumpReader.java#L246-L251
105,923
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/TextPair.java
TextPair.sentenceSplit
private List<String> sentenceSplit(String str) { BreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US); iterator.setText(str); int start = iterator.first(); List<String> sentences = new ArrayList<String>(); for (int end = iterator.next(); end != BreakIterator.DONE; start = end, end = i...
java
private List<String> sentenceSplit(String str) { BreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US); iterator.setText(str); int start = iterator.first(); List<String> sentences = new ArrayList<String>(); for (int end = iterator.next(); end != BreakIterator.DONE; start = end, end = i...
[ "private", "List", "<", "String", ">", "sentenceSplit", "(", "String", "str", ")", "{", "BreakIterator", "iterator", "=", "BreakIterator", ".", "getSentenceInstance", "(", "Locale", ".", "US", ")", ";", "iterator", ".", "setText", "(", "str", ")", ";", "in...
Splits a String into sentences using the BreakIterator with US locale @param str a String with (multiple) sentences @return a list of Strings - one sentences per String
[ "Splits", "a", "String", "into", "sentences", "using", "the", "BreakIterator", "with", "US", "locale" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/TextPair.java#L250-L261
105,924
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/TextPair.java
TextPair.listToString
private String listToString(List<String> stringList){ StringBuilder concat = new StringBuilder(); for(String str:stringList){ concat.append(str); concat.append(System.getProperty("line.separator")); } return concat.toString(); }
java
private String listToString(List<String> stringList){ StringBuilder concat = new StringBuilder(); for(String str:stringList){ concat.append(str); concat.append(System.getProperty("line.separator")); } return concat.toString(); }
[ "private", "String", "listToString", "(", "List", "<", "String", ">", "stringList", ")", "{", "StringBuilder", "concat", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "str", ":", "stringList", ")", "{", "concat", ".", "append", "(", "...
Concatenates a list of Strings to one line-separated String @param stringList a list of Strings @return a single line-separated String containing all Strings from the list
[ "Concatenates", "a", "list", "of", "Strings", "to", "one", "line", "-", "separated", "String" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/TextPair.java#L269-L276
105,925
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/TextPair.java
TextPair.normalize
private String normalize(String str){ str = StringUtils.trimToEmpty(str); str = StringUtils.normalizeSpace(str); // remove whitespace before punctuation. not using \p{Punct}, // because it includes to many special characters. str = str.replaceAll("\\s+(?=[.!,\\?;:])", ""); return str; }
java
private String normalize(String str){ str = StringUtils.trimToEmpty(str); str = StringUtils.normalizeSpace(str); // remove whitespace before punctuation. not using \p{Punct}, // because it includes to many special characters. str = str.replaceAll("\\s+(?=[.!,\\?;:])", ""); return str; }
[ "private", "String", "normalize", "(", "String", "str", ")", "{", "str", "=", "StringUtils", ".", "trimToEmpty", "(", "str", ")", ";", "str", "=", "StringUtils", ".", "normalizeSpace", "(", "str", ")", ";", "// remove whitespace before punctuation. not using \\p{P...
Normalizes the Strings in the TextPair. This mainly deals with whitespace-issues. Other normalizations can be included. @param str @return
[ "Normalizes", "the", "Strings", "in", "the", "TextPair", ".", "This", "mainly", "deals", "with", "whitespace", "-", "issues", ".", "Other", "normalizations", "can", "be", "included", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/TextPair.java#L286-L295
105,926
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/revisions/RevisionUtils.java
RevisionUtils.getDiscussionRevisionForArticleRevision
public Revision getDiscussionRevisionForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException{ //get article revision Revision rev = revApi.getRevision(revisionId); Timestamp revTime = rev.getTimeStamp(); //get corresponding discussion page Page discussion = wiki.getDiscuss...
java
public Revision getDiscussionRevisionForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException{ //get article revision Revision rev = revApi.getRevision(revisionId); Timestamp revTime = rev.getTimeStamp(); //get corresponding discussion page Page discussion = wiki.getDiscuss...
[ "public", "Revision", "getDiscussionRevisionForArticleRevision", "(", "int", "revisionId", ")", "throws", "WikiApiException", ",", "WikiPageNotFoundException", "{", "//get article revision\r", "Revision", "rev", "=", "revApi", ".", "getRevision", "(", "revisionId", ")", "...
For a given article revision, the method returns the revision of the article discussion page which was current at the time the revision was created. @param revisionId revision of the article for which the talk page revision should be retrieved @return the revision of the talk page that was current at the creation time...
[ "For", "a", "given", "article", "revision", "the", "method", "returns", "the", "revision", "of", "the", "article", "discussion", "page", "which", "was", "current", "at", "the", "time", "the", "revision", "was", "created", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/revisions/RevisionUtils.java#L64-L94
105,927
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/revisions/RevisionUtils.java
RevisionUtils.getDiscussionArchiveRevisionsForArticleRevision
public List<Revision> getDiscussionArchiveRevisionsForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException{ List<Revision> result = new LinkedList<Revision>(); //get article revision Revision rev = revApi.getRevision(revisionId); Timestamp revTime = rev.getTimeStamp(); /...
java
public List<Revision> getDiscussionArchiveRevisionsForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException{ List<Revision> result = new LinkedList<Revision>(); //get article revision Revision rev = revApi.getRevision(revisionId); Timestamp revTime = rev.getTimeStamp(); /...
[ "public", "List", "<", "Revision", ">", "getDiscussionArchiveRevisionsForArticleRevision", "(", "int", "revisionId", ")", "throws", "WikiApiException", ",", "WikiPageNotFoundException", "{", "List", "<", "Revision", ">", "result", "=", "new", "LinkedList", "<", "Revis...
For a given article revision, the method returns the revisions of the archived article discussion pages which were available at the time of the article revision @param revisionId revision of the article for which the talk page archive revisions should be retrieved @return the revisions of the talk page archives that w...
[ "For", "a", "given", "article", "revision", "the", "method", "returns", "the", "revisions", "of", "the", "archived", "article", "discussion", "pages", "which", "were", "available", "at", "the", "time", "of", "the", "article", "revision" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/revisions/RevisionUtils.java#L104-L140
105,928
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/Redirects.java
Redirects.getRedirectDestination
public static String getRedirectDestination(String pageText) { String redirectString = null; try { String regex = "\\[\\[\\s*(.+?)\\s*]]"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(pageText); // group 0 is the whole match if (matcher.find()) { redirectString = m...
java
public static String getRedirectDestination(String pageText) { String redirectString = null; try { String regex = "\\[\\[\\s*(.+?)\\s*]]"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(pageText); // group 0 is the whole match if (matcher.find()) { redirectString = m...
[ "public", "static", "String", "getRedirectDestination", "(", "String", "pageText", ")", "{", "String", "redirectString", "=", "null", ";", "try", "{", "String", "regex", "=", "\"\\\\[\\\\[\\\\s*(.+?)\\\\s*]]\"", ";", "Pattern", "pattern", "=", "Pattern", ".", "com...
Return the redirect destination of according to wikimedia syntax. @param pageText Must not be {@code null}. @return redirect destination
[ "Return", "the", "redirect", "destination", "of", "according", "to", "wikimedia", "syntax", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/Redirects.java#L88-L151
105,929
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigVerification.java
ConfigVerification.add
public void add(final ConfigItem item) { failed = failed || item.getType() == ConfigItemTypes.ERROR; this.list.add(item); }
java
public void add(final ConfigItem item) { failed = failed || item.getType() == ConfigItemTypes.ERROR; this.list.add(item); }
[ "public", "void", "add", "(", "final", "ConfigItem", "item", ")", "{", "failed", "=", "failed", "||", "item", ".", "getType", "(", ")", "==", "ConfigItemTypes", ".", "ERROR", ";", "this", ".", "list", ".", "add", "(", "item", ")", ";", "}" ]
Adds a configuration item to the list. @param item configuration item
[ "Adds", "a", "configuration", "item", "to", "the", "list", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigVerification.java#L66-L70
105,930
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigVerification.java
ConfigVerification.getValueAt
@Override public Object getValueAt(final int row, final int column) { ConfigItem item = this.list.get(row); switch (column) { case 0: return item.getType(); case 1: return item.getKey(); case 2: return item.getMessage(); } return null; }
java
@Override public Object getValueAt(final int row, final int column) { ConfigItem item = this.list.get(row); switch (column) { case 0: return item.getType(); case 1: return item.getKey(); case 2: return item.getMessage(); } return null; }
[ "@", "Override", "public", "Object", "getValueAt", "(", "final", "int", "row", ",", "final", "int", "column", ")", "{", "ConfigItem", "item", "=", "this", ".", "list", ".", "get", "(", "row", ")", ";", "switch", "(", "column", ")", "{", "case", "0", ...
Returns the value at the specified column of the specified row. @return value
[ "Returns", "the", "value", "at", "the", "specified", "column", "of", "the", "specified", "row", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigVerification.java#L110-L125
105,931
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java
WikipediaTemplateInfoDumpWriter.generatePageSQLStatement
private String generatePageSQLStatement(boolean tableExists, Map<String, Set<Integer>> dataSourceToUse) { StringBuffer output = new StringBuffer(); // Statement creates table for Template Id -> Page Id output.append("CREATE TABLE IF NOT EXISTS " + GeneratorConstants.TABLE_TPLID_PAGEID + " (" + "t...
java
private String generatePageSQLStatement(boolean tableExists, Map<String, Set<Integer>> dataSourceToUse) { StringBuffer output = new StringBuffer(); // Statement creates table for Template Id -> Page Id output.append("CREATE TABLE IF NOT EXISTS " + GeneratorConstants.TABLE_TPLID_PAGEID + " (" + "t...
[ "private", "String", "generatePageSQLStatement", "(", "boolean", "tableExists", ",", "Map", "<", "String", ",", "Set", "<", "Integer", ">", ">", "dataSourceToUse", ")", "{", "StringBuffer", "output", "=", "new", "StringBuffer", "(", ")", ";", "// Statement creat...
Generate sql statement for table template id -> page id @param tableExists if table does not exists create index for this table @param dataSourceToUse data source to use for sql statement generation @return sql statement string
[ "Generate", "sql", "statement", "for", "table", "template", "id", "-", ">", "page", "id" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java#L121-L147
105,932
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java
WikipediaTemplateInfoDumpWriter.generateTemplateIdSQLStatement
private String generateTemplateIdSQLStatement(boolean tableExists) { StringBuffer output = new StringBuffer(); // Statement creates table for Template Id -> Template Name output.append("CREATE TABLE IF NOT EXISTS " + GeneratorConstants.TABLE_TPLID_TPLNAME + " (" + "templateId INTEGER NOT NULL AUTO_INCRE...
java
private String generateTemplateIdSQLStatement(boolean tableExists) { StringBuffer output = new StringBuffer(); // Statement creates table for Template Id -> Template Name output.append("CREATE TABLE IF NOT EXISTS " + GeneratorConstants.TABLE_TPLID_TPLNAME + " (" + "templateId INTEGER NOT NULL AUTO_INCRE...
[ "private", "String", "generateTemplateIdSQLStatement", "(", "boolean", "tableExists", ")", "{", "StringBuffer", "output", "=", "new", "StringBuffer", "(", ")", ";", "// Statement creates table for Template Id -> Template Name", "output", ".", "append", "(", "\"CREATE TABLE ...
Generate sql statement for table template id -> template name @param tableExists if this table does not exists create index @return sql statement
[ "Generate", "sql", "statement", "for", "table", "template", "id", "-", ">", "template", "name" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java#L156-L175
105,933
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java
WikipediaTemplateInfoDumpWriter.generateRevisionSQLStatement
private String generateRevisionSQLStatement(boolean tableExists, Map<String, Set<Integer>> dataSourceToUse) { StringBuffer output = new StringBuffer(); // Statement creates table for Template Id -> Revision Id output.append("CREATE TABLE IF NOT EXISTS " + GeneratorConstants.TABLE_TPLID_REVISIONID + "...
java
private String generateRevisionSQLStatement(boolean tableExists, Map<String, Set<Integer>> dataSourceToUse) { StringBuffer output = new StringBuffer(); // Statement creates table for Template Id -> Revision Id output.append("CREATE TABLE IF NOT EXISTS " + GeneratorConstants.TABLE_TPLID_REVISIONID + "...
[ "private", "String", "generateRevisionSQLStatement", "(", "boolean", "tableExists", ",", "Map", "<", "String", ",", "Set", "<", "Integer", ">", ">", "dataSourceToUse", ")", "{", "StringBuffer", "output", "=", "new", "StringBuffer", "(", ")", ";", "// Statement c...
Generate sql statement for table template id -> revision id @param tableExists if table does not exists create index for this table @param dataSourceToUse data source to use for sql statement generation @return sql statement string
[ "Generate", "sql", "statement", "for", "table", "template", "id", "-", ">", "revision", "id" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java#L186-L211
105,934
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java
WikipediaTemplateInfoDumpWriter.writeSQL
void writeSQL(boolean revTableExists, boolean pageTableExists, GeneratorMode mode) { try (Writer writer = new BufferedWriter(new OutputStreamWriter( new BufferedOutputStream(new FileOutputStream(outputPath)), charset))){ StringBuilder dataToDump = new StringBuilder(); dataToDump.append(generateTemplateIdS...
java
void writeSQL(boolean revTableExists, boolean pageTableExists, GeneratorMode mode) { try (Writer writer = new BufferedWriter(new OutputStreamWriter( new BufferedOutputStream(new FileOutputStream(outputPath)), charset))){ StringBuilder dataToDump = new StringBuilder(); dataToDump.append(generateTemplateIdS...
[ "void", "writeSQL", "(", "boolean", "revTableExists", ",", "boolean", "pageTableExists", ",", "GeneratorMode", "mode", ")", "{", "try", "(", "Writer", "writer", "=", "new", "BufferedWriter", "(", "new", "OutputStreamWriter", "(", "new", "BufferedOutputStream", "("...
Generate and write sql statements to output file @param revTableExists if revision table does not exists -&gt; create index @param pageTableExists if page table does not exists -&gt; create index @param mode generation mode
[ "Generate", "and", "write", "sql", "statements", "to", "output", "file" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoDumpWriter.java#L223-L244
105,935
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java
SqlModifyBuilder.detectModifyType
public static ModifyType detectModifyType(SQLiteModelMethod method, JQLType jqlType) { // Elements elementUtils = BaseProcessor.elementUtils; SQLiteDaoDefinition daoDefinition = method.getParent(); SQLiteEntity entity = method.getEntity(); ModifyType updateResultType = null; // check type of arguments int...
java
public static ModifyType detectModifyType(SQLiteModelMethod method, JQLType jqlType) { // Elements elementUtils = BaseProcessor.elementUtils; SQLiteDaoDefinition daoDefinition = method.getParent(); SQLiteEntity entity = method.getEntity(); ModifyType updateResultType = null; // check type of arguments int...
[ "public", "static", "ModifyType", "detectModifyType", "(", "SQLiteModelMethod", "method", ",", "JQLType", "jqlType", ")", "{", "// Elements elementUtils = BaseProcessor.elementUtils;", "SQLiteDaoDefinition", "daoDefinition", "=", "method", ".", "getParent", "(", ")", ";", ...
Detect method type. @param method the method @param jqlType jql type is necessary because method.jql can be not properly initialized @return the modify type
[ "Detect", "method", "type", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java#L224-L289
105,936
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java
SqlModifyBuilder.checkContentProviderVarsAndArguments
public static void checkContentProviderVarsAndArguments(final SQLiteModelMethod method, List<JQLPlaceHolder> placeHolders) { AssertKripton.assertTrue(placeHolders.size() == method.contentProviderUriVariables.size(), "In '%s.%s' content provider URI path variables and variables used in where conditions are diff...
java
public static void checkContentProviderVarsAndArguments(final SQLiteModelMethod method, List<JQLPlaceHolder> placeHolders) { AssertKripton.assertTrue(placeHolders.size() == method.contentProviderUriVariables.size(), "In '%s.%s' content provider URI path variables and variables used in where conditions are diff...
[ "public", "static", "void", "checkContentProviderVarsAndArguments", "(", "final", "SQLiteModelMethod", "method", ",", "List", "<", "JQLPlaceHolder", ">", "placeHolders", ")", "{", "AssertKripton", ".", "assertTrue", "(", "placeHolders", ".", "size", "(", ")", "==", ...
Check content provider vars and arguments. @param method the method @param placeHolders the place holders
[ "Check", "content", "provider", "vars", "and", "arguments", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java#L536-L541
105,937
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java
SqlModifyBuilder.generateInitForDynamicWhereVariables
static void generateInitForDynamicWhereVariables(SQLiteModelMethod method, MethodSpec.Builder methodBuilder, String dynamiWhereName, String dynamicWhereArgsName) { GenerationPartMarks.begin(methodBuilder, GenerationPartMarks.CODE_001); // where _sqlDynamicWhere and _sqlDynamicWhereArgs if (method.hasDynamicWhe...
java
static void generateInitForDynamicWhereVariables(SQLiteModelMethod method, MethodSpec.Builder methodBuilder, String dynamiWhereName, String dynamicWhereArgsName) { GenerationPartMarks.begin(methodBuilder, GenerationPartMarks.CODE_001); // where _sqlDynamicWhere and _sqlDynamicWhereArgs if (method.hasDynamicWhe...
[ "static", "void", "generateInitForDynamicWhereVariables", "(", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "String", "dynamiWhereName", ",", "String", "dynamicWhereArgsName", ")", "{", "GenerationPartMarks", ".", "begin", "(", ...
Generate init for dynamic where variables. @param method the method @param methodBuilder the method builder @param dynamiWhereName the dynami where name @param dynamicWhereArgsName the dynamic where args name
[ "Generate", "init", "for", "dynamic", "where", "variables", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java#L555-L569
105,938
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java
SqlModifyBuilder.generateLogForModifiers
public static void generateLogForModifiers(final SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { JQLChecker jqlChecker = JQLChecker.getInstance(); final One<Boolean> usedInWhere = new One<Boolean>(false); methodBuilder.addCode("\n// display log\n"); String sqlForLog = jqlChecker.replace(method, ...
java
public static void generateLogForModifiers(final SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { JQLChecker jqlChecker = JQLChecker.getInstance(); final One<Boolean> usedInWhere = new One<Boolean>(false); methodBuilder.addCode("\n// display log\n"); String sqlForLog = jqlChecker.replace(method, ...
[ "public", "static", "void", "generateLogForModifiers", "(", "final", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "JQLChecker", "jqlChecker", "=", "JQLChecker", ".", "getInstance", "(", ")", ";", "final", "One", "<",...
generate sql log. @param method the method @param methodBuilder the method builder
[ "generate", "sql", "log", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlModifyBuilder.java#L579-L640
105,939
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java
BindTableGenerator.generate
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema, Set<GeneratedTypeElement> generatedEntities) throws Exception { BindTableGenerator visitor = new BindTableGenerator(elementUtils, filer, schema); List<SQLiteEntity> orderedEntities = BindDataSourceBuilder.orderEntitiesL...
java
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema, Set<GeneratedTypeElement> generatedEntities) throws Exception { BindTableGenerator visitor = new BindTableGenerator(elementUtils, filer, schema); List<SQLiteEntity> orderedEntities = BindDataSourceBuilder.orderEntitiesL...
[ "public", "static", "void", "generate", "(", "Elements", "elementUtils", ",", "Filer", "filer", ",", "SQLiteDatabaseSchema", "schema", ",", "Set", "<", "GeneratedTypeElement", ">", "generatedEntities", ")", "throws", "Exception", "{", "BindTableGenerator", "visitor", ...
Generate table for entities. @param elementUtils the element utils @param filer the filer @param schema the schema @param generatedEntities the generated entities @throws Exception the exception
[ "Generate", "table", "for", "entities", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java#L120-L134
105,940
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java
BindTableGenerator.tableClassName
public static ClassName tableClassName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName = BindDataSourceSubProcessor.generateEntityQualifiedName(dao, entity); return TypeUtility.className(entityName + SUFFIX); }
java
public static ClassName tableClassName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName = BindDataSourceSubProcessor.generateEntityQualifiedName(dao, entity); return TypeUtility.className(entityName + SUFFIX); }
[ "public", "static", "ClassName", "tableClassName", "(", "SQLiteDaoDefinition", "dao", ",", "SQLiteEntity", "entity", ")", "{", "String", "entityName", "=", "BindDataSourceSubProcessor", ".", "generateEntityQualifiedName", "(", "dao", ",", "entity", ")", ";", "return",...
Table class name. @param dao the dao @param entity the entity @return the class name
[ "Table", "class", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java#L381-L386
105,941
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java
BindTableGenerator.generateColumnsArray
private void generateColumnsArray(Finder<SQLProperty> entity) { // generate columns array Builder sp = FieldSpec.builder(ArrayTypeName.of(String.class), "COLUMNS", Modifier.STATIC, Modifier.PRIVATE, Modifier.FINAL); String s = ""; StringBuilder buffer = new StringBuilder(); for (SQLProperty property : ent...
java
private void generateColumnsArray(Finder<SQLProperty> entity) { // generate columns array Builder sp = FieldSpec.builder(ArrayTypeName.of(String.class), "COLUMNS", Modifier.STATIC, Modifier.PRIVATE, Modifier.FINAL); String s = ""; StringBuilder buffer = new StringBuilder(); for (SQLProperty property : ent...
[ "private", "void", "generateColumnsArray", "(", "Finder", "<", "SQLProperty", ">", "entity", ")", "{", "// generate columns array", "Builder", "sp", "=", "FieldSpec", ".", "builder", "(", "ArrayTypeName", ".", "of", "(", "String", ".", "class", ")", ",", "\"CO...
generate columns array. @param entity the entity
[ "generate", "columns", "array", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java#L645-L663
105,942
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java
BindTableGenerator.buildIndexes
public static Triple<String, String, String> buildIndexes(final GeneratedTypeElement entity, boolean unique, int counter) { Triple<String, String, String> result = new Triple<>(); result.value0 = ""; result.value1 = ""; result.value2 = ""; List<String> indexes = entity.index; String uniqueString; unique...
java
public static Triple<String, String, String> buildIndexes(final GeneratedTypeElement entity, boolean unique, int counter) { Triple<String, String, String> result = new Triple<>(); result.value0 = ""; result.value1 = ""; result.value2 = ""; List<String> indexes = entity.index; String uniqueString; unique...
[ "public", "static", "Triple", "<", "String", ",", "String", ",", "String", ">", "buildIndexes", "(", "final", "GeneratedTypeElement", "entity", ",", "boolean", "unique", ",", "int", "counter", ")", "{", "Triple", "<", "String", ",", "String", ",", "String", ...
A generated element can have only a primary key and two FK. @param entity the entity @param unique the unique @param counter the counter @return the pair
[ "A", "generated", "element", "can", "have", "only", "a", "primary", "key", "and", "two", "FK", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindTableGenerator.java#L785-L814
105,943
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/ModifyBeanHelper.java
ModifyBeanHelper.generateModifyQueryCommonPart
static void generateModifyQueryCommonPart(SQLiteModelMethod method, TypeSpec.Builder classBuilder, MethodSpec.Builder methodBuilder) { boolean updateMode = (method.jql.operationType == JQLType.UPDATE); SqlModifyBuilder.generateInitForDynamicWhereVariables(method, methodBuilder, method.dynamicWhereParameterName, me...
java
static void generateModifyQueryCommonPart(SQLiteModelMethod method, TypeSpec.Builder classBuilder, MethodSpec.Builder methodBuilder) { boolean updateMode = (method.jql.operationType == JQLType.UPDATE); SqlModifyBuilder.generateInitForDynamicWhereVariables(method, methodBuilder, method.dynamicWhereParameterName, me...
[ "static", "void", "generateModifyQueryCommonPart", "(", "SQLiteModelMethod", "method", ",", "TypeSpec", ".", "Builder", "classBuilder", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "boolean", "updateMode", "=", "(", "method", ".", "jql", ".", "ope...
Generate modify query common part. @param method the method @param classBuilder the class builder @param methodBuilder the method builder
[ "Generate", "modify", "query", "common", "part", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/ModifyBeanHelper.java#L142-L195
105,944
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/ModifyBeanHelper.java
ModifyBeanHelper.buildReturnCode
public void buildReturnCode(MethodSpec.Builder methodBuilder, boolean updateMode, SQLiteModelMethod method, TypeName returnType) { if (returnType == TypeName.VOID) { } else if (isTypeIncludedIn(returnType, Boolean.TYPE, Boolean.class)) { methodBuilder.addJavadoc("\n"); if (updateMode) methodBuilder.addJa...
java
public void buildReturnCode(MethodSpec.Builder methodBuilder, boolean updateMode, SQLiteModelMethod method, TypeName returnType) { if (returnType == TypeName.VOID) { } else if (isTypeIncludedIn(returnType, Boolean.TYPE, Boolean.class)) { methodBuilder.addJavadoc("\n"); if (updateMode) methodBuilder.addJa...
[ "public", "void", "buildReturnCode", "(", "MethodSpec", ".", "Builder", "methodBuilder", ",", "boolean", "updateMode", ",", "SQLiteModelMethod", "method", ",", "TypeName", "returnType", ")", "{", "if", "(", "returnType", "==", "TypeName", ".", "VOID", ")", "{", ...
Builds the return code. @param methodBuilder the method builder @param updateMode the update mode @param method the method @param returnType the return type
[ "Builds", "the", "return", "code", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/ModifyBeanHelper.java#L256-L282
105,945
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/ModifyBeanHelper.java
ModifyBeanHelper.extractSQLForJavaDoc
private String extractSQLForJavaDoc(final SQLiteModelMethod method) { final One<Boolean> usedInWhere = new One<>(false); String sqlForJavaDoc = JQLChecker.getInstance().replace(method, method.jql, new JQLReplacerListenerImpl(method) { @Override public String onColumnNameToUpdate(String columnName) { retu...
java
private String extractSQLForJavaDoc(final SQLiteModelMethod method) { final One<Boolean> usedInWhere = new One<>(false); String sqlForJavaDoc = JQLChecker.getInstance().replace(method, method.jql, new JQLReplacerListenerImpl(method) { @Override public String onColumnNameToUpdate(String columnName) { retu...
[ "private", "String", "extractSQLForJavaDoc", "(", "final", "SQLiteModelMethod", "method", ")", "{", "final", "One", "<", "Boolean", ">", "usedInWhere", "=", "new", "One", "<>", "(", "false", ")", ";", "String", "sqlForJavaDoc", "=", "JQLChecker", ".", "getInst...
Extract SQL for java doc. @param method the method @return the string
[ "Extract", "SQL", "for", "java", "doc", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/ModifyBeanHelper.java#L416-L459
105,946
xcesco/kripton
kripton-android-core/src/main/java/com/abubusoft/kripton/android/Logger.java
Logger.generateTag
protected static String generateTag() { StackTraceElement[] elements = Thread.currentThread().getStackTrace(); String currentPath = elements[4].getClassName(); String method = elements[4].getMethodName(); int line = elements[4].getLineNumber(); String tag = currentPath + ", " + method + " (line " + line + "...
java
protected static String generateTag() { StackTraceElement[] elements = Thread.currentThread().getStackTrace(); String currentPath = elements[4].getClassName(); String method = elements[4].getMethodName(); int line = elements[4].getLineNumber(); String tag = currentPath + ", " + method + " (line " + line + "...
[ "protected", "static", "String", "generateTag", "(", ")", "{", "StackTraceElement", "[", "]", "elements", "=", "Thread", ".", "currentThread", "(", ")", ".", "getStackTrace", "(", ")", ";", "String", "currentPath", "=", "elements", "[", "4", "]", ".", "get...
generate tag. @return tag of logger
[ "generate", "tag", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-android-core/src/main/java/com/abubusoft/kripton/android/Logger.java#L36-L47
105,947
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/AbstractContext.java
AbstractContext.getMapper
@SuppressWarnings("unchecked") static <E, M extends BinderMapper<E>> M getMapper(Class<E> cls) { M mapper = (M) OBJECT_MAPPERS.get(cls); if (mapper == null) { // The only way the mapper wouldn't already be loaded into // OBJECT_MAPPERS is if it was compiled separately, but let's handle // it anyway Str...
java
@SuppressWarnings("unchecked") static <E, M extends BinderMapper<E>> M getMapper(Class<E> cls) { M mapper = (M) OBJECT_MAPPERS.get(cls); if (mapper == null) { // The only way the mapper wouldn't already be loaded into // OBJECT_MAPPERS is if it was compiled separately, but let's handle // it anyway Str...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "<", "E", ",", "M", "extends", "BinderMapper", "<", "E", ">", ">", "M", "getMapper", "(", "Class", "<", "E", ">", "cls", ")", "{", "M", "mapper", "=", "(", "M", ")", "OBJECT_MAPPERS", ".",...
Gets the mapper. @param <E> the element type @param <M> the generic type @param cls the cls @return the mapper
[ "Gets", "the", "mapper", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/AbstractContext.java#L96-L120
105,948
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.processSecondRound
public boolean processSecondRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (SQLiteDatabaseSchema schema : schemas) { // Analyze beans BEFORE daos, because beans are needed for DAO // definition for (String daoName : schema.getDaoNameSet()) { // check dao into bean definit...
java
public boolean processSecondRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (SQLiteDatabaseSchema schema : schemas) { // Analyze beans BEFORE daos, because beans are needed for DAO // definition for (String daoName : schema.getDaoNameSet()) { // check dao into bean definit...
[ "public", "boolean", "processSecondRound", "(", "Set", "<", "?", "extends", "TypeElement", ">", "annotations", ",", "RoundEnvironment", "roundEnv", ")", "{", "for", "(", "SQLiteDatabaseSchema", "schema", ":", "schemas", ")", "{", "// Analyze beans BEFORE daos, because...
Process second round. @param annotations the annotations @param roundEnv the round env @return true, if successful
[ "Process", "second", "round", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L534-L550
105,949
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.analyzeSecondRound
public boolean analyzeSecondRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { parseBindType(roundEnv); // Put all @BindTable elements in beanElements for (Element item : roundEnv.getElementsAnnotatedWith(BindSqlType.class)) { if (item.getKind() != ElementKind.CLASS) { String msg =...
java
public boolean analyzeSecondRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { parseBindType(roundEnv); // Put all @BindTable elements in beanElements for (Element item : roundEnv.getElementsAnnotatedWith(BindSqlType.class)) { if (item.getKind() != ElementKind.CLASS) { String msg =...
[ "public", "boolean", "analyzeSecondRound", "(", "Set", "<", "?", "extends", "TypeElement", ">", "annotations", ",", "RoundEnvironment", "roundEnv", ")", "{", "parseBindType", "(", "roundEnv", ")", ";", "// Put all @BindTable elements in beanElements", "for", "(", "Ele...
Analyze second round. @param annotations the annotations @param roundEnv the round env @return true, if successful
[ "Analyze", "second", "round", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L561-L584
105,950
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.analyzeRound
public boolean analyzeRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { parseBindType(roundEnv); // Put all @BindSqlType elements in beanElements for (Element item : roundEnv.getElementsAnnotatedWith(BindSqlType.class)) { if (item.getKind() != ElementKind.CLASS) { String msg = Str...
java
public boolean analyzeRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { parseBindType(roundEnv); // Put all @BindSqlType elements in beanElements for (Element item : roundEnv.getElementsAnnotatedWith(BindSqlType.class)) { if (item.getKind() != ElementKind.CLASS) { String msg = Str...
[ "public", "boolean", "analyzeRound", "(", "Set", "<", "?", "extends", "TypeElement", ">", "annotations", ",", "RoundEnvironment", "roundEnv", ")", "{", "parseBindType", "(", "roundEnv", ")", ";", "// Put all @BindSqlType elements in beanElements", "for", "(", "Element...
Analyze round. @param annotations the annotations @param roundEnv the round env @return true, if successful
[ "Analyze", "round", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L595-L652
105,951
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.analyzeForeignKey
private void analyzeForeignKey(SQLiteDatabaseSchema schema) { for (SQLiteEntity entity : schema.getEntities()) { for (SQLProperty property : entity.getCollection()) { if (property.isForeignKey()) { SQLiteEntity reference = schema.getEntity(property.foreignParentClassName); AssertKripton.asserTrueOrU...
java
private void analyzeForeignKey(SQLiteDatabaseSchema schema) { for (SQLiteEntity entity : schema.getEntities()) { for (SQLProperty property : entity.getCollection()) { if (property.isForeignKey()) { SQLiteEntity reference = schema.getEntity(property.foreignParentClassName); AssertKripton.asserTrueOrU...
[ "private", "void", "analyzeForeignKey", "(", "SQLiteDatabaseSchema", "schema", ")", "{", "for", "(", "SQLiteEntity", "entity", ":", "schema", ".", "getEntities", "(", ")", ")", "{", "for", "(", "SQLProperty", "property", ":", "entity", ".", "getCollection", "(...
Analyze foreign key. @param schema the schema
[ "Analyze", "foreign", "key", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L660-L692
105,952
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.isGeneratedEntity
private boolean isGeneratedEntity(String fullName) { for (GeneratedTypeElement item : this.generatedEntities) { if (item.getQualifiedName().equals(fullName)) { return true; } } return false; }
java
private boolean isGeneratedEntity(String fullName) { for (GeneratedTypeElement item : this.generatedEntities) { if (item.getQualifiedName().equals(fullName)) { return true; } } return false; }
[ "private", "boolean", "isGeneratedEntity", "(", "String", "fullName", ")", "{", "for", "(", "GeneratedTypeElement", "item", ":", "this", ".", "generatedEntities", ")", "{", "if", "(", "item", ".", "getQualifiedName", "(", ")", ".", "equals", "(", "fullName", ...
Checks if is generated entity. @param fullName the full name @return true, if is generated entity
[ "Checks", "if", "is", "generated", "entity", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L701-L709
105,953
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.checkForeignKeyForM2M
private void checkForeignKeyForM2M(SQLiteDatabaseSchema currentSchema, final SQLiteEntity currentEntity, ClassName m2mEntity) { // check for m2m relationship if (m2mEntity != null) { SQLiteEntity temp = currentSchema.getEntity(m2mEntity.toString()); AssertKripton.asserTrueOrForeignKeyNotFound(currentEntity...
java
private void checkForeignKeyForM2M(SQLiteDatabaseSchema currentSchema, final SQLiteEntity currentEntity, ClassName m2mEntity) { // check for m2m relationship if (m2mEntity != null) { SQLiteEntity temp = currentSchema.getEntity(m2mEntity.toString()); AssertKripton.asserTrueOrForeignKeyNotFound(currentEntity...
[ "private", "void", "checkForeignKeyForM2M", "(", "SQLiteDatabaseSchema", "currentSchema", ",", "final", "SQLiteEntity", "currentEntity", ",", "ClassName", "m2mEntity", ")", "{", "// check for m2m relationship", "if", "(", "m2mEntity", "!=", "null", ")", "{", "SQLiteEnti...
Check foreign key for M 2 M. @param currentSchema the current schema @param currentEntity the current entity @param m2mEntity the m 2 m entity
[ "Check", "foreign", "key", "for", "M", "2", "M", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L986-L994
105,954
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.createSQLDaoDefinition
protected void createSQLDaoDefinition(SQLiteDatabaseSchema schema, final Map<String, TypeElement> globalBeanElements, final Map<String, TypeElement> globalDaoElements, String daoItem) { Element daoElement = globalDaoElements.get(daoItem); if (daoElement.getKind() != ElementKind.INTERFACE) { String msg = S...
java
protected void createSQLDaoDefinition(SQLiteDatabaseSchema schema, final Map<String, TypeElement> globalBeanElements, final Map<String, TypeElement> globalDaoElements, String daoItem) { Element daoElement = globalDaoElements.get(daoItem); if (daoElement.getKind() != ElementKind.INTERFACE) { String msg = S...
[ "protected", "void", "createSQLDaoDefinition", "(", "SQLiteDatabaseSchema", "schema", ",", "final", "Map", "<", "String", ",", "TypeElement", ">", "globalBeanElements", ",", "final", "Map", "<", "String", ",", "TypeElement", ">", "globalDaoElements", ",", "String", ...
Create DAO definition. @param schema the schema @param globalBeanElements the global bean elements @param globalDaoElements the global dao elements @param daoItem the dao item
[ "Create", "DAO", "definition", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L1048-L1110
105,955
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.fillMethods
private void fillMethods(final SQLiteDaoDefinition currentDaoDefinition, Element daoElement) { final One<Boolean> methodWithAnnotation=new One<Boolean>(false); // create method for dao SqlBuilderHelper.forEachMethods((TypeElement) daoElement, new MethodFoundListener() { @Override public void onMethod(Ex...
java
private void fillMethods(final SQLiteDaoDefinition currentDaoDefinition, Element daoElement) { final One<Boolean> methodWithAnnotation=new One<Boolean>(false); // create method for dao SqlBuilderHelper.forEachMethods((TypeElement) daoElement, new MethodFoundListener() { @Override public void onMethod(Ex...
[ "private", "void", "fillMethods", "(", "final", "SQLiteDaoDefinition", "currentDaoDefinition", ",", "Element", "daoElement", ")", "{", "final", "One", "<", "Boolean", ">", "methodWithAnnotation", "=", "new", "One", "<", "Boolean", ">", "(", "false", ")", ";", ...
Fill methods. @param currentDaoDefinition the current dao definition @param daoElement the dao element
[ "Fill", "methods", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L1120-L1201
105,956
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.generateEntityName
public static String generateEntityName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName; if (entity == null) { M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDAO(dao.getElement()); entityName = m2mEntity.getSimpleName(); } else { entityName = entity.getSimpleName(); } return ...
java
public static String generateEntityName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName; if (entity == null) { M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDAO(dao.getElement()); entityName = m2mEntity.getSimpleName(); } else { entityName = entity.getSimpleName(); } return ...
[ "public", "static", "String", "generateEntityName", "(", "SQLiteDaoDefinition", "dao", ",", "SQLiteEntity", "entity", ")", "{", "String", "entityName", ";", "if", "(", "entity", "==", "null", ")", "{", "M2MEntity", "m2mEntity", "=", "M2MEntity", ".", "extractEnt...
dao or entity can be null. @param dao the dao @param entity the entity @return the string
[ "dao", "or", "entity", "can", "be", "null", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L1298-L1307
105,957
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.generateEntityQualifiedName
public static String generateEntityQualifiedName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName; if (entity == null) { M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDAO(dao.getElement()); entityName = m2mEntity.getQualifiedName(); } else { entityName = entity.getName().toString...
java
public static String generateEntityQualifiedName(SQLiteDaoDefinition dao, SQLiteEntity entity) { String entityName; if (entity == null) { M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDAO(dao.getElement()); entityName = m2mEntity.getQualifiedName(); } else { entityName = entity.getName().toString...
[ "public", "static", "String", "generateEntityQualifiedName", "(", "SQLiteDaoDefinition", "dao", ",", "SQLiteEntity", "entity", ")", "{", "String", "entityName", ";", "if", "(", "entity", "==", "null", ")", "{", "M2MEntity", "m2mEntity", "=", "M2MEntity", ".", "e...
Generate entity qualified name. @param dao the dao @param entity the entity @return the string
[ "Generate", "entity", "qualified", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L1318-L1327
105,958
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.generate
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws Exception { BindContentProviderBuilder visitorDao = new BindContentProviderBuilder(elementUtils, filer, schema); visitorDao.build(elementUtils, filer, schema); }
java
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws Exception { BindContentProviderBuilder visitorDao = new BindContentProviderBuilder(elementUtils, filer, schema); visitorDao.build(elementUtils, filer, schema); }
[ "public", "static", "void", "generate", "(", "Elements", "elementUtils", ",", "Filer", "filer", ",", "SQLiteDatabaseSchema", "schema", ")", "throws", "Exception", "{", "BindContentProviderBuilder", "visitorDao", "=", "new", "BindContentProviderBuilder", "(", "elementUti...
Generate content provider. @param elementUtils the element utils @param filer the filer @param schema the schema @throws Exception the exception
[ "Generate", "content", "provider", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L187-L190
105,959
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.generateURIForMethod
private void generateURIForMethod(SQLiteDatabaseSchema schema, List<FieldSpec> listFieldAlias, Set<String> alreadyUsedName, Converter<String, String> format, Pair<String, ContentEntry> entry, SQLiteModelMethod method) { if (method == null) return; String alias = "URI_" + entry.value1.pathCostant.substring(0, ...
java
private void generateURIForMethod(SQLiteDatabaseSchema schema, List<FieldSpec> listFieldAlias, Set<String> alreadyUsedName, Converter<String, String> format, Pair<String, ContentEntry> entry, SQLiteModelMethod method) { if (method == null) return; String alias = "URI_" + entry.value1.pathCostant.substring(0, ...
[ "private", "void", "generateURIForMethod", "(", "SQLiteDatabaseSchema", "schema", ",", "List", "<", "FieldSpec", ">", "listFieldAlias", ",", "Set", "<", "String", ">", "alreadyUsedName", ",", "Converter", "<", "String", ",", "String", ">", "format", ",", "Pair",...
Generate URI for method. @param schema the schema @param listFieldAlias the list field alias @param alreadyUsedName the already used name @param format the format @param entry the entry @param method the method
[ "Generate", "URI", "for", "method", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L391-L406
105,960
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.defineJavadocForContentUri
private void defineJavadocForContentUri(MethodSpec.Builder builder, SQLiteModelMethod method) { String contentUri = method.contentProviderUri().replace("*", "[*]"); classBuilder.addJavadoc("<tr><td><pre>$L</pre></td><td>{@link $LImpl#$L}</td></tr>\n", contentUri, method.getParent().getName(), method.contentProvide...
java
private void defineJavadocForContentUri(MethodSpec.Builder builder, SQLiteModelMethod method) { String contentUri = method.contentProviderUri().replace("*", "[*]"); classBuilder.addJavadoc("<tr><td><pre>$L</pre></td><td>{@link $LImpl#$L}</td></tr>\n", contentUri, method.getParent().getName(), method.contentProvide...
[ "private", "void", "defineJavadocForContentUri", "(", "MethodSpec", ".", "Builder", "builder", ",", "SQLiteModelMethod", "method", ")", "{", "String", "contentUri", "=", "method", ".", "contentProviderUri", "(", ")", ".", "replace", "(", "\"*\"", ",", "\"[*]\"", ...
Define javadoc for content uri. @param builder the builder @param method the method
[ "Define", "javadoc", "for", "content", "uri", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L489-L495
105,961
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.generateDelete
private void generateDelete(SQLiteDatabaseSchema schema) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("delete").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Integer.TYPE); methodBuilder.addParameter(Uri.class, "uri"); methodBuilder.addParameter(String.class, "selection"); ...
java
private void generateDelete(SQLiteDatabaseSchema schema) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("delete").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Integer.TYPE); methodBuilder.addParameter(Uri.class, "uri"); methodBuilder.addParameter(String.class, "selection"); ...
[ "private", "void", "generateDelete", "(", "SQLiteDatabaseSchema", "schema", ")", "{", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"delete\"", ")", ".", "addModifiers", "(", "Modifier", ".", "PUBLIC", ")", ".", "...
Generate delete. @param schema the schema
[ "Generate", "delete", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L503-L563
105,962
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.defineJavadocHeaderForContentOperation
private void defineJavadocHeaderForContentOperation(MethodSpec.Builder builder, String value) { builder.addJavadoc("\n<h2>Supported $L operations</h2>\n", value); builder.addJavadoc("<table>\n"); builder.addJavadoc("<tr><th>URI</th><th>DAO.METHOD</th></tr>\n"); classBuilder.addJavadoc("<h2>Supported $L operati...
java
private void defineJavadocHeaderForContentOperation(MethodSpec.Builder builder, String value) { builder.addJavadoc("\n<h2>Supported $L operations</h2>\n", value); builder.addJavadoc("<table>\n"); builder.addJavadoc("<tr><th>URI</th><th>DAO.METHOD</th></tr>\n"); classBuilder.addJavadoc("<h2>Supported $L operati...
[ "private", "void", "defineJavadocHeaderForContentOperation", "(", "MethodSpec", ".", "Builder", "builder", ",", "String", "value", ")", "{", "builder", ".", "addJavadoc", "(", "\"\\n<h2>Supported $L operations</h2>\\n\"", ",", "value", ")", ";", "builder", ".", "addJa...
Define javadoc header for content operation. @param builder the builder @param value the value
[ "Define", "javadoc", "header", "for", "content", "operation", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L655-L664
105,963
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.generateGetType
private void generateGetType(SQLiteDatabaseSchema schema) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("getType").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(String.class); methodBuilder.addParameter(Uri.class, "uri"); methodBuilder.beginControlFlow("switch (sURIMatcher.m...
java
private void generateGetType(SQLiteDatabaseSchema schema) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("getType").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(String.class); methodBuilder.addParameter(Uri.class, "uri"); methodBuilder.beginControlFlow("switch (sURIMatcher.m...
[ "private", "void", "generateGetType", "(", "SQLiteDatabaseSchema", "schema", ")", "{", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"getType\"", ")", ".", "addModifiers", "(", "Modifier", ".", "PUBLIC", ")", ".", ...
Generate get type. @param schema the schema
[ "Generate", "get", "type", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L707-L723
105,964
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.generateOnShutdown
private void generateOnShutdown(String dataSourceNameClazz) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("shutdown").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Void.TYPE); methodBuilder.addJavadoc("<p>Close database.</p>\n"); methodBuilder.addJavadoc("\n"); methodBuild...
java
private void generateOnShutdown(String dataSourceNameClazz) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("shutdown").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Void.TYPE); methodBuilder.addJavadoc("<p>Close database.</p>\n"); methodBuilder.addJavadoc("\n"); methodBuild...
[ "private", "void", "generateOnShutdown", "(", "String", "dataSourceNameClazz", ")", "{", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"shutdown\"", ")", ".", "addModifiers", "(", "Modifier", ".", "PUBLIC", ")", "."...
Generate on shutdown. @param dataSourceNameClazz the data source name clazz
[ "Generate", "on", "shutdown", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L755-L766
105,965
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java
BindContentProviderBuilder.generateQuery
private void generateQuery(SQLiteDatabaseSchema schema) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("query").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Cursor.class); methodBuilder.addParameter(Uri.class, "uri"); methodBuilder.addParameter(ParameterSpec.builder(TypeUtili...
java
private void generateQuery(SQLiteDatabaseSchema schema) { MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("query").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(Cursor.class); methodBuilder.addParameter(Uri.class, "uri"); methodBuilder.addParameter(ParameterSpec.builder(TypeUtili...
[ "private", "void", "generateQuery", "(", "SQLiteDatabaseSchema", "schema", ")", "{", "MethodSpec", ".", "Builder", "methodBuilder", "=", "MethodSpec", ".", "methodBuilder", "(", "\"query\"", ")", ".", "addModifiers", "(", "Modifier", ".", "PUBLIC", ")", ".", "ad...
Generate query. @param schema the schema
[ "Generate", "query", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindContentProviderBuilder.java#L774-L832
105,966
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/ImmutableUtility.java
ImmutableUtility.generateImmutableCollectionIfPossible
public static void generateImmutableCollectionIfPossible(ModelClass<?> entity, Builder methodBuilder, String name, TypeName typeName) { if (TypeUtility.isList(typeName) && ((ParameterizedTypeName) typeName).rawType.equals(ClassName.get(List.class))) { methodBuilder.addCode("($L==null ? null : $T.unmodifiabl...
java
public static void generateImmutableCollectionIfPossible(ModelClass<?> entity, Builder methodBuilder, String name, TypeName typeName) { if (TypeUtility.isList(typeName) && ((ParameterizedTypeName) typeName).rawType.equals(ClassName.get(List.class))) { methodBuilder.addCode("($L==null ? null : $T.unmodifiabl...
[ "public", "static", "void", "generateImmutableCollectionIfPossible", "(", "ModelClass", "<", "?", ">", "entity", ",", "Builder", "methodBuilder", ",", "String", "name", ",", "TypeName", "typeName", ")", "{", "if", "(", "TypeUtility", ".", "isList", "(", "typeNam...
used for example for dao select result @param entity @param methodBuilder @param name @param typeName
[ "used", "for", "example", "for", "dao", "select", "result" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/ImmutableUtility.java#L196-L216
105,967
xcesco/kripton
kripton-arch-integration/src/main/java/android/arch/paging/PagedList.java
PagedList.get
@Override @Nullable public T get(int index) { T item = mStorage.get(index); if (item != null) { mLastItem = item; } return item; }
java
@Override @Nullable public T get(int index) { T item = mStorage.get(index); if (item != null) { mLastItem = item; } return item; }
[ "@", "Override", "@", "Nullable", "public", "T", "get", "(", "int", "index", ")", "{", "T", "item", "=", "mStorage", ".", "get", "(", "index", ")", ";", "if", "(", "item", "!=", "null", ")", "{", "mLastItem", "=", "item", ";", "}", "return", "ite...
Get the item in the list of loaded items at the provided index. @param index Index in the loaded item list. Must be >= 0, and &lt; {@link #size()} @return The item at the passed index, or null if a null placeholder is at the specified position. @see #size()
[ "Get", "the", "item", "in", "the", "list", "of", "loaded", "items", "at", "the", "provided", "index", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-arch-integration/src/main/java/android/arch/paging/PagedList.java#L379-L387
105,968
xcesco/kripton
kripton-arch-integration/src/main/java/android/arch/paging/PagedList.java
PagedList.loadAround
public void loadAround(int index) { mLastLoad = index + getPositionOffset(); loadAroundInternal(index); mLowestIndexAccessed = Math.min(mLowestIndexAccessed, index); mHighestIndexAccessed = Math.max(mHighestIndexAccessed, index); /* * mLowestIndexAccessed / mHighestInd...
java
public void loadAround(int index) { mLastLoad = index + getPositionOffset(); loadAroundInternal(index); mLowestIndexAccessed = Math.min(mLowestIndexAccessed, index); mHighestIndexAccessed = Math.max(mHighestIndexAccessed, index); /* * mLowestIndexAccessed / mHighestInd...
[ "public", "void", "loadAround", "(", "int", "index", ")", "{", "mLastLoad", "=", "index", "+", "getPositionOffset", "(", ")", ";", "loadAroundInternal", "(", "index", ")", ";", "mLowestIndexAccessed", "=", "Math", ".", "min", "(", "mLowestIndexAccessed", ",", ...
Load adjacent items to passed index. @param index Index at which to load.
[ "Load", "adjacent", "items", "to", "passed", "index", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-arch-integration/src/main/java/android/arch/paging/PagedList.java#L394-L410
105,969
xcesco/kripton
kripton-arch-integration/src/main/java/android/arch/paging/PagedList.java
PagedList.deferBoundaryCallbacks
void deferBoundaryCallbacks(final boolean deferEmpty, final boolean deferBegin, final boolean deferEnd) { if (mBoundaryCallback == null) { throw new IllegalStateException("Can't defer BoundaryCallback, no instance"); } /* * If lowest/highest haven't been initial...
java
void deferBoundaryCallbacks(final boolean deferEmpty, final boolean deferBegin, final boolean deferEnd) { if (mBoundaryCallback == null) { throw new IllegalStateException("Can't defer BoundaryCallback, no instance"); } /* * If lowest/highest haven't been initial...
[ "void", "deferBoundaryCallbacks", "(", "final", "boolean", "deferEmpty", ",", "final", "boolean", "deferBegin", ",", "final", "boolean", "deferEnd", ")", "{", "if", "(", "mBoundaryCallback", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "...
Safe to access main thread only state - no other thread has reference during construction
[ "Safe", "to", "access", "main", "thread", "only", "state", "-", "no", "other", "thread", "has", "reference", "during", "construction" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-arch-integration/src/main/java/android/arch/paging/PagedList.java#L414-L458
105,970
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java
SQLiteDaoDefinition.resolveTypeVariable
void resolveTypeVariable(SQLiteModelMethod value) { // before proceed, we need to resolve typeVariables for (Pair<String, TypeName> item : value.getParameters()) { item.value1 = typeVariableResolver.resolve(item.value1); } value.setReturnClass(typeVariableResolver.resolve(value.getReturnClass())); }
java
void resolveTypeVariable(SQLiteModelMethod value) { // before proceed, we need to resolve typeVariables for (Pair<String, TypeName> item : value.getParameters()) { item.value1 = typeVariableResolver.resolve(item.value1); } value.setReturnClass(typeVariableResolver.resolve(value.getReturnClass())); }
[ "void", "resolveTypeVariable", "(", "SQLiteModelMethod", "value", ")", "{", "// before proceed, we need to resolve typeVariables", "for", "(", "Pair", "<", "String", ",", "TypeName", ">", "item", ":", "value", ".", "getParameters", "(", ")", ")", "{", "item", ".",...
Convert type variable in correct type. This must be done before work on SQLMethod @param value the value
[ "Convert", "type", "variable", "in", "correct", "type", ".", "This", "must", "be", "done", "before", "work", "on", "SQLMethod" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java#L84-L92
105,971
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java
SQLiteDaoDefinition.buildPreparedStatementName
String buildPreparedStatementName(String methodName) { String name = methodName + "PreparedStatement" + preparedStatementNames.size(); preparedStatementNames.add(name); return name; }
java
String buildPreparedStatementName(String methodName) { String name = methodName + "PreparedStatement" + preparedStatementNames.size(); preparedStatementNames.add(name); return name; }
[ "String", "buildPreparedStatementName", "(", "String", "methodName", ")", "{", "String", "name", "=", "methodName", "+", "\"PreparedStatement\"", "+", "preparedStatementNames", ".", "size", "(", ")", ";", "preparedStatementNames", ".", "add", "(", "name", ")", ";"...
Build and register prepared statement name. @param methodName the method name @return the string
[ "Build", "and", "register", "prepared", "statement", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java#L258-L263
105,972
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java
SQLiteDaoDefinition.generateJava2ContentSerializer
public String generateJava2ContentSerializer(TypeName paramTypeName) { if (!managedParams.containsKey(paramTypeName)) { managedParams.put(paramTypeName, "" + (managedParams.size() + 1)); } return PARAM_SERIALIZER_PREFIX + managedParams.get(paramTypeName); }
java
public String generateJava2ContentSerializer(TypeName paramTypeName) { if (!managedParams.containsKey(paramTypeName)) { managedParams.put(paramTypeName, "" + (managedParams.size() + 1)); } return PARAM_SERIALIZER_PREFIX + managedParams.get(paramTypeName); }
[ "public", "String", "generateJava2ContentSerializer", "(", "TypeName", "paramTypeName", ")", "{", "if", "(", "!", "managedParams", ".", "containsKey", "(", "paramTypeName", ")", ")", "{", "managedParams", ".", "put", "(", "paramTypeName", ",", "\"\"", "+", "(", ...
Generate java 2 content serializer. @param paramTypeName the param type name @return the string
[ "Generate", "java", "2", "content", "serializer", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java#L284-L290
105,973
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java
SQLiteDaoDefinition.generateJava2ContentParser
public String generateJava2ContentParser(TypeName paramTypeName) { if (!managedParams.containsKey(paramTypeName)) { managedParams.put(paramTypeName, "" + (managedParams.size() + 1)); } return PARAM_PARSER_PREFIX + managedParams.get(paramTypeName); }
java
public String generateJava2ContentParser(TypeName paramTypeName) { if (!managedParams.containsKey(paramTypeName)) { managedParams.put(paramTypeName, "" + (managedParams.size() + 1)); } return PARAM_PARSER_PREFIX + managedParams.get(paramTypeName); }
[ "public", "String", "generateJava2ContentParser", "(", "TypeName", "paramTypeName", ")", "{", "if", "(", "!", "managedParams", ".", "containsKey", "(", "paramTypeName", ")", ")", "{", "managedParams", ".", "put", "(", "paramTypeName", ",", "\"\"", "+", "(", "m...
Generate java 2 content parser. @param paramTypeName the param type name @return the string
[ "Generate", "java", "2", "content", "parser", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java#L299-L305
105,974
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java
SQLiteDaoDefinition.hasSamePackageOfSchema
public boolean hasSamePackageOfSchema() { String packageName = getPackageName(); String schemaPackageName = getParent().getPackageName(); return packageName.equals(schemaPackageName); }
java
public boolean hasSamePackageOfSchema() { String packageName = getPackageName(); String schemaPackageName = getParent().getPackageName(); return packageName.equals(schemaPackageName); }
[ "public", "boolean", "hasSamePackageOfSchema", "(", ")", "{", "String", "packageName", "=", "getPackageName", "(", ")", ";", "String", "schemaPackageName", "=", "getParent", "(", ")", ".", "getPackageName", "(", ")", ";", "return", "packageName", ".", "equals", ...
Returns true if dao and schema stay in same package @return
[ "Returns", "true", "if", "dao", "and", "schema", "stay", "in", "same", "package" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/model/SQLiteDaoDefinition.java#L371-L376
105,975
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/GenericSQLHelper.java
GenericSQLHelper.generateSubjectNext
public static void generateSubjectNext(SQLiteEntity entity, MethodSpec.Builder methodBuilder, SubjectType subjectType, String value) { String subInsertType = ""; if (subjectType == SubjectType.INSERT) { if (entity.getPrimaryKey().isType(String.class)) { subInsertType = "WithUid"; } else { subInsert...
java
public static void generateSubjectNext(SQLiteEntity entity, MethodSpec.Builder methodBuilder, SubjectType subjectType, String value) { String subInsertType = ""; if (subjectType == SubjectType.INSERT) { if (entity.getPrimaryKey().isType(String.class)) { subInsertType = "WithUid"; } else { subInsert...
[ "public", "static", "void", "generateSubjectNext", "(", "SQLiteEntity", "entity", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "SubjectType", "subjectType", ",", "String", "value", ")", "{", "String", "subInsertType", "=", "\"\"", ";", "if", "(", "su...
Generate subject next. @param entity @param methodBuilder the method builder @param subjectType the subject type @param value
[ "Generate", "subject", "next", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/GenericSQLHelper.java#L91-L107
105,976
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readBoolean
public static Boolean readBoolean(String value, Boolean defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Boolean.valueOf(value); }
java
public static Boolean readBoolean(String value, Boolean defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Boolean.valueOf(value); }
[ "public", "static", "Boolean", "readBoolean", "(", "String", "value", ",", "Boolean", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Boolean", ".", "valueOf", "(", ...
Read boolean. @param value the value @param defaultValue the default value @return the boolean
[ "Read", "boolean", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L31-L35
105,977
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readByte
public static Byte readByte(String value, Byte defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Byte.valueOf(value); }
java
public static Byte readByte(String value, Byte defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Byte.valueOf(value); }
[ "public", "static", "Byte", "readByte", "(", "String", "value", ",", "Byte", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Byte", ".", "valueOf", "(", "value", "...
Read byte. @param value the value @param defaultValue the default value @return the byte
[ "Read", "byte", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L56-L60
105,978
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readCharacter
public static Character readCharacter(String value, Character defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Character.valueOf((char)Integer.parseInt(value)); }
java
public static Character readCharacter(String value, Character defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Character.valueOf((char)Integer.parseInt(value)); }
[ "public", "static", "Character", "readCharacter", "(", "String", "value", ",", "Character", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Character", ".", "valueOf", ...
Read character. @param value the value @param defaultValue the default value @return the character
[ "Read", "character", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L80-L84
105,979
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readShort
public static Short readShort(String value, Short defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Short.valueOf(value); }
java
public static Short readShort(String value, Short defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Short.valueOf(value); }
[ "public", "static", "Short", "readShort", "(", "String", "value", ",", "Short", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Short", ".", "valueOf", "(", "value",...
Read short. @param value the value @param defaultValue the default value @return the short
[ "Read", "short", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L104-L108
105,980
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readInteger
public static Integer readInteger(String value, Integer defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Integer.valueOf(value); }
java
public static Integer readInteger(String value, Integer defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Integer.valueOf(value); }
[ "public", "static", "Integer", "readInteger", "(", "String", "value", ",", "Integer", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Integer", ".", "valueOf", "(", ...
Read integer. @param value the value @param defaultValue the default value @return the integer
[ "Read", "integer", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L128-L132
105,981
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readLong
public static Long readLong(String value, Long defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Long.valueOf(value); }
java
public static Long readLong(String value, Long defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Long.valueOf(value); }
[ "public", "static", "Long", "readLong", "(", "String", "value", ",", "Long", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Long", ".", "valueOf", "(", "value", "...
Read long. @param value the value @param defaultValue the default value @return the long
[ "Read", "long", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L152-L156
105,982
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readFloat
public static Float readFloat(String value, Float defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Float.valueOf(value); }
java
public static Float readFloat(String value, Float defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Float.valueOf(value); }
[ "public", "static", "Float", "readFloat", "(", "String", "value", ",", "Float", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Float", ".", "valueOf", "(", "value",...
Read float. @param value the value @param defaultValue the default value @return the float
[ "Read", "float", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L176-L180
105,983
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readDouble
public static Double readDouble(String value, Double defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Double.valueOf(value); }
java
public static Double readDouble(String value, Double defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Double.valueOf(value); }
[ "public", "static", "Double", "readDouble", "(", "String", "value", ",", "Double", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Double", ".", "valueOf", "(", "val...
Read double. @param value the value @param defaultValue the default value @return the double
[ "Read", "double", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L200-L204
105,984
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeBoolean
public static String writeBoolean(Boolean value) { if (value==null) return null; return Boolean.toString(value); }
java
public static String writeBoolean(Boolean value) { if (value==null) return null; return Boolean.toString(value); }
[ "public", "static", "String", "writeBoolean", "(", "Boolean", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Boolean", ".", "toString", "(", "value", ")", ";", "}" ]
Write boolean. @param value the value @return the string
[ "Write", "boolean", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L223-L227
105,985
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeCharacter
public static String writeCharacter(Character value) { if (value==null) return null; return Integer.toString((int)value); }
java
public static String writeCharacter(Character value) { if (value==null) return null; return Integer.toString((int)value); }
[ "public", "static", "String", "writeCharacter", "(", "Character", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Integer", ".", "toString", "(", "(", "int", ")", "value", ")", ";", "}" ]
Write character. @param value the value @return the string
[ "Write", "character", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L247-L251
105,986
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeShort
public static String writeShort(Short value) { if (value==null) return null; return Short.toString(value); }
java
public static String writeShort(Short value) { if (value==null) return null; return Short.toString(value); }
[ "public", "static", "String", "writeShort", "(", "Short", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Short", ".", "toString", "(", "value", ")", ";", "}" ]
Write short. @param value the value @return the string
[ "Write", "short", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L259-L263
105,987
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeInteger
public static String writeInteger(Integer value) { if (value==null) return null; return Integer.toString(value); }
java
public static String writeInteger(Integer value) { if (value==null) return null; return Integer.toString(value); }
[ "public", "static", "String", "writeInteger", "(", "Integer", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Integer", ".", "toString", "(", "value", ")", ";", "}" ]
Write integer. @param value the value @return the string
[ "Write", "integer", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L271-L275
105,988
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeLong
public static String writeLong(Long value) { if (value==null) return null; return Long.toString(value); }
java
public static String writeLong(Long value) { if (value==null) return null; return Long.toString(value); }
[ "public", "static", "String", "writeLong", "(", "Long", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Long", ".", "toString", "(", "value", ")", ";", "}" ]
Write long. @param value the value @return the string
[ "Write", "long", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L283-L287
105,989
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeFloat
public static String writeFloat(Float value) { if (value==null) return null; return Float.toString(value); }
java
public static String writeFloat(Float value) { if (value==null) return null; return Float.toString(value); }
[ "public", "static", "String", "writeFloat", "(", "Float", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Float", ".", "toString", "(", "value", ")", ";", "}" ]
Write float. @param value the value @return the string
[ "Write", "float", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L295-L299
105,990
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.writeDouble
public static String writeDouble(Double value) { if (value==null) return null; return Double.toString(value); }
java
public static String writeDouble(Double value) { if (value==null) return null; return Double.toString(value); }
[ "public", "static", "String", "writeDouble", "(", "Double", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "return", "Double", ".", "toString", "(", "value", ")", ";", "}" ]
Write double. @param value the value @return the string
[ "Write", "double", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L307-L311
105,991
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java
AbstractDataSource.buildTaskList
protected List<SQLiteUpdateTask> buildTaskList(int previousVersion, int currentVersion) { List<SQLiteUpdateTask> result = new ArrayList<>(); for (Pair<Integer, ? extends SQLiteUpdateTask> item : this.options.updateTasks) { if (item.value0 - 1 == previousVersion) { result.add(item.value1); previousVersio...
java
protected List<SQLiteUpdateTask> buildTaskList(int previousVersion, int currentVersion) { List<SQLiteUpdateTask> result = new ArrayList<>(); for (Pair<Integer, ? extends SQLiteUpdateTask> item : this.options.updateTasks) { if (item.value0 - 1 == previousVersion) { result.add(item.value1); previousVersio...
[ "protected", "List", "<", "SQLiteUpdateTask", ">", "buildTaskList", "(", "int", "previousVersion", ",", "int", "currentVersion", ")", "{", "List", "<", "SQLiteUpdateTask", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Pair", "<", ...
Builds the task list. @param previousVersion the previous version @param currentVersion the current version @return the list
[ "Builds", "the", "task", "list", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java#L402-L421
105,992
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java
AbstractDataSource.createHelper
protected void createHelper(DataSourceOptions options) { if (KriptonLibrary.getContext() == null) throw new KriptonRuntimeException("Kripton library is not properly initialized. Please use KriptonLibrary.init(context) somewhere at application startup"); if (options.inMemory) { Logger.info("In-memory databa...
java
protected void createHelper(DataSourceOptions options) { if (KriptonLibrary.getContext() == null) throw new KriptonRuntimeException("Kripton library is not properly initialized. Please use KriptonLibrary.init(context) somewhere at application startup"); if (options.inMemory) { Logger.info("In-memory databa...
[ "protected", "void", "createHelper", "(", "DataSourceOptions", "options", ")", "{", "if", "(", "KriptonLibrary", ".", "getContext", "(", ")", "==", "null", ")", "throw", "new", "KriptonRuntimeException", "(", "\"Kripton library is not properly initialized. Please use Krip...
Creates the helper. @param options the options
[ "Creates", "the", "helper", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java#L429-L463
105,993
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java
AbstractDataSource.onDowngrade
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (AbstractDataSource.this.options.databaseLifecycleHandler != null) { AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, false); versionChanged = true; } }
java
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (AbstractDataSource.this.options.databaseLifecycleHandler != null) { AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, false); versionChanged = true; } }
[ "public", "void", "onDowngrade", "(", "SQLiteDatabase", "db", ",", "int", "oldVersion", ",", "int", "newVersion", ")", "{", "if", "(", "AbstractDataSource", ".", "this", ".", "options", ".", "databaseLifecycleHandler", "!=", "null", ")", "{", "AbstractDataSource...
On downgrade. @param db the db @param oldVersion the old version @param newVersion the new version
[ "On", "downgrade", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java#L537-L542
105,994
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java
AbstractDataSource.onUpgrade
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (AbstractDataSource.this.options.databaseLifecycleHandler != null) { AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, true); versionChanged = true; } }
java
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (AbstractDataSource.this.options.databaseLifecycleHandler != null) { AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, true); versionChanged = true; } }
[ "public", "void", "onUpgrade", "(", "SQLiteDatabase", "db", ",", "int", "oldVersion", ",", "int", "newVersion", ")", "{", "if", "(", "AbstractDataSource", ".", "this", ".", "options", ".", "databaseLifecycleHandler", "!=", "null", ")", "{", "AbstractDataSource",...
On upgrade. @param db the db @param oldVersion the old version @param newVersion the new version
[ "On", "upgrade", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java#L554-L559
105,995
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrue
public static void assertTrue(boolean expression, String messageFormat, Object... args) { if (!expression) throw (new KriptonProcessorException(String.format(messageFormat, args))); }
java
public static void assertTrue(boolean expression, String messageFormat, Object... args) { if (!expression) throw (new KriptonProcessorException(String.format(messageFormat, args))); }
[ "public", "static", "void", "assertTrue", "(", "boolean", "expression", ",", "String", "messageFormat", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "expression", ")", "throw", "(", "new", "KriptonProcessorException", "(", "String", ".", "format", ...
Assertion which generate an exception if expression is not true. @param expression the expression @param messageFormat the message format @param args the args
[ "Assertion", "which", "generate", "an", "exception", "if", "expression", "is", "not", "true", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L69-L73
105,996
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrInvalidMethodSignException
public static void assertTrueOrInvalidMethodSignException(boolean expression, SQLiteModelMethod method, String messageFormat, Object... args) { if (!expression) throw (new InvalidMethodSignException(method, String.format(messageFormat, args))); }
java
public static void assertTrueOrInvalidMethodSignException(boolean expression, SQLiteModelMethod method, String messageFormat, Object... args) { if (!expression) throw (new InvalidMethodSignException(method, String.format(messageFormat, args))); }
[ "public", "static", "void", "assertTrueOrInvalidMethodSignException", "(", "boolean", "expression", ",", "SQLiteModelMethod", "method", ",", "String", "messageFormat", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "expression", ")", "throw", "(", "new", ...
Assert true or invalid method sign exception. @param expression the expression @param method the method @param messageFormat the message format @param args the args
[ "Assert", "true", "or", "invalid", "method", "sign", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L87-L91
105,997
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.failWithInvalidMethodSignException
public static void failWithInvalidMethodSignException(boolean expression, SQLiteModelMethod method, String messageFormat, Object... args) { assertTrueOrInvalidMethodSignException(!expression, method, messageFormat, args); }
java
public static void failWithInvalidMethodSignException(boolean expression, SQLiteModelMethod method, String messageFormat, Object... args) { assertTrueOrInvalidMethodSignException(!expression, method, messageFormat, args); }
[ "public", "static", "void", "failWithInvalidMethodSignException", "(", "boolean", "expression", ",", "SQLiteModelMethod", "method", ",", "String", "messageFormat", ",", "Object", "...", "args", ")", "{", "assertTrueOrInvalidMethodSignException", "(", "!", "expression", ...
if expression is true, it fails. It is the opposite of assert @param expression the expression @param method the method @param messageFormat the message format @param args the args
[ "if", "expression", "is", "true", "it", "fails", ".", "It", "is", "the", "opposite", "of", "assert" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L131-L134
105,998
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.failIncompatibleAttributesInAnnotationException
public static void failIncompatibleAttributesInAnnotationException(String messageFormat, Object... args) { throw (new IncompatibleAttributesInAnnotationException(String.format(messageFormat, args))); }
java
public static void failIncompatibleAttributesInAnnotationException(String messageFormat, Object... args) { throw (new IncompatibleAttributesInAnnotationException(String.format(messageFormat, args))); }
[ "public", "static", "void", "failIncompatibleAttributesInAnnotationException", "(", "String", "messageFormat", ",", "Object", "...", "args", ")", "{", "throw", "(", "new", "IncompatibleAttributesInAnnotationException", "(", "String", ".", "format", "(", "messageFormat", ...
Fail incompatible attributes in annotation exception. @param messageFormat the message format @param args the args
[ "Fail", "incompatible", "attributes", "in", "annotation", "exception", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L156-L158
105,999
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.fail
public static void fail(boolean expression, String messageFormat, Object... args) { assertTrue(!expression, messageFormat, args); }
java
public static void fail(boolean expression, String messageFormat, Object... args) { assertTrue(!expression, messageFormat, args); }
[ "public", "static", "void", "fail", "(", "boolean", "expression", ",", "String", "messageFormat", ",", "Object", "...", "args", ")", "{", "assertTrue", "(", "!", "expression", ",", "messageFormat", ",", "args", ")", ";", "}" ]
Fails if expression is true. @param expression the expression @param messageFormat the message format @param args the args
[ "Fails", "if", "expression", "is", "true", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L170-L172