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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
152,800 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/EntityUtilities.java | EntityUtilities.findTranslationLocaleFromString | public static LocaleWrapper findTranslationLocaleFromString(final LocaleProvider localeProvider, final String localeString) {
if (localeString == null) return null;
final CollectionWrapper<LocaleWrapper> locales = localeProvider.getLocales();
for (final LocaleWrapper locale : locales.getItems()... | java | public static LocaleWrapper findTranslationLocaleFromString(final LocaleProvider localeProvider, final String localeString) {
if (localeString == null) return null;
final CollectionWrapper<LocaleWrapper> locales = localeProvider.getLocales();
for (final LocaleWrapper locale : locales.getItems()... | [
"public",
"static",
"LocaleWrapper",
"findTranslationLocaleFromString",
"(",
"final",
"LocaleProvider",
"localeProvider",
",",
"final",
"String",
"localeString",
")",
"{",
"if",
"(",
"localeString",
"==",
"null",
")",
"return",
"null",
";",
"final",
"CollectionWrapper... | Finds the matching locale entity from a translation locale string.
@param localeProvider
@param localeString
@return | [
"Finds",
"the",
"matching",
"locale",
"entity",
"from",
"a",
"translation",
"locale",
"string",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/EntityUtilities.java#L471-L482 |
152,801 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObject.java | DataObject.firstMandatoryNullProperty | public String firstMandatoryNullProperty()
{
for (String property : model.propertyList)
{
if (
model.mandatorySet.contains(property) &&
model.defaultMap.get(property) == null &&
data.get(property) == null
... | java | public String firstMandatoryNullProperty()
{
for (String property : model.propertyList)
{
if (
model.mandatorySet.contains(property) &&
model.defaultMap.get(property) == null &&
data.get(property) == null
... | [
"public",
"String",
"firstMandatoryNullProperty",
"(",
")",
"{",
"for",
"(",
"String",
"property",
":",
"model",
".",
"propertyList",
")",
"{",
"if",
"(",
"model",
".",
"mandatorySet",
".",
"contains",
"(",
"property",
")",
"&&",
"model",
".",
"defaultMap",
... | Returns The first, in property order, property which is mandatory and is
not set. If all mandatory properties have values, returns null.
@return | [
"Returns",
"The",
"first",
"in",
"property",
"order",
"property",
"which",
"is",
"mandatory",
"and",
"is",
"not",
"set",
".",
"If",
"all",
"mandatory",
"properties",
"have",
"values",
"returns",
"null",
"."
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObject.java#L309-L323 |
152,802 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObject.java | DataObject.populate | public void populate(Map<String, String[]> map)
{
for (Entry<String, String[]> entry : map.entrySet())
{
String property = entry.getKey();
if (model.typeMap.containsKey(property))
{
String[] values = entry.getValue();
if (va... | java | public void populate(Map<String, String[]> map)
{
for (Entry<String, String[]> entry : map.entrySet())
{
String property = entry.getKey();
if (model.typeMap.containsKey(property))
{
String[] values = entry.getValue();
if (va... | [
"public",
"void",
"populate",
"(",
"Map",
"<",
"String",
",",
"String",
"[",
"]",
">",
"map",
")",
"{",
"for",
"(",
"Entry",
"<",
"String",
",",
"String",
"[",
"]",
">",
"entry",
":",
"map",
".",
"entrySet",
"(",
")",
")",
"{",
"String",
"propert... | Convenience method to support ServletRequest.
@param map | [
"Convenience",
"method",
"to",
"support",
"ServletRequest",
"."
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObject.java#L416-L434 |
152,803 | tvesalainen/hoski-lib | src/main/java/fi/hoski/datastore/repository/DataObject.java | DataObject.writeCSV | public static void writeCSV(DataObjectModel model, Collection<? extends DataObject> collection, OutputStream os) throws IOException
{
BufferedOutputStream bos = new BufferedOutputStream(os);
OutputStreamWriter osw = new OutputStreamWriter(bos, "ISO-8859-1");
CSVWriter writer = new CSVWri... | java | public static void writeCSV(DataObjectModel model, Collection<? extends DataObject> collection, OutputStream os) throws IOException
{
BufferedOutputStream bos = new BufferedOutputStream(os);
OutputStreamWriter osw = new OutputStreamWriter(bos, "ISO-8859-1");
CSVWriter writer = new CSVWri... | [
"public",
"static",
"void",
"writeCSV",
"(",
"DataObjectModel",
"model",
",",
"Collection",
"<",
"?",
"extends",
"DataObject",
">",
"collection",
",",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"BufferedOutputStream",
"bos",
"=",
"new",
"BufferedOutp... | Writes collection of DataObjects in csv format. OutputStream is not closed
after operation.
@param os
@param collection
@throws IOException | [
"Writes",
"collection",
"of",
"DataObjects",
"in",
"csv",
"format",
".",
"OutputStream",
"is",
"not",
"closed",
"after",
"operation",
"."
] | 9b5bab44113e0adb74bf1ee436013e8a7c608d00 | https://github.com/tvesalainen/hoski-lib/blob/9b5bab44113e0adb74bf1ee436013e8a7c608d00/src/main/java/fi/hoski/datastore/repository/DataObject.java#L483-L508 |
152,804 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/utils/FilterUtilities.java | FilterUtilities.getUrlVariables | public static HashMap<String, String> getUrlVariables(final Filter filter) {
final HashMap<String, String> vars = new HashMap<String, String>();
for (final FilterTag filterTag : filter.getFilterTags()) {
final Tag tag = filterTag.getTag();
final Integer tagState = filterTag.getT... | java | public static HashMap<String, String> getUrlVariables(final Filter filter) {
final HashMap<String, String> vars = new HashMap<String, String>();
for (final FilterTag filterTag : filter.getFilterTags()) {
final Tag tag = filterTag.getTag();
final Integer tagState = filterTag.getT... | [
"public",
"static",
"HashMap",
"<",
"String",
",",
"String",
">",
"getUrlVariables",
"(",
"final",
"Filter",
"filter",
")",
"{",
"final",
"HashMap",
"<",
"String",
",",
"String",
">",
"vars",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",... | Translate the contents of this filter, its tags and categories into
variables that can be appended to a url
@return | [
"Translate",
"the",
"contents",
"of",
"this",
"filter",
"its",
"tags",
"and",
"categories",
"into",
"variables",
"that",
"can",
"be",
"appended",
"to",
"a",
"url"
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/utils/FilterUtilities.java#L55-L129 |
152,805 | NessComputing/components-ness-event | core/src/main/java/com/nesscomputing/event/NessEvent.java | NessEvent.createEvent | @JsonCreator
static NessEvent createEvent(@Nullable @JsonProperty("user") final UUID user,
@Nullable @JsonProperty("timestamp") final DateTime timestamp,
@Nonnull @JsonProperty("id") final UUID id,
... | java | @JsonCreator
static NessEvent createEvent(@Nullable @JsonProperty("user") final UUID user,
@Nullable @JsonProperty("timestamp") final DateTime timestamp,
@Nonnull @JsonProperty("id") final UUID id,
... | [
"@",
"JsonCreator",
"static",
"NessEvent",
"createEvent",
"(",
"@",
"Nullable",
"@",
"JsonProperty",
"(",
"\"user\"",
")",
"final",
"UUID",
"user",
",",
"@",
"Nullable",
"@",
"JsonProperty",
"(",
"\"timestamp\"",
")",
"final",
"DateTime",
"timestamp",
",",
"@"... | Create a new event from over-the-wire json.
@param user User that the event happened for. Can be null for a system level event.
@param timestamp The time when this event entered the system
@param type The Event type.
@param payload Arbitrary data describing the event.
@param id UUID as event id. | [
"Create",
"a",
"new",
"event",
"from",
"over",
"-",
"the",
"-",
"wire",
"json",
"."
] | 6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33 | https://github.com/NessComputing/components-ness-event/blob/6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33/core/src/main/java/com/nesscomputing/event/NessEvent.java#L63-L71 |
152,806 | NessComputing/components-ness-event | core/src/main/java/com/nesscomputing/event/NessEvent.java | NessEvent.createEvent | public static NessEvent createEvent(@Nullable final UUID user,
@Nullable final DateTime timestamp,
@Nonnull final NessEventType type,
@Nullable final Map<String, ? extends Object> payload)
{
... | java | public static NessEvent createEvent(@Nullable final UUID user,
@Nullable final DateTime timestamp,
@Nonnull final NessEventType type,
@Nullable final Map<String, ? extends Object> payload)
{
... | [
"public",
"static",
"NessEvent",
"createEvent",
"(",
"@",
"Nullable",
"final",
"UUID",
"user",
",",
"@",
"Nullable",
"final",
"DateTime",
"timestamp",
",",
"@",
"Nonnull",
"final",
"NessEventType",
"type",
",",
"@",
"Nullable",
"final",
"Map",
"<",
"String",
... | Create a new event.
@param user User that the event happened for. Can be null for a system level event.
@param timestamp The time when this event entered the system
@param type The Event type.
@param payload Arbitrary data describing the event. | [
"Create",
"a",
"new",
"event",
"."
] | 6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33 | https://github.com/NessComputing/components-ness-event/blob/6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33/core/src/main/java/com/nesscomputing/event/NessEvent.java#L81-L87 |
152,807 | NessComputing/components-ness-event | core/src/main/java/com/nesscomputing/event/NessEvent.java | NessEvent.createEvent | public static NessEvent createEvent(@Nullable final UUID user,
@Nonnull final NessEventType type)
{
return new NessEvent(user, new DateTime(DateTimeZone.UTC), type, Collections.<String, Object>emptyMap(), UUID.randomUUID());
} | java | public static NessEvent createEvent(@Nullable final UUID user,
@Nonnull final NessEventType type)
{
return new NessEvent(user, new DateTime(DateTimeZone.UTC), type, Collections.<String, Object>emptyMap(), UUID.randomUUID());
} | [
"public",
"static",
"NessEvent",
"createEvent",
"(",
"@",
"Nullable",
"final",
"UUID",
"user",
",",
"@",
"Nonnull",
"final",
"NessEventType",
"type",
")",
"{",
"return",
"new",
"NessEvent",
"(",
"user",
",",
"new",
"DateTime",
"(",
"DateTimeZone",
".",
"UTC"... | Convenience constructor that assumes no payload. | [
"Convenience",
"constructor",
"that",
"assumes",
"no",
"payload",
"."
] | 6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33 | https://github.com/NessComputing/components-ness-event/blob/6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33/core/src/main/java/com/nesscomputing/event/NessEvent.java#L103-L107 |
152,808 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/HistoryHandler.java | HistoryHandler.getHistorySourceDate | public BaseField getHistorySourceDate()
{
if (m_fldSourceHistoryDate == null)
{
if (m_iSourceDateSeq != null)
m_fldSourceHistoryDate = this.getOwner().getField(m_iSourceDateSeq);
else if (this.getHistoryRecord() instanceof VirtualRecord)
m_fldS... | java | public BaseField getHistorySourceDate()
{
if (m_fldSourceHistoryDate == null)
{
if (m_iSourceDateSeq != null)
m_fldSourceHistoryDate = this.getOwner().getField(m_iSourceDateSeq);
else if (this.getHistoryRecord() instanceof VirtualRecord)
m_fldS... | [
"public",
"BaseField",
"getHistorySourceDate",
"(",
")",
"{",
"if",
"(",
"m_fldSourceHistoryDate",
"==",
"null",
")",
"{",
"if",
"(",
"m_iSourceDateSeq",
"!=",
"null",
")",
"m_fldSourceHistoryDate",
"=",
"this",
".",
"getOwner",
"(",
")",
".",
"getField",
"(",... | Get the date source from this record | [
"Get",
"the",
"date",
"source",
"from",
"this",
"record"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/HistoryHandler.java#L170-L180 |
152,809 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/event/HistoryHandler.java | HistoryHandler.bumpTime | public Date bumpTime(DateTimeField fieldTarget)
{
Date dateBefore = fieldTarget.getDateTime();
Calendar calTarget = fieldTarget.getCalendar();
calTarget.add(Calendar.SECOND, 1);
fieldTarget.setCalendar(calTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
return dateBefor... | java | public Date bumpTime(DateTimeField fieldTarget)
{
Date dateBefore = fieldTarget.getDateTime();
Calendar calTarget = fieldTarget.getCalendar();
calTarget.add(Calendar.SECOND, 1);
fieldTarget.setCalendar(calTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
return dateBefor... | [
"public",
"Date",
"bumpTime",
"(",
"DateTimeField",
"fieldTarget",
")",
"{",
"Date",
"dateBefore",
"=",
"fieldTarget",
".",
"getDateTime",
"(",
")",
";",
"Calendar",
"calTarget",
"=",
"fieldTarget",
".",
"getCalendar",
"(",
")",
";",
"calTarget",
".",
"add",
... | Bump time field by a second.
@param fieldTarget
@return | [
"Bump",
"time",
"field",
"by",
"a",
"second",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/HistoryHandler.java#L252-L259 |
152,810 | schwa-lab/libschwa-java | src/main/java/org/schwa/dr/AnnSchema.java | AnnSchema.getField | public FieldSchema getField(String name) {
for (FieldSchema field : fieldSchemas)
if (field.getName().equals(name))
return field;
return null;
} | java | public FieldSchema getField(String name) {
for (FieldSchema field : fieldSchemas)
if (field.getName().equals(name))
return field;
return null;
} | [
"public",
"FieldSchema",
"getField",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"FieldSchema",
"field",
":",
"fieldSchemas",
")",
"if",
"(",
"field",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"return",
"field",
";",
"return",
"n... | Returns the schema for the field on this annotation class whose name matches the provided
name. This method returns null if no field matches. | [
"Returns",
"the",
"schema",
"for",
"the",
"field",
"on",
"this",
"annotation",
"class",
"whose",
"name",
"matches",
"the",
"provided",
"name",
".",
"This",
"method",
"returns",
"null",
"if",
"no",
"field",
"matches",
"."
] | 83a2330e212bbc0fcd62be12453424736d997f41 | https://github.com/schwa-lab/libschwa-java/blob/83a2330e212bbc0fcd62be12453424736d997f41/src/main/java/org/schwa/dr/AnnSchema.java#L50-L55 |
152,811 | wigforss/Ka-Commons-Reflection | src/main/java/org/kasource/commons/util/FileUtils.java | FileUtils.copyFile | public static void copyFile(File in, File out) throws IOException {
FileChannel inChannel = new
FileInputStream(in).getChannel();
FileChannel outChannel = new
FileOutputStream(out).getChannel();
try {
inChannel.transferTo(0, inChannel.size(), outChannel);
}
catch (IO... | java | public static void copyFile(File in, File out) throws IOException {
FileChannel inChannel = new
FileInputStream(in).getChannel();
FileChannel outChannel = new
FileOutputStream(out).getChannel();
try {
inChannel.transferTo(0, inChannel.size(), outChannel);
}
catch (IO... | [
"public",
"static",
"void",
"copyFile",
"(",
"File",
"in",
",",
"File",
"out",
")",
"throws",
"IOException",
"{",
"FileChannel",
"inChannel",
"=",
"new",
"FileInputStream",
"(",
"in",
")",
".",
"getChannel",
"(",
")",
";",
"FileChannel",
"outChannel",
"=",
... | Copy file a file from one location to another.
@param in Source file
@param out Target file
@throws IOException if any error occurred. | [
"Copy",
"file",
"a",
"file",
"from",
"one",
"location",
"to",
"another",
"."
] | a80f7a164cd800089e4f4dd948ca6f0e7badcf33 | https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/util/FileUtils.java#L30-L49 |
152,812 | tvesalainen/util | util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java | LevenbergMarquardt.adjustParam | private boolean adjustParam(DenseMatrix64F X, DenseMatrix64F Y,
double prevCost) {
// lambda adjusts how big of a step it takes
double lambda = initialLambda;
// the difference between the current and previous cost
double difference = 1000;
... | java | private boolean adjustParam(DenseMatrix64F X, DenseMatrix64F Y,
double prevCost) {
// lambda adjusts how big of a step it takes
double lambda = initialLambda;
// the difference between the current and previous cost
double difference = 1000;
... | [
"private",
"boolean",
"adjustParam",
"(",
"DenseMatrix64F",
"X",
",",
"DenseMatrix64F",
"Y",
",",
"double",
"prevCost",
")",
"{",
"// lambda adjusts how big of a step it takes\r",
"double",
"lambda",
"=",
"initialLambda",
";",
"// the difference between the current and previo... | Iterate until the difference between the costs is insignificant
or it iterates too many times | [
"Iterate",
"until",
"the",
"difference",
"between",
"the",
"costs",
"is",
"insignificant",
"or",
"it",
"iterates",
"too",
"many",
"times"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java#L158-L200 |
152,813 | tvesalainen/util | util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java | LevenbergMarquardt.computeDandH | private void computeDandH( DenseMatrix64F param , DenseMatrix64F x , DenseMatrix64F y )
{
func.compute(param,x, tempDH);
subtractEquals(tempDH, y);
if (jacobianFactory != null)
{
jacobianFactory.computeJacobian(param, x, jacobian);
}
else
... | java | private void computeDandH( DenseMatrix64F param , DenseMatrix64F x , DenseMatrix64F y )
{
func.compute(param,x, tempDH);
subtractEquals(tempDH, y);
if (jacobianFactory != null)
{
jacobianFactory.computeJacobian(param, x, jacobian);
}
else
... | [
"private",
"void",
"computeDandH",
"(",
"DenseMatrix64F",
"param",
",",
"DenseMatrix64F",
"x",
",",
"DenseMatrix64F",
"y",
")",
"{",
"func",
".",
"compute",
"(",
"param",
",",
"x",
",",
"tempDH",
")",
";",
"subtractEquals",
"(",
"tempDH",
",",
"y",
")",
... | Computes the d and H parameters. Where d is the average error gradient and
H is an approximation of the hessian. | [
"Computes",
"the",
"d",
"and",
"H",
"parameters",
".",
"Where",
"d",
"is",
"the",
"average",
"error",
"gradient",
"and",
"H",
"is",
"an",
"approximation",
"of",
"the",
"hessian",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java#L242-L271 |
152,814 | jbundle/jbundle | thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/BaseSessionProxy.java | BaseSessionProxy.checkForSession | public BaseSessionProxy checkForSession(String strClassAndID)
{
int iColon = strClassAndID.indexOf(CLASS_SEPARATOR);
String strSessionClass = null;
if (iColon != -1)
strSessionClass = strClassAndID.substring(0, iColon);
String strID = strClassAndID.substring(iColon + 1);
... | java | public BaseSessionProxy checkForSession(String strClassAndID)
{
int iColon = strClassAndID.indexOf(CLASS_SEPARATOR);
String strSessionClass = null;
if (iColon != -1)
strSessionClass = strClassAndID.substring(0, iColon);
String strID = strClassAndID.substring(iColon + 1);
... | [
"public",
"BaseSessionProxy",
"checkForSession",
"(",
"String",
"strClassAndID",
")",
"{",
"int",
"iColon",
"=",
"strClassAndID",
".",
"indexOf",
"(",
"CLASS_SEPARATOR",
")",
";",
"String",
"strSessionClass",
"=",
"null",
";",
"if",
"(",
"iColon",
"!=",
"-",
"... | Check for session.
@param strClassAndID
@return | [
"Check",
"for",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/BaseSessionProxy.java#L102-L116 |
152,815 | etnetera/seb | src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java | BasicSebConfiguration.getDefaultBaseUrlRegex | protected String getDefaultBaseUrlRegex() {
String baseUrl = getBaseUrl();
return baseUrl == null ? null : Pattern.quote(baseUrl);
} | java | protected String getDefaultBaseUrlRegex() {
String baseUrl = getBaseUrl();
return baseUrl == null ? null : Pattern.quote(baseUrl);
} | [
"protected",
"String",
"getDefaultBaseUrlRegex",
"(",
")",
"{",
"String",
"baseUrl",
"=",
"getBaseUrl",
"(",
")",
";",
"return",
"baseUrl",
"==",
"null",
"?",
"null",
":",
"Pattern",
".",
"quote",
"(",
"baseUrl",
")",
";",
"}"
] | Default base URL regex for pages. Override this for different value.
@return The base URL regex | [
"Default",
"base",
"URL",
"regex",
"for",
"pages",
".",
"Override",
"this",
"for",
"different",
"value",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java#L134-L137 |
152,816 | etnetera/seb | src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java | BasicSebConfiguration.getDefaultReportDir | protected File getDefaultReportDir() {
File reportsRootDir = getReportsRootDir();
if (reportsRootDir == null) {
throw new SebException("Reports root directory is null");
}
if (!reportsRootDir.exists()) {
try {
Files.createDirectories(reportsRootDir.toPath());
} catch (IOException e) {
throw new... | java | protected File getDefaultReportDir() {
File reportsRootDir = getReportsRootDir();
if (reportsRootDir == null) {
throw new SebException("Reports root directory is null");
}
if (!reportsRootDir.exists()) {
try {
Files.createDirectories(reportsRootDir.toPath());
} catch (IOException e) {
throw new... | [
"protected",
"File",
"getDefaultReportDir",
"(",
")",
"{",
"File",
"reportsRootDir",
"=",
"getReportsRootDir",
"(",
")",
";",
"if",
"(",
"reportsRootDir",
"==",
"null",
")",
"{",
"throw",
"new",
"SebException",
"(",
"\"Reports root directory is null\"",
")",
";",
... | Returns directory for storing Seb report files. As default, unique
directory is created inside reports root directory. Override this for
different value.
@return The report directory. | [
"Returns",
"directory",
"for",
"storing",
"Seb",
"report",
"files",
".",
"As",
"default",
"unique",
"directory",
"is",
"created",
"inside",
"reports",
"root",
"directory",
".",
"Override",
"this",
"for",
"different",
"value",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java#L248-L273 |
152,817 | etnetera/seb | src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java | BasicSebConfiguration.getDefaultListeners | protected List<SebListener> getDefaultListeners() {
return new ArrayList<>(Arrays.asList(new ConfigListener(), new LoggingListener(), new SebLogListener(),
new WebDriverLogListener(), new PageSourceListener(), new ScreenshotListener()));
} | java | protected List<SebListener> getDefaultListeners() {
return new ArrayList<>(Arrays.asList(new ConfigListener(), new LoggingListener(), new SebLogListener(),
new WebDriverLogListener(), new PageSourceListener(), new ScreenshotListener()));
} | [
"protected",
"List",
"<",
"SebListener",
">",
"getDefaultListeners",
"(",
")",
"{",
"return",
"new",
"ArrayList",
"<>",
"(",
"Arrays",
".",
"asList",
"(",
"new",
"ConfigListener",
"(",
")",
",",
"new",
"LoggingListener",
"(",
")",
",",
"new",
"SebLogListener... | Returns default list of Seb event listeners. Override this for different
value.
@return The Seb event listeners. | [
"Returns",
"default",
"list",
"of",
"Seb",
"event",
"listeners",
".",
"Override",
"this",
"for",
"different",
"value",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java#L281-L284 |
152,818 | etnetera/seb | src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java | BasicSebConfiguration.getDefaultLogLevel | protected Level getDefaultLogLevel() {
String levelStr = getProperty(LOG_LEVEL);
Level level = null;
if (levelStr != null) {
level = Level.parse(levelStr);
}
if (level == null)
level = Level.INFO;
return level;
} | java | protected Level getDefaultLogLevel() {
String levelStr = getProperty(LOG_LEVEL);
Level level = null;
if (levelStr != null) {
level = Level.parse(levelStr);
}
if (level == null)
level = Level.INFO;
return level;
} | [
"protected",
"Level",
"getDefaultLogLevel",
"(",
")",
"{",
"String",
"levelStr",
"=",
"getProperty",
"(",
"LOG_LEVEL",
")",
";",
"Level",
"level",
"=",
"null",
";",
"if",
"(",
"levelStr",
"!=",
"null",
")",
"{",
"level",
"=",
"Level",
".",
"parse",
"(",
... | Basic log level. Override this for different value.
@return The log level. | [
"Basic",
"log",
"level",
".",
"Override",
"this",
"for",
"different",
"value",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/configuration/BasicSebConfiguration.java#L299-L308 |
152,819 | jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/model/AppletScreen.java | AppletScreen.getTitle | public String getTitle() // Standard file maint for this record (returns new record)
{
for (int i = 0; i < this.getSFieldCount(); i++)
{
if (this.getSField(i) instanceof BaseScreen)
return ((BaseScreen)this.getSField(i)).getTitle();
}
return super.getTitle();
... | java | public String getTitle() // Standard file maint for this record (returns new record)
{
for (int i = 0; i < this.getSFieldCount(); i++)
{
if (this.getSField(i) instanceof BaseScreen)
return ((BaseScreen)this.getSField(i)).getTitle();
}
return super.getTitle();
... | [
"public",
"String",
"getTitle",
"(",
")",
"// Standard file maint for this record (returns new record)",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"getSFieldCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"getSF... | Title for this screen.
@return the screen title. | [
"Title",
"for",
"this",
"screen",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/AppletScreen.java#L216-L224 |
152,820 | dfoerderreuther/console-builder | console-builder/src/main/java/de/eleon/console/builder/ConsoleReaderWrapper.java | ConsoleReaderWrapper.print | public void print(CharSequence charSequence) {
try {
consoleReader.println(charSequence);
consoleReader.flush();
} catch (IOException e) {
throw new IllegalStateException("Can't write to console", e);
}
} | java | public void print(CharSequence charSequence) {
try {
consoleReader.println(charSequence);
consoleReader.flush();
} catch (IOException e) {
throw new IllegalStateException("Can't write to console", e);
}
} | [
"public",
"void",
"print",
"(",
"CharSequence",
"charSequence",
")",
"{",
"try",
"{",
"consoleReader",
".",
"println",
"(",
"charSequence",
")",
";",
"consoleReader",
".",
"flush",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
... | Print charSequence to console
@param charSequence to print | [
"Print",
"charSequence",
"to",
"console"
] | 814bee4a1a812a3a39a9b239e5eccb525b944e65 | https://github.com/dfoerderreuther/console-builder/blob/814bee4a1a812a3a39a9b239e5eccb525b944e65/console-builder/src/main/java/de/eleon/console/builder/ConsoleReaderWrapper.java#L99-L106 |
152,821 | dfoerderreuther/console-builder | console-builder/src/main/java/de/eleon/console/builder/ConsoleReaderWrapper.java | ConsoleReaderWrapper.setCompleters | public void setCompleters(List<Completer> completers) {
for (Completer completer : consoleReader.getCompleters()) {
consoleReader.removeCompleter(completer);
}
if (Iterables.size(completers) > 1) {
Completer completer = new AggregateCompleter(completers);
cons... | java | public void setCompleters(List<Completer> completers) {
for (Completer completer : consoleReader.getCompleters()) {
consoleReader.removeCompleter(completer);
}
if (Iterables.size(completers) > 1) {
Completer completer = new AggregateCompleter(completers);
cons... | [
"public",
"void",
"setCompleters",
"(",
"List",
"<",
"Completer",
">",
"completers",
")",
"{",
"for",
"(",
"Completer",
"completer",
":",
"consoleReader",
".",
"getCompleters",
"(",
")",
")",
"{",
"consoleReader",
".",
"removeCompleter",
"(",
"completer",
")",... | Remove all completers and add the new ones. If completers contains more then one element create an AggregateCompleter with the completers and add it.
@param completers to add | [
"Remove",
"all",
"completers",
"and",
"add",
"the",
"new",
"ones",
".",
"If",
"completers",
"contains",
"more",
"then",
"one",
"element",
"create",
"an",
"AggregateCompleter",
"with",
"the",
"completers",
"and",
"add",
"it",
"."
] | 814bee4a1a812a3a39a9b239e5eccb525b944e65 | https://github.com/dfoerderreuther/console-builder/blob/814bee4a1a812a3a39a9b239e5eccb525b944e65/console-builder/src/main/java/de/eleon/console/builder/ConsoleReaderWrapper.java#L127-L138 |
152,822 | dfoerderreuther/console-builder | console-builder/src/main/java/de/eleon/console/builder/ConsoleReaderWrapper.java | ConsoleReaderWrapper.getInput | public String getInput() {
try {
String ret = consoleReader.readLine();
if (ret != null) {
ret = ret.trim();
}
if (ret != null && !ret.isEmpty() && consoleReader.isHistoryEnabled() && history != null) {
history.add(ret);
... | java | public String getInput() {
try {
String ret = consoleReader.readLine();
if (ret != null) {
ret = ret.trim();
}
if (ret != null && !ret.isEmpty() && consoleReader.isHistoryEnabled() && history != null) {
history.add(ret);
... | [
"public",
"String",
"getInput",
"(",
")",
"{",
"try",
"{",
"String",
"ret",
"=",
"consoleReader",
".",
"readLine",
"(",
")",
";",
"if",
"(",
"ret",
"!=",
"null",
")",
"{",
"ret",
"=",
"ret",
".",
"trim",
"(",
")",
";",
"}",
"if",
"(",
"ret",
"!... | Get User input
@return the user input | [
"Get",
"User",
"input"
] | 814bee4a1a812a3a39a9b239e5eccb525b944e65 | https://github.com/dfoerderreuther/console-builder/blob/814bee4a1a812a3a39a9b239e5eccb525b944e65/console-builder/src/main/java/de/eleon/console/builder/ConsoleReaderWrapper.java#L145-L159 |
152,823 | js-lib-com/commons | src/main/java/js/format/Duration.java | Duration.format | private String format(double duration, Units units)
{
StringBuilder builder = new StringBuilder();
builder.append(numberFormat.format(duration));
builder.append(' ');
builder.append(units.display());
return builder.toString();
} | java | private String format(double duration, Units units)
{
StringBuilder builder = new StringBuilder();
builder.append(numberFormat.format(duration));
builder.append(' ');
builder.append(units.display());
return builder.toString();
} | [
"private",
"String",
"format",
"(",
"double",
"duration",
",",
"Units",
"units",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"numberFormat",
".",
"format",
"(",
"duration",
")",
")",
";",... | Build time duration representation for given numeric value and units.
@param duration duration numeric part value,
@param units bit rate units.
@return formated bit rate. | [
"Build",
"time",
"duration",
"representation",
"for",
"given",
"numeric",
"value",
"and",
"units",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/format/Duration.java#L120-L127 |
152,824 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java | XBasePanel.getMetaRedirect | public String getMetaRedirect()
{
if (this.getProperty(XMLTags.META_REDIRECT) != null)
return this.getProperty(XMLTags.META_REDIRECT);
return DBConstants.BLANK; // Override this
} | java | public String getMetaRedirect()
{
if (this.getProperty(XMLTags.META_REDIRECT) != null)
return this.getProperty(XMLTags.META_REDIRECT);
return DBConstants.BLANK; // Override this
} | [
"public",
"String",
"getMetaRedirect",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getProperty",
"(",
"XMLTags",
".",
"META_REDIRECT",
")",
"!=",
"null",
")",
"return",
"this",
".",
"getProperty",
"(",
"XMLTags",
".",
"META_REDIRECT",
")",
";",
"return",
"DBCo... | Get the name of the meta tag.
@return The name of the meta tag(s). | [
"Get",
"the",
"name",
"of",
"the",
"meta",
"tag",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java#L160-L165 |
152,825 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java | XBasePanel.getThisURL | public String getThisURL()
{
String strURL = DBConstants.BLANK;
strURL = Utility.addURLParam(strURL, DBParams.RECORD, this.getProperty(DBParams.RECORD), false);
strURL = Utility.addURLParam(strURL, DBParams.SCREEN, this.getProperty(DBParams.SCREEN), false);
strURL = Utility.addURLPar... | java | public String getThisURL()
{
String strURL = DBConstants.BLANK;
strURL = Utility.addURLParam(strURL, DBParams.RECORD, this.getProperty(DBParams.RECORD), false);
strURL = Utility.addURLParam(strURL, DBParams.SCREEN, this.getProperty(DBParams.SCREEN), false);
strURL = Utility.addURLPar... | [
"public",
"String",
"getThisURL",
"(",
")",
"{",
"String",
"strURL",
"=",
"DBConstants",
".",
"BLANK",
";",
"strURL",
"=",
"Utility",
".",
"addURLParam",
"(",
"strURL",
",",
"DBParams",
".",
"RECORD",
",",
"this",
".",
"getProperty",
"(",
"DBParams",
".",
... | Get the URL to display this page.
@return The URL string. | [
"Get",
"the",
"URL",
"to",
"display",
"this",
"page",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java#L513-L522 |
152,826 | eostermueller/headlessInTraceClient | src/main/java/org/headlessintrace/client/connection/ConnectionDetail.java | ConnectionDetail.executeStartupCommands | void executeStartupCommands() {
if (m_startupCommands !=null) {
StringBuilder sb = new StringBuilder();
for (IAgentCommand cmd : m_startupCommands) {
sb.append(cmd.getMessage());
}
getControlThread().sendMessage(sb.toString());
}
} | java | void executeStartupCommands() {
if (m_startupCommands !=null) {
StringBuilder sb = new StringBuilder();
for (IAgentCommand cmd : m_startupCommands) {
sb.append(cmd.getMessage());
}
getControlThread().sendMessage(sb.toString());
}
} | [
"void",
"executeStartupCommands",
"(",
")",
"{",
"if",
"(",
"m_startupCommands",
"!=",
"null",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"IAgentCommand",
"cmd",
":",
"m_startupCommands",
")",
"{",
"sb",
".",
"... | Immediately after the connection is first established, execute all the commands in this.m_startupCommands.
This method concatenates the commands of all those given in the array and attempts to execute them
in a single round-trip call. | [
"Immediately",
"after",
"the",
"connection",
"is",
"first",
"established",
"execute",
"all",
"the",
"commands",
"in",
"this",
".",
"m_startupCommands",
".",
"This",
"method",
"concatenates",
"the",
"commands",
"of",
"all",
"those",
"given",
"in",
"the",
"array",... | 50b1dccc5ff9e342c7c1d06b5a382e8c0afc7604 | https://github.com/eostermueller/headlessInTraceClient/blob/50b1dccc5ff9e342c7c1d06b5a382e8c0afc7604/src/main/java/org/headlessintrace/client/connection/ConnectionDetail.java#L82-L91 |
152,827 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java | MessageControl.getNamespaceFromVersion | public String getNamespaceFromVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion(version);
String namespace = this.getField(MessageControl.BASE_NAMESPACE).toString();
if (namespace == null)
namespace = DBConstants.BLANK;
if ((recMessageVer... | java | public String getNamespaceFromVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion(version);
String namespace = this.getField(MessageControl.BASE_NAMESPACE).toString();
if (namespace == null)
namespace = DBConstants.BLANK;
if ((recMessageVer... | [
"public",
"String",
"getNamespaceFromVersion",
"(",
"String",
"version",
")",
"{",
"MessageVersion",
"recMessageVersion",
"=",
"this",
".",
"getMessageVersion",
"(",
"version",
")",
";",
"String",
"namespace",
"=",
"this",
".",
"getField",
"(",
"MessageControl",
"... | GetNamespaceFromVersion Method. | [
"GetNamespaceFromVersion",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java#L148-L157 |
152,828 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java | MessageControl.getMessageVersion | public MessageVersion getMessageVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion();
recMessageVersion.setKeyArea(MessageVersion.CODE_KEY);
version = MessageControl.fixVersion(version);
recMessageVersion.getField(MessageVersion.CODE).setString(versio... | java | public MessageVersion getMessageVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion();
recMessageVersion.setKeyArea(MessageVersion.CODE_KEY);
version = MessageControl.fixVersion(version);
recMessageVersion.getField(MessageVersion.CODE).setString(versio... | [
"public",
"MessageVersion",
"getMessageVersion",
"(",
"String",
"version",
")",
"{",
"MessageVersion",
"recMessageVersion",
"=",
"this",
".",
"getMessageVersion",
"(",
")",
";",
"recMessageVersion",
".",
"setKeyArea",
"(",
"MessageVersion",
".",
"CODE_KEY",
")",
";"... | GetMessageVersion Method. | [
"GetMessageVersion",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java#L201-L217 |
152,829 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java | MessageControl.getNumericVersionFromVersion | public String getNumericVersionFromVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion(version);
String numericVersion = DBConstants.BLANK;
if ((recMessageVersion != null) && (!recMessageVersion.getField(MessageVersion.NAMESPACE).isNull()))
numeric... | java | public String getNumericVersionFromVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion(version);
String numericVersion = DBConstants.BLANK;
if ((recMessageVersion != null) && (!recMessageVersion.getField(MessageVersion.NAMESPACE).isNull()))
numeric... | [
"public",
"String",
"getNumericVersionFromVersion",
"(",
"String",
"version",
")",
"{",
"MessageVersion",
"recMessageVersion",
"=",
"this",
".",
"getMessageVersion",
"(",
"version",
")",
";",
"String",
"numericVersion",
"=",
"DBConstants",
".",
"BLANK",
";",
"if",
... | GetNumericVersionFromVersion Method. | [
"GetNumericVersionFromVersion",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java#L221-L230 |
152,830 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java | MessageControl.getIdFromVersion | public String getIdFromVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion(version);
String idVersion = DBConstants.BLANK;
if ((idVersion != null) && (!recMessageVersion.getField(MessageVersion.NAMESPACE).isNull()))
idVersion = recMessageVersion.ge... | java | public String getIdFromVersion(String version)
{
MessageVersion recMessageVersion = this.getMessageVersion(version);
String idVersion = DBConstants.BLANK;
if ((idVersion != null) && (!recMessageVersion.getField(MessageVersion.NAMESPACE).isNull()))
idVersion = recMessageVersion.ge... | [
"public",
"String",
"getIdFromVersion",
"(",
"String",
"version",
")",
"{",
"MessageVersion",
"recMessageVersion",
"=",
"this",
".",
"getMessageVersion",
"(",
"version",
")",
";",
"String",
"idVersion",
"=",
"DBConstants",
".",
"BLANK",
";",
"if",
"(",
"(",
"i... | GetIdFromVersion Method. | [
"GetIdFromVersion",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java#L234-L243 |
152,831 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java | MessageControl.fixVersion | public static String fixVersion(String version)
{
if (version != null)
if (version.length() > 0)
{
version = version.toUpperCase();
if (Character.isLetter(version.charAt(0)))
version = version.substring(1, version.length()) + version.substring(0, 1... | java | public static String fixVersion(String version)
{
if (version != null)
if (version.length() > 0)
{
version = version.toUpperCase();
if (Character.isLetter(version.charAt(0)))
version = version.substring(1, version.length()) + version.substring(0, 1... | [
"public",
"static",
"String",
"fixVersion",
"(",
"String",
"version",
")",
"{",
"if",
"(",
"version",
"!=",
"null",
")",
"if",
"(",
"version",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"version",
"=",
"version",
".",
"toUpperCase",
"(",
")",
";",
... | FixVersion Method. | [
"FixVersion",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java#L247-L257 |
152,832 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java | MessageControl.getVersionFromSchemaLocation | public String getVersionFromSchemaLocation(String schemaLocation)
{
MessageVersion recMessageVersion = this.getMessageVersion();
recMessageVersion.close();
try {
while (recMessageVersion.hasNext())
{
recMessageVersion.next();
String mes... | java | public String getVersionFromSchemaLocation(String schemaLocation)
{
MessageVersion recMessageVersion = this.getMessageVersion();
recMessageVersion.close();
try {
while (recMessageVersion.hasNext())
{
recMessageVersion.next();
String mes... | [
"public",
"String",
"getVersionFromSchemaLocation",
"(",
"String",
"schemaLocation",
")",
"{",
"MessageVersion",
"recMessageVersion",
"=",
"this",
".",
"getMessageVersion",
"(",
")",
";",
"recMessageVersion",
".",
"close",
"(",
")",
";",
"try",
"{",
"while",
"(",
... | GetVersionFromSchemaLocation Method. | [
"GetVersionFromSchemaLocation",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageControl.java#L261-L277 |
152,833 | jbundle/jbundle | thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedInfo.java | CachedInfo.getEndDate | public Date getEndDate()
{
if ((m_startTime != null) && (m_endTime != null))
{
if (m_endTime.before(m_startTime))
return m_startTime;
}
return m_endTime;
} | java | public Date getEndDate()
{
if ((m_startTime != null) && (m_endTime != null))
{
if (m_endTime.before(m_startTime))
return m_startTime;
}
return m_endTime;
} | [
"public",
"Date",
"getEndDate",
"(",
")",
"{",
"if",
"(",
"(",
"m_startTime",
"!=",
"null",
")",
"&&",
"(",
"m_endTime",
"!=",
"null",
")",
")",
"{",
"if",
"(",
"m_endTime",
".",
"before",
"(",
"m_startTime",
")",
")",
"return",
"m_startTime",
";",
"... | Get the ending time of this service. | [
"Get",
"the",
"ending",
"time",
"of",
"this",
"service",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedInfo.java#L107-L115 |
152,834 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/MergeConverter.java | MergeConverter.setString | public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
if (this.getNextConverter() != null)
return this.getNextConverter().setString(strString, bDisplayOption, iMoveMode);
else
return super.set... | java | public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
if (this.getNextConverter() != null)
return this.getNextConverter().setString(strString, bDisplayOption, iMoveMode);
else
return super.set... | [
"public",
"int",
"setString",
"(",
"String",
"strString",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"// init this field override for other value",
"{",
"if",
"(",
"this",
".",
"getNextConverter",
"(",
")",
"!=",
"null",
")",
"return",
"this",... | Convert and move string to this field.
Set the current string of the current next converter..
@param strString the state to set the data to.
@param bDisplayOption Display the data on the screen if true.
@param iMoveMode INIT, SCREEN, or READ move mode.
@return The error code (or NORMAL_RETURN). | [
"Convert",
"and",
"move",
"string",
"to",
"this",
"field",
".",
"Set",
"the",
"current",
"string",
"of",
"the",
"current",
"next",
"converter",
".."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/MergeConverter.java#L153-L159 |
152,835 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/MergeConverter.java | MergeConverter.setupDefaultView | public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert convert, int iDisplayFieldDesc, Map<String, Object> properties)
{
ScreenComponent sField = null;
Converter converter = this.getNextConverter();
if (converter != null)
sField = con... | java | public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert convert, int iDisplayFieldDesc, Map<String, Object> properties)
{
ScreenComponent sField = null;
Converter converter = this.getNextConverter();
if (converter != null)
sField = con... | [
"public",
"ScreenComponent",
"setupDefaultView",
"(",
"ScreenLoc",
"itsLocation",
",",
"ComponentParent",
"targetScreen",
",",
"Convert",
"convert",
",",
"int",
"iDisplayFieldDesc",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"ScreenCompon... | Set up the default control for this field.
Adds the default screen control for the current converter, and makes me it's converter.
@param itsLocation Location of this component on screen (ie., GridBagConstraint).
@param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
@param i... | [
"Set",
"up",
"the",
"default",
"control",
"for",
"this",
"field",
".",
"Adds",
"the",
"default",
"screen",
"control",
"for",
"the",
"current",
"converter",
"and",
"makes",
"me",
"it",
"s",
"converter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/MergeConverter.java#L179-L193 |
152,836 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/MergeConverter.java | MergeConverter.getNextConverter | public Converter getNextConverter()
{
BaseTable currentTable = m_MergeRecord.getTable().getCurrentTable();
if (currentTable == null)
return null;
if (m_FieldSeq != -1)
{
if (m_strLinkedRecord == null)
return currentTable.getRecord().getField(m_... | java | public Converter getNextConverter()
{
BaseTable currentTable = m_MergeRecord.getTable().getCurrentTable();
if (currentTable == null)
return null;
if (m_FieldSeq != -1)
{
if (m_strLinkedRecord == null)
return currentTable.getRecord().getField(m_... | [
"public",
"Converter",
"getNextConverter",
"(",
")",
"{",
"BaseTable",
"currentTable",
"=",
"m_MergeRecord",
".",
"getTable",
"(",
")",
".",
"getCurrentTable",
"(",
")",
";",
"if",
"(",
"currentTable",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"... | Get the Current converter.
@return The current converter depending on the current table in the merge table. | [
"Get",
"the",
"Current",
"converter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/MergeConverter.java#L198-L230 |
152,837 | huangp/entityunit | src/main/java/com/github/huangp/entityunit/util/ClassUtil.java | ClassUtil.getInstanceFields | public static List<Field> getInstanceFields(Class type) {
List<Field> fields = Lists.newArrayList(type.getDeclaredFields());
return ImmutableList.copyOf(Iterables.filter(fields, InstanceFieldPredicate.PREDICATE));
} | java | public static List<Field> getInstanceFields(Class type) {
List<Field> fields = Lists.newArrayList(type.getDeclaredFields());
return ImmutableList.copyOf(Iterables.filter(fields, InstanceFieldPredicate.PREDICATE));
} | [
"public",
"static",
"List",
"<",
"Field",
">",
"getInstanceFields",
"(",
"Class",
"type",
")",
"{",
"List",
"<",
"Field",
">",
"fields",
"=",
"Lists",
".",
"newArrayList",
"(",
"type",
".",
"getDeclaredFields",
"(",
")",
")",
";",
"return",
"ImmutableList"... | Return all non-static and non-transient fields.
@param type
class to work with
@return list of fields | [
"Return",
"all",
"non",
"-",
"static",
"and",
"non",
"-",
"transient",
"fields",
"."
] | 1a09b530149d707dbff7ff46f5428d9db709a4b4 | https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/util/ClassUtil.java#L54-L57 |
152,838 | krotscheck/data-file-reader | data-file-reader-base/src/main/java/net/krotscheck/dfr/EncoderCache.java | EncoderCache.getEncoder | public static IDataEncoder getEncoder(final String mimeType)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException {
populateCache();
if (!cache.containsKey(mimeType)) {
throw new ClassNotFoundException(
String.format("IDa... | java | public static IDataEncoder getEncoder(final String mimeType)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException {
populateCache();
if (!cache.containsKey(mimeType)) {
throw new ClassNotFoundException(
String.format("IDa... | [
"public",
"static",
"IDataEncoder",
"getEncoder",
"(",
"final",
"String",
"mimeType",
")",
"throws",
"ClassNotFoundException",
",",
"IllegalAccessException",
",",
"InstantiationException",
"{",
"populateCache",
"(",
")",
";",
"if",
"(",
"!",
"cache",
".",
"containsK... | Retrieve a encoder for a specified mime type.
@param mimeType The mimetype to scan for.
@return An instance of the encoder.
@throws ClassNotFoundException Thrown when no encoder for a mimetype is
found.
@throws IllegalAccessException Thrown when the encoder's constructor is
not accessible. Never thrown, as the
service... | [
"Retrieve",
"a",
"encoder",
"for",
"a",
"specified",
"mime",
"type",
"."
] | b9a85bd07dc9f9b8291ffbfb6945443d96371811 | https://github.com/krotscheck/data-file-reader/blob/b9a85bd07dc9f9b8291ffbfb6945443d96371811/data-file-reader-base/src/main/java/net/krotscheck/dfr/EncoderCache.java#L113-L128 |
152,839 | js-lib-com/commons | src/main/java/js/converter/CharactersConverter.java | CharactersConverter.asObject | @Override
public <T> T asObject(String string, Class<T> valueType) throws BugError {
// at this point value type is guaranteed to be char or Character
if (string.length() > 1) {
throw new ConverterException("Trying to convert a larger string into a single character.");
}
return (T) (Character) string.... | java | @Override
public <T> T asObject(String string, Class<T> valueType) throws BugError {
// at this point value type is guaranteed to be char or Character
if (string.length() > 1) {
throw new ConverterException("Trying to convert a larger string into a single character.");
}
return (T) (Character) string.... | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"asObject",
"(",
"String",
"string",
",",
"Class",
"<",
"T",
">",
"valueType",
")",
"throws",
"BugError",
"{",
"// at this point value type is guaranteed to be char or Character\r",
"if",
"(",
"string",
".",
"length",... | Return the first character from given string.
@throws ConverterException if given string has more than one single character. | [
"Return",
"the",
"first",
"character",
"from",
"given",
"string",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/CharactersConverter.java#L22-L29 |
152,840 | jbundle/jbundle | app/program/manual/backup/src/main/java/org/jbundle/app/program/manual/backup/RestoreBackupProcess.java | RestoreBackupProcess.getFileList | public String[] getFileList()
{
String[] files = null;
String strFilename = this.getProperty("filename");
if (strFilename != null)
{
files = new String[1];
files[0] = strFilename;
}
String strDirname = this.getProperty("folder");
if (st... | java | public String[] getFileList()
{
String[] files = null;
String strFilename = this.getProperty("filename");
if (strFilename != null)
{
files = new String[1];
files[0] = strFilename;
}
String strDirname = this.getProperty("folder");
if (st... | [
"public",
"String",
"[",
"]",
"getFileList",
"(",
")",
"{",
"String",
"[",
"]",
"files",
"=",
"null",
";",
"String",
"strFilename",
"=",
"this",
".",
"getProperty",
"(",
"\"filename\"",
")",
";",
"if",
"(",
"strFilename",
"!=",
"null",
")",
"{",
"files... | Get the list of files to read thru and import.
@return | [
"Get",
"the",
"list",
"of",
"files",
"to",
"read",
"thru",
"and",
"import",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/backup/src/main/java/org/jbundle/app/program/manual/backup/RestoreBackupProcess.java#L177-L199 |
152,841 | tvesalainen/util | util/src/main/java/org/vesalainen/util/navi/Scalar.java | Scalar.add | void add(Scalar o)
{
if (!type.equals(o.type))
{
throw new UnsupportedOperationException("Action with wrong kind of class");
}
value += o.value;
} | java | void add(Scalar o)
{
if (!type.equals(o.type))
{
throw new UnsupportedOperationException("Action with wrong kind of class");
}
value += o.value;
} | [
"void",
"add",
"(",
"Scalar",
"o",
")",
"{",
"if",
"(",
"!",
"type",
".",
"equals",
"(",
"o",
".",
"type",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Action with wrong kind of class\"",
")",
";",
"}",
"value",
"+=",
"o",
".",... | Add o value to this
@param o | [
"Add",
"o",
"value",
"to",
"this"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/navi/Scalar.java#L136-L143 |
152,842 | tvesalainen/util | util/src/main/java/org/vesalainen/util/navi/Scalar.java | Scalar.subtract | void subtract(Scalar o)
{
if (!type.equals(o.type))
{
throw new UnsupportedOperationException("Action with wrong kind of class");
}
value -= o.value;
} | java | void subtract(Scalar o)
{
if (!type.equals(o.type))
{
throw new UnsupportedOperationException("Action with wrong kind of class");
}
value -= o.value;
} | [
"void",
"subtract",
"(",
"Scalar",
"o",
")",
"{",
"if",
"(",
"!",
"type",
".",
"equals",
"(",
"o",
".",
"type",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Action with wrong kind of class\"",
")",
";",
"}",
"value",
"-=",
"o",
... | Subtract o value from this
@param o | [
"Subtract",
"o",
"value",
"from",
"this"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/navi/Scalar.java#L156-L163 |
152,843 | inkstand-io/scribble | scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/JackrabbitContentRepository.java | JackrabbitContentRepository.destroyRepository | @Override
protected void destroyRepository() {
final RepositoryImpl repository = (RepositoryImpl) getRepository();
repository.shutdown();
LOG.info("Destroyed repository at {}", repository.getConfig().getHomeDir());
} | java | @Override
protected void destroyRepository() {
final RepositoryImpl repository = (RepositoryImpl) getRepository();
repository.shutdown();
LOG.info("Destroyed repository at {}", repository.getConfig().getHomeDir());
} | [
"@",
"Override",
"protected",
"void",
"destroyRepository",
"(",
")",
"{",
"final",
"RepositoryImpl",
"repository",
"=",
"(",
"RepositoryImpl",
")",
"getRepository",
"(",
")",
";",
"repository",
".",
"shutdown",
"(",
")",
";",
"LOG",
".",
"info",
"(",
"\"Dest... | Closes the admin session, and in case of local transient respository for unit test, shuts down the repository and
cleans all temporary files. | [
"Closes",
"the",
"admin",
"session",
"and",
"in",
"case",
"of",
"local",
"transient",
"respository",
"for",
"unit",
"test",
"shuts",
"down",
"the",
"repository",
"and",
"cleans",
"all",
"temporary",
"files",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/JackrabbitContentRepository.java#L68-L74 |
152,844 | inkstand-io/scribble | scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/JackrabbitContentRepository.java | JackrabbitContentRepository.createRepository | @Override
protected RepositoryImpl createRepository() throws IOException {
try {
final RepositoryConfig config = createRepositoryConfiguration();
return RepositoryImpl.create(config);
} catch (final ConfigurationException e) {
LOG.error("Configuration invalid", e... | java | @Override
protected RepositoryImpl createRepository() throws IOException {
try {
final RepositoryConfig config = createRepositoryConfiguration();
return RepositoryImpl.create(config);
} catch (final ConfigurationException e) {
LOG.error("Configuration invalid", e... | [
"@",
"Override",
"protected",
"RepositoryImpl",
"createRepository",
"(",
")",
"throws",
"IOException",
"{",
"try",
"{",
"final",
"RepositoryConfig",
"config",
"=",
"createRepositoryConfiguration",
"(",
")",
";",
"return",
"RepositoryImpl",
".",
"create",
"(",
"confi... | Creates a transient repository with files in the local temp directory.
@return the created repository
@throws IOException
if the repository configuration can not be read | [
"Creates",
"a",
"transient",
"repository",
"with",
"files",
"in",
"the",
"local",
"temp",
"directory",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/JackrabbitContentRepository.java#L84-L97 |
152,845 | tvesalainen/util | util/src/main/java/org/vesalainen/text/CamelCase.java | CamelCase.delimitedLower | public static final String delimitedLower(String text, String delim)
{
return stream(text).map((String s)->{return s.toLowerCase();}).collect(Collectors.joining(delim));
} | java | public static final String delimitedLower(String text, String delim)
{
return stream(text).map((String s)->{return s.toLowerCase();}).collect(Collectors.joining(delim));
} | [
"public",
"static",
"final",
"String",
"delimitedLower",
"(",
"String",
"text",
",",
"String",
"delim",
")",
"{",
"return",
"stream",
"(",
"text",
")",
".",
"map",
"(",
"(",
"String",
"s",
")",
"->",
"{",
"return",
"s",
".",
"toLowerCase",
"(",
")",
... | Return camel-case if delim = '-'
@param text
@param delim
@return | [
"Return",
"camel",
"-",
"case",
"if",
"delim",
"=",
"-"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/text/CamelCase.java#L69-L72 |
152,846 | tvesalainen/util | util/src/main/java/org/vesalainen/text/CamelCase.java | CamelCase.delimited | public static final String delimited(String text, String delim)
{
return stream(text).collect(Collectors.joining(delim));
} | java | public static final String delimited(String text, String delim)
{
return stream(text).collect(Collectors.joining(delim));
} | [
"public",
"static",
"final",
"String",
"delimited",
"(",
"String",
"text",
",",
"String",
"delim",
")",
"{",
"return",
"stream",
"(",
"text",
")",
".",
"collect",
"(",
"Collectors",
".",
"joining",
"(",
"delim",
")",
")",
";",
"}"
] | Returns Camel-Case if delim = '-'
@param text
@param delim
@return | [
"Returns",
"Camel",
"-",
"Case",
"if",
"delim",
"=",
"-"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/text/CamelCase.java#L79-L82 |
152,847 | jeremiehuchet/acrachilisync | acrachilisync-core/src/main/java/fr/dudie/acrachilisync/utils/CreationDateIssueComparator.java | CreationDateIssueComparator.compare | @Override
public int compare(final Issue i1, final Issue i2) {
if (null == i1 && null == i2) {
return 0;
} else if (null == i1) {
return 1;
} else if (null == i2) {
return -1;
} else {
return i1.getCreatedOn().compareTo(i2.getCreatedOn... | java | @Override
public int compare(final Issue i1, final Issue i2) {
if (null == i1 && null == i2) {
return 0;
} else if (null == i1) {
return 1;
} else if (null == i2) {
return -1;
} else {
return i1.getCreatedOn().compareTo(i2.getCreatedOn... | [
"@",
"Override",
"public",
"int",
"compare",
"(",
"final",
"Issue",
"i1",
",",
"final",
"Issue",
"i2",
")",
"{",
"if",
"(",
"null",
"==",
"i1",
"&&",
"null",
"==",
"i2",
")",
"{",
"return",
"0",
";",
"}",
"else",
"if",
"(",
"null",
"==",
"i1",
... | Compare creation date of given issues.
@see java.util.Date#compareTo(java.util.Date)
@see java.util.Comparator#compare(java.lang.Object, java.lang.Object) | [
"Compare",
"creation",
"date",
"of",
"given",
"issues",
"."
] | 4eadb0218623e77e0d92b5a08515eea2db51e988 | https://github.com/jeremiehuchet/acrachilisync/blob/4eadb0218623e77e0d92b5a08515eea2db51e988/acrachilisync-core/src/main/java/fr/dudie/acrachilisync/utils/CreationDateIssueComparator.java#L35-L47 |
152,848 | watchrabbit/rabbit-executor | src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java | ExecutorCommand.withExcludedExceptions | public ExecutorCommand<V> withExcludedExceptions(List<Class<? extends Exception>> excludedExceptions) {
config.setExcludedExceptions(excludedExceptions);
return this;
} | java | public ExecutorCommand<V> withExcludedExceptions(List<Class<? extends Exception>> excludedExceptions) {
config.setExcludedExceptions(excludedExceptions);
return this;
} | [
"public",
"ExecutorCommand",
"<",
"V",
">",
"withExcludedExceptions",
"(",
"List",
"<",
"Class",
"<",
"?",
"extends",
"Exception",
">",
">",
"excludedExceptions",
")",
"{",
"config",
".",
"setExcludedExceptions",
"(",
"excludedExceptions",
")",
";",
"return",
"t... | If wrapped method throws one of passed exceptions breaker will pass it
without opening connection.
@param excludedExceptions exceptions that should not open breaker
@return {@code ExecutorCommand<V>} executor with configured
excludedExceptions | [
"If",
"wrapped",
"method",
"throws",
"one",
"of",
"passed",
"exceptions",
"breaker",
"will",
"pass",
"it",
"without",
"opening",
"connection",
"."
] | fe6674b78e6ab464babcecb6e1f100edec3c9966 | https://github.com/watchrabbit/rabbit-executor/blob/fe6674b78e6ab464babcecb6e1f100edec3c9966/src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java#L92-L95 |
152,849 | watchrabbit/rabbit-executor | src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java | ExecutorCommand.invoke | public <V> V invoke(Callable<V> callable) throws Exception {
return service.executeSynchronously(callable, config);
} | java | public <V> V invoke(Callable<V> callable) throws Exception {
return service.executeSynchronously(callable, config);
} | [
"public",
"<",
"V",
">",
"V",
"invoke",
"(",
"Callable",
"<",
"V",
">",
"callable",
")",
"throws",
"Exception",
"{",
"return",
"service",
".",
"executeSynchronously",
"(",
"callable",
",",
"config",
")",
";",
"}"
] | Invokes callable synchronously with respecting circuit logic and cache
logic if configured.
@param <V> type of value returned by this method
@param callable method fired by executor
@return {@code V} returns value returned by callable
@throws Exception if callable throws some exception | [
"Invokes",
"callable",
"synchronously",
"with",
"respecting",
"circuit",
"logic",
"and",
"cache",
"logic",
"if",
"configured",
"."
] | fe6674b78e6ab464babcecb6e1f100edec3c9966 | https://github.com/watchrabbit/rabbit-executor/blob/fe6674b78e6ab464babcecb6e1f100edec3c9966/src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java#L121-L123 |
152,850 | watchrabbit/rabbit-executor | src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java | ExecutorCommand.queue | public Future<V> queue(Callable<V> callable) {
return service.executeAsynchronously(callable, config);
} | java | public Future<V> queue(Callable<V> callable) {
return service.executeAsynchronously(callable, config);
} | [
"public",
"Future",
"<",
"V",
">",
"queue",
"(",
"Callable",
"<",
"V",
">",
"callable",
")",
"{",
"return",
"service",
".",
"executeAsynchronously",
"(",
"callable",
",",
"config",
")",
";",
"}"
] | Invokes runnable asynchronously with respecting circuit logic and cache
logic if configured.
@param callable method fired by executor
@return {@code Future<V>} with value or exception returned by callable | [
"Invokes",
"runnable",
"asynchronously",
"with",
"respecting",
"circuit",
"logic",
"and",
"cache",
"logic",
"if",
"configured",
"."
] | fe6674b78e6ab464babcecb6e1f100edec3c9966 | https://github.com/watchrabbit/rabbit-executor/blob/fe6674b78e6ab464babcecb6e1f100edec3c9966/src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java#L146-L148 |
152,851 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java | TaskSession.getEnvironment | public Environment getEnvironment()
{
Environment env = ((BaseApplication)this.getApplication()).getEnvironment();
if (env == null)
env = Environment.getEnvironment(null); // Never
return env;
} | java | public Environment getEnvironment()
{
Environment env = ((BaseApplication)this.getApplication()).getEnvironment();
if (env == null)
env = Environment.getEnvironment(null); // Never
return env;
} | [
"public",
"Environment",
"getEnvironment",
"(",
")",
"{",
"Environment",
"env",
"=",
"(",
"(",
"BaseApplication",
")",
"this",
".",
"getApplication",
"(",
")",
")",
".",
"getEnvironment",
"(",
")",
";",
"if",
"(",
"env",
"==",
"null",
")",
"env",
"=",
... | Get this task's environment.
@return The environment. | [
"Get",
"this",
"task",
"s",
"environment",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java#L138-L144 |
152,852 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java | TaskSession.createRemoteSendQueue | public RemoteSendQueue createRemoteSendQueue(String strQueueName, String strQueueType) throws RemoteException
{
MessageManager messageManager = this.getEnvironment().getMessageManager(this.getApplication(), true);
BaseMessageSender sender = (BaseMessageSender)messageManager.getMessageQueue(strQueueN... | java | public RemoteSendQueue createRemoteSendQueue(String strQueueName, String strQueueType) throws RemoteException
{
MessageManager messageManager = this.getEnvironment().getMessageManager(this.getApplication(), true);
BaseMessageSender sender = (BaseMessageSender)messageManager.getMessageQueue(strQueueN... | [
"public",
"RemoteSendQueue",
"createRemoteSendQueue",
"(",
"String",
"strQueueName",
",",
"String",
"strQueueType",
")",
"throws",
"RemoteException",
"{",
"MessageManager",
"messageManager",
"=",
"this",
".",
"getEnvironment",
"(",
")",
".",
"getMessageManager",
"(",
... | Create the remote send queue.
@param strQueueName The queue name to service.
@param strQueueType The queue type.
@return The RemoteSendQueue. | [
"Create",
"the",
"remote",
"send",
"queue",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java#L274-L280 |
152,853 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java | TaskSession.createRemoteReceiveQueue | public RemoteReceiveQueue createRemoteReceiveQueue(String strQueueName, String strQueueType) throws RemoteException
{
MessageManager messageManager = this.getEnvironment().getMessageManager(this.getApplication(), true);
BaseMessageReceiver receiver = (BaseMessageReceiver)messageManager.getMessageQue... | java | public RemoteReceiveQueue createRemoteReceiveQueue(String strQueueName, String strQueueType) throws RemoteException
{
MessageManager messageManager = this.getEnvironment().getMessageManager(this.getApplication(), true);
BaseMessageReceiver receiver = (BaseMessageReceiver)messageManager.getMessageQue... | [
"public",
"RemoteReceiveQueue",
"createRemoteReceiveQueue",
"(",
"String",
"strQueueName",
",",
"String",
"strQueueType",
")",
"throws",
"RemoteException",
"{",
"MessageManager",
"messageManager",
"=",
"this",
".",
"getEnvironment",
"(",
")",
".",
"getMessageManager",
"... | Create the remote receive queue.
@param strQueueName The queue name to service.
@param strQueueType The queue type.
@return The RemoteSendQueue. | [
"Create",
"the",
"remote",
"receive",
"queue",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TaskSession.java#L287-L293 |
152,854 | jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/process/MessageTimeoutProcess.java | MessageTimeoutProcess.processMessageTimeout | public void processMessageTimeout(String strTrxID)
{
MessageLog recMessageLog = (MessageLog)this.getMainRecord();
BaseMessage message = (BaseMessage)recMessageLog.createMessage(strTrxID);
String strMessageError = "Message timeout";
BaseMessage messageReply = (BaseMessage)BaseMessageP... | java | public void processMessageTimeout(String strTrxID)
{
MessageLog recMessageLog = (MessageLog)this.getMainRecord();
BaseMessage message = (BaseMessage)recMessageLog.createMessage(strTrxID);
String strMessageError = "Message timeout";
BaseMessage messageReply = (BaseMessage)BaseMessageP... | [
"public",
"void",
"processMessageTimeout",
"(",
"String",
"strTrxID",
")",
"{",
"MessageLog",
"recMessageLog",
"=",
"(",
"MessageLog",
")",
"this",
".",
"getMainRecord",
"(",
")",
";",
"BaseMessage",
"message",
"=",
"(",
"BaseMessage",
")",
"recMessageLog",
".",... | ProcessMessageTimeout Method. | [
"ProcessMessageTimeout",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/process/MessageTimeoutProcess.java#L132-L144 |
152,855 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/PropertiesConverter.java | PropertiesConverter.setString | public int setString(String fieldPtr, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
if (this.getField() instanceof PropertiesField) // Always
return ((PropertiesField)this.getField()).setProperty(m_strProperty, fieldPtr, bDisplayOption,... | java | public int setString(String fieldPtr, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
if (this.getField() instanceof PropertiesField) // Always
return ((PropertiesField)this.getField()).setProperty(m_strProperty, fieldPtr, bDisplayOption,... | [
"public",
"int",
"setString",
"(",
"String",
"fieldPtr",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"// init this field override for other value",
"{",
"if",
"(",
"this",
".",
"getField",
"(",
")",
"instanceof",
"PropertiesField",
")",
"// Alway... | Convert and move string to this field.
Set this property in the property field.
@param strString the state to set the data to.
@param bDisplayOption Display the data on the screen if true.
@param iMoveMode INIT, SCREEN, or READ move mode.
@return The error code (or NORMAL_RETURN). | [
"Convert",
"and",
"move",
"string",
"to",
"this",
"field",
".",
"Set",
"this",
"property",
"in",
"the",
"property",
"field",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/PropertiesConverter.java#L85-L90 |
152,856 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/JsonDomainFactory.java | JsonDomainFactory.fetchObject | @SuppressWarnings("unchecked")
@Override
public <T extends Object> T fetchObject(Class<T> clazz, String id) {
if (StringUtils.isEmpty(id)) {
return null;
}
String json = VistAUtil.getBrokerSession().callRPC("RGSER FETCH", PREFIX + getAlias(clazz), id);
return... | java | @SuppressWarnings("unchecked")
@Override
public <T extends Object> T fetchObject(Class<T> clazz, String id) {
if (StringUtils.isEmpty(id)) {
return null;
}
String json = VistAUtil.getBrokerSession().callRPC("RGSER FETCH", PREFIX + getAlias(clazz), id);
return... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"<",
"T",
"extends",
"Object",
">",
"T",
"fetchObject",
"(",
"Class",
"<",
"T",
">",
"clazz",
",",
"String",
"id",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"... | Fetch an instance of the domain class from the data store. | [
"Fetch",
"an",
"instance",
"of",
"the",
"domain",
"class",
"from",
"the",
"data",
"store",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/JsonDomainFactory.java#L72-L81 |
152,857 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/JsonDomainFactory.java | JsonDomainFactory.fetchObjects | @SuppressWarnings("unchecked")
@Override
public <T extends Object> List<T> fetchObjects(Class<T> clazz, String[] ids) {
if (ids == null || ids.length == 0) {
return Collections.emptyList();
}
String json = VistAUtil.getBrokerSession().callRPC("RGSER FETCH", PREFIX + ... | java | @SuppressWarnings("unchecked")
@Override
public <T extends Object> List<T> fetchObjects(Class<T> clazz, String[] ids) {
if (ids == null || ids.length == 0) {
return Collections.emptyList();
}
String json = VistAUtil.getBrokerSession().callRPC("RGSER FETCH", PREFIX + ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"<",
"T",
"extends",
"Object",
">",
"List",
"<",
"T",
">",
"fetchObjects",
"(",
"Class",
"<",
"T",
">",
"clazz",
",",
"String",
"[",
"]",
"ids",
")",
"{",
"if",
"(",
"ids"... | Fetch multiple instances of the domain class from the data store. | [
"Fetch",
"multiple",
"instances",
"of",
"the",
"domain",
"class",
"from",
"the",
"data",
"store",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/JsonDomainFactory.java#L86-L95 |
152,858 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/JsonDomainFactory.java | JsonDomainFactory.getAlias | @Override
public String getAlias(Class<?> clazz) {
// Locate the alias of the requested class.
String alias = JSONUtil.getAlias(clazz);
// If not found, ensure that the class has been loaded to allow for its
// static initializers to execute, then try again.
if (alia... | java | @Override
public String getAlias(Class<?> clazz) {
// Locate the alias of the requested class.
String alias = JSONUtil.getAlias(clazz);
// If not found, ensure that the class has been loaded to allow for its
// static initializers to execute, then try again.
if (alia... | [
"@",
"Override",
"public",
"String",
"getAlias",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"// Locate the alias of the requested class.",
"String",
"alias",
"=",
"JSONUtil",
".",
"getAlias",
"(",
"clazz",
")",
";",
"// If not found, ensure that the class has bee... | Returns the alias for the domain class. A domain class will typically register its alias in a
static initializer block. If the initial attempt to retrieve an alias fails, this method
forces the class loader to load the class to ensure that any static initializers are
executed, and then tries again.
@param clazz Domain... | [
"Returns",
"the",
"alias",
"for",
"the",
"domain",
"class",
".",
"A",
"domain",
"class",
"will",
"typically",
"register",
"its",
"alias",
"in",
"a",
"static",
"initializer",
"block",
".",
"If",
"the",
"initial",
"attempt",
"to",
"retrieve",
"an",
"alias",
... | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.core/src/main/java/org/carewebframework/vista/api/JsonDomainFactory.java#L106-L123 |
152,859 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteFieldClass.java | WriteFieldClass.writeFieldInit | public void writeFieldInit()
{
String strClassName;
Record recClassInfo = this.getMainRecord();
strClassName = recClassInfo.getField(ClassInfo.CLASS_NAME).getString();
if (this.readThisMethod(strClassName))
this.writeThisMethod(CodeType.THICK);
else
th... | java | public void writeFieldInit()
{
String strClassName;
Record recClassInfo = this.getMainRecord();
strClassName = recClassInfo.getField(ClassInfo.CLASS_NAME).getString();
if (this.readThisMethod(strClassName))
this.writeThisMethod(CodeType.THICK);
else
th... | [
"public",
"void",
"writeFieldInit",
"(",
")",
"{",
"String",
"strClassName",
";",
"Record",
"recClassInfo",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"strClassName",
"=",
"recClassInfo",
".",
"getField",
"(",
"ClassInfo",
".",
"CLASS_NAME",
")",
".",
... | Write the field initialize code | [
"Write",
"the",
"field",
"initialize",
"code"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteFieldClass.java#L125-L134 |
152,860 | jbundle/jbundle | app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteFieldClass.java | WriteFieldClass.writeInitField | public void writeInitField()
{
Record recLogicFile = this.getRecord(LogicFile.LOGIC_FILE_FILE);
try {
String strClassName;
Record recClassInfo = this.getMainRecord();
FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE);
strC... | java | public void writeInitField()
{
Record recLogicFile = this.getRecord(LogicFile.LOGIC_FILE_FILE);
try {
String strClassName;
Record recClassInfo = this.getMainRecord();
FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE);
strC... | [
"public",
"void",
"writeInitField",
"(",
")",
"{",
"Record",
"recLogicFile",
"=",
"this",
".",
"getRecord",
"(",
"LogicFile",
".",
"LOGIC_FILE_FILE",
")",
";",
"try",
"{",
"String",
"strClassName",
";",
"Record",
"recClassInfo",
"=",
"this",
".",
"getMainRecor... | Write the field init code | [
"Write",
"the",
"field",
"init",
"code"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteFieldClass.java#L138-L196 |
152,861 | OwlPlatform/java-owl-common | src/main/java/com/owlplatform/common/SampleMessage.java | SampleMessage.setDeviceId | public void setDeviceId(byte[] deviceId) {
if (deviceId == null) {
throw new RuntimeException("Device ID cannot be null.");
}
if (deviceId.length != DEVICE_ID_SIZE) {
throw new RuntimeException(String.format(
"Device ID must be %d bytes long.", Integer.valueOf(DEVICE_ID_SIZE)));
}
... | java | public void setDeviceId(byte[] deviceId) {
if (deviceId == null) {
throw new RuntimeException("Device ID cannot be null.");
}
if (deviceId.length != DEVICE_ID_SIZE) {
throw new RuntimeException(String.format(
"Device ID must be %d bytes long.", Integer.valueOf(DEVICE_ID_SIZE)));
}
... | [
"public",
"void",
"setDeviceId",
"(",
"byte",
"[",
"]",
"deviceId",
")",
"{",
"if",
"(",
"deviceId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Device ID cannot be null.\"",
")",
";",
"}",
"if",
"(",
"deviceId",
".",
"length",
"!="... | Sets the device identifier for the transmitter referenced in this sample.
@param deviceId
the device identifier for the transmitter referenced in this
sample. | [
"Sets",
"the",
"device",
"identifier",
"for",
"the",
"transmitter",
"referenced",
"in",
"this",
"sample",
"."
] | fe95d401914f4747253cef18ecf42179268367a2 | https://github.com/OwlPlatform/java-owl-common/blob/fe95d401914f4747253cef18ecf42179268367a2/src/main/java/com/owlplatform/common/SampleMessage.java#L204-L213 |
152,862 | OwlPlatform/java-owl-common | src/main/java/com/owlplatform/common/SampleMessage.java | SampleMessage.setReceiverId | public void setReceiverId(byte[] receiverId) {
if (receiverId == null) {
throw new RuntimeException("Receiver ID cannot be null.");
}
if (receiverId.length != DEVICE_ID_SIZE) {
throw new RuntimeException(
String.format("Receiver ID must be %d bytes long.",
Integer.valueOf... | java | public void setReceiverId(byte[] receiverId) {
if (receiverId == null) {
throw new RuntimeException("Receiver ID cannot be null.");
}
if (receiverId.length != DEVICE_ID_SIZE) {
throw new RuntimeException(
String.format("Receiver ID must be %d bytes long.",
Integer.valueOf... | [
"public",
"void",
"setReceiverId",
"(",
"byte",
"[",
"]",
"receiverId",
")",
"{",
"if",
"(",
"receiverId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Receiver ID cannot be null.\"",
")",
";",
"}",
"if",
"(",
"receiverId",
".",
"lengt... | Sets the device identifier for the receiver referenced in this sample.
@param receiverId
the device identifier for the receiver referenced in this sample. | [
"Sets",
"the",
"device",
"identifier",
"for",
"the",
"receiver",
"referenced",
"in",
"this",
"sample",
"."
] | fe95d401914f4747253cef18ecf42179268367a2 | https://github.com/OwlPlatform/java-owl-common/blob/fe95d401914f4747253cef18ecf42179268367a2/src/main/java/com/owlplatform/common/SampleMessage.java#L230-L240 |
152,863 | openCage/eightyfs | src/main/java/de/pfabulist/lindwurm/eighty/path/ProviderPath.java | ProviderPath.toRealPath | public static EightyPath toRealPath( Path path ) {
if( !( path instanceof EightyPath ) ) {
throw new IllegalArgumentException( path + " should be EightyPath" );
}
EightyPath eightyPath = (EightyPath) path;
if ( eightyPath.knownReal() ) {
return eightyPath;
... | java | public static EightyPath toRealPath( Path path ) {
if( !( path instanceof EightyPath ) ) {
throw new IllegalArgumentException( path + " should be EightyPath" );
}
EightyPath eightyPath = (EightyPath) path;
if ( eightyPath.knownReal() ) {
return eightyPath;
... | [
"public",
"static",
"EightyPath",
"toRealPath",
"(",
"Path",
"path",
")",
"{",
"if",
"(",
"!",
"(",
"path",
"instanceof",
"EightyPath",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"path",
"+",
"\" should be EightyPath\"",
")",
";",
"}",
"... | toRealPath follow links
@param path
@return | [
"toRealPath",
"follow",
"links"
] | 708ec4d336ee5e3dbd4196099f64091eaf6b3387 | https://github.com/openCage/eightyfs/blob/708ec4d336ee5e3dbd4196099f64091eaf6b3387/src/main/java/de/pfabulist/lindwurm/eighty/path/ProviderPath.java#L65-L77 |
152,864 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/ChangeFocusOnChangeHandler.java | ChangeFocusOnChangeHandler.init | public void init(BaseField field, ScreenComponent screenField, BaseField fldTarget)
{
super.init(field);
m_screenField = screenField;
m_fldTarget = fldTarget;
m_bScreenMove = true; // Only respond to user change
m_bInitMove = false;
m_bReadMove = false;
if ... | java | public void init(BaseField field, ScreenComponent screenField, BaseField fldTarget)
{
super.init(field);
m_screenField = screenField;
m_fldTarget = fldTarget;
m_bScreenMove = true; // Only respond to user change
m_bInitMove = false;
m_bReadMove = false;
if ... | [
"public",
"void",
"init",
"(",
"BaseField",
"field",
",",
"ScreenComponent",
"screenField",
",",
"BaseField",
"fldTarget",
")",
"{",
"super",
".",
"init",
"(",
"field",
")",
";",
"m_screenField",
"=",
"screenField",
";",
"m_fldTarget",
"=",
"fldTarget",
";",
... | Constructor.
This listener only responds to screen moves by default.
@param field The field to change the focus to on change to this field.
@param screenField The screen field to change the focus to on change to this field. | [
"Constructor",
".",
"This",
"listener",
"only",
"responds",
"to",
"screen",
"moves",
"by",
"default",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ChangeFocusOnChangeHandler.java#L68-L79 |
152,865 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/ChangeFocusOnChangeHandler.java | ChangeFocusOnChangeHandler.fieldChanged | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_screenField == null)
this.lookupSField();
if (m_bChangeIfNull != null)
{
if ((m_bChangeIfNull.booleanValue()) && (!this.getOwner().isNull()))
return DBConstants.NORMAL_RETURN;
... | java | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_screenField == null)
this.lookupSField();
if (m_bChangeIfNull != null)
{
if ((m_bChangeIfNull.booleanValue()) && (!this.getOwner().isNull()))
return DBConstants.NORMAL_RETURN;
... | [
"public",
"int",
"fieldChanged",
"(",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"if",
"(",
"m_screenField",
"==",
"null",
")",
"this",
".",
"lookupSField",
"(",
")",
";",
"if",
"(",
"m_bChangeIfNull",
"!=",
"null",
")",
"{",
"if",
"... | The Field has Changed.
Change to focus to the target field.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay). | [
"The",
"Field",
"has",
"Changed",
".",
"Change",
"to",
"focus",
"to",
"the",
"target",
"field",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ChangeFocusOnChangeHandler.java#L102-L116 |
152,866 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/utils/logging/ErrorLogger.java | ErrorLogger.getLogMessages | public Vector<LogMessage> getLogMessages() {
final Vector<LogMessage> output = new Vector<LogMessage>();
for (final LogMessage msg : messages) {
if (msg.getType() == LogMessage.Type.DEBUG) {
if (msg.getDebugLevel() <= debugLevel) {
output.add(msg);
... | java | public Vector<LogMessage> getLogMessages() {
final Vector<LogMessage> output = new Vector<LogMessage>();
for (final LogMessage msg : messages) {
if (msg.getType() == LogMessage.Type.DEBUG) {
if (msg.getDebugLevel() <= debugLevel) {
output.add(msg);
... | [
"public",
"Vector",
"<",
"LogMessage",
">",
"getLogMessages",
"(",
")",
"{",
"final",
"Vector",
"<",
"LogMessage",
">",
"output",
"=",
"new",
"Vector",
"<",
"LogMessage",
">",
"(",
")",
";",
"for",
"(",
"final",
"LogMessage",
"msg",
":",
"messages",
")",... | Gets the log messages and ignores message that are higher then the debug level
@return A vector based array containing the LogMessage's | [
"Gets",
"the",
"log",
"messages",
"and",
"ignores",
"message",
"that",
"are",
"higher",
"then",
"the",
"debug",
"level"
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/logging/ErrorLogger.java#L178-L190 |
152,867 | tvesalainen/util | util/src/main/java/org/vesalainen/net/NetFile.java | NetFile.refresh | public void refresh() throws IOException
{
if (Files.exists(file))
{
fine("%s exist", file);
writeLock.lock();
try
{
finer("start update(%s)", file);
update(file);
finer("end update(%s)", file);... | java | public void refresh() throws IOException
{
if (Files.exists(file))
{
fine("%s exist", file);
writeLock.lock();
try
{
finer("start update(%s)", file);
update(file);
finer("end update(%s)", file);... | [
"public",
"void",
"refresh",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"Files",
".",
"exists",
"(",
"file",
")",
")",
"{",
"fine",
"(",
"\"%s exist\"",
",",
"file",
")",
";",
"writeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"finer",
"(... | Call to refresh the file. During the call consumer is called at least once.
@throws IOException | [
"Call",
"to",
"refresh",
"the",
"file",
".",
"During",
"the",
"call",
"consumer",
"is",
"called",
"at",
"least",
"once",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/net/NetFile.java#L82-L112 |
152,868 | tacitknowledge/discovery | src/main/java/com/tacitknowledge/util/discovery/ArchiveResourceListSource.java | ArchiveResourceListSource.getResources | private List getResources(ZipFile file, String root)
{
List resourceNames = new ArrayList();
Enumeration e = file.entries();
while (e.hasMoreElements())
{
ZipEntry entry = (ZipEntry) e.nextElement();
String name = entry.getName();
if (name.startsWi... | java | private List getResources(ZipFile file, String root)
{
List resourceNames = new ArrayList();
Enumeration e = file.entries();
while (e.hasMoreElements())
{
ZipEntry entry = (ZipEntry) e.nextElement();
String name = entry.getName();
if (name.startsWi... | [
"private",
"List",
"getResources",
"(",
"ZipFile",
"file",
",",
"String",
"root",
")",
"{",
"List",
"resourceNames",
"=",
"new",
"ArrayList",
"(",
")",
";",
"Enumeration",
"e",
"=",
"file",
".",
"entries",
"(",
")",
";",
"while",
"(",
"e",
".",
"hasMor... | Returns a list of file resources contained in the specified directory
within a given Zip'd archive file.
@param file the zip file containing the resources to return
@param root the directory within the zip file containing the resources
@return a list of file resources contained in the specified directory
within a gi... | [
"Returns",
"a",
"list",
"of",
"file",
"resources",
"contained",
"in",
"the",
"specified",
"directory",
"within",
"a",
"given",
"Zip",
"d",
"archive",
"file",
"."
] | 700f5492c9cb5c0146d684acb38b71fd4ef4e97a | https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ArchiveResourceListSource.java#L95-L114 |
152,869 | jbundle/jbundle | model/base/src/main/java/org/jbundle/model/DBException.java | DBException.getMessage | public String getMessage() {
String message = super.getMessage();
if (m_iErrorCode != -1)
message = message + " Error code: " + m_iErrorCode;
return message;
} | java | public String getMessage() {
String message = super.getMessage();
if (m_iErrorCode != -1)
message = message + " Error code: " + m_iErrorCode;
return message;
} | [
"public",
"String",
"getMessage",
"(",
")",
"{",
"String",
"message",
"=",
"super",
".",
"getMessage",
"(",
")",
";",
"if",
"(",
"m_iErrorCode",
"!=",
"-",
"1",
")",
"message",
"=",
"message",
"+",
"\" Error code: \"",
"+",
"m_iErrorCode",
";",
"return",
... | Returns the detail message string of this throwable.
@return the detail message string of this <tt>Throwable</tt> instance
(which may be <tt>null</tt>). | [
"Returns",
"the",
"detail",
"message",
"string",
"of",
"this",
"throwable",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/DBException.java#L72-L77 |
152,870 | jinahya/hex-codec | src/main/java/com/github/jinahya/codec/HexEncoder.java | HexEncoder.encodeSingle | public static void encodeSingle(final int input, final byte[] output,
final int outoff) {
if (output == null) {
throw new NullPointerException("output");
}
if (outoff < 0) {
throw new IllegalArgumentException("outoff(" + outoff + ") <... | java | public static void encodeSingle(final int input, final byte[] output,
final int outoff) {
if (output == null) {
throw new NullPointerException("output");
}
if (outoff < 0) {
throw new IllegalArgumentException("outoff(" + outoff + ") <... | [
"public",
"static",
"void",
"encodeSingle",
"(",
"final",
"int",
"input",
",",
"final",
"byte",
"[",
"]",
"output",
",",
"final",
"int",
"outoff",
")",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"outp... | Encodes a single octet into two hex chars.
@param input the octet to encode.
@param output the array to which each encoded hex chars are written.
@param outoff the offset in the output array. | [
"Encodes",
"a",
"single",
"octet",
"into",
"two",
"hex",
"chars",
"."
] | 159aa54010821655496177e76a3ef35a49fbd433 | https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexEncoder.java#L73-L92 |
152,871 | jinahya/hex-codec | src/main/java/com/github/jinahya/codec/HexEncoder.java | HexEncoder.encodeSingle | public static void encodeSingle(final byte[] input, final int inoff,
final byte[] output, final int outoff) {
if (input == null) {
throw new NullPointerException("input");
}
if (inoff < 0) {
throw new IllegalArgumentException("inoff("... | java | public static void encodeSingle(final byte[] input, final int inoff,
final byte[] output, final int outoff) {
if (input == null) {
throw new NullPointerException("input");
}
if (inoff < 0) {
throw new IllegalArgumentException("inoff("... | [
"public",
"static",
"void",
"encodeSingle",
"(",
"final",
"byte",
"[",
"]",
"input",
",",
"final",
"int",
"inoff",
",",
"final",
"byte",
"[",
"]",
"output",
",",
"final",
"int",
"outoff",
")",
"{",
"if",
"(",
"input",
"==",
"null",
")",
"{",
"throw",... | Encodes a single octet into two nibbles.
@param input the input byte array
@param inoff the offset in the input array
@param output the array to which each encoded nibbles are written.
@param outoff the offset in the output array. | [
"Encodes",
"a",
"single",
"octet",
"into",
"two",
"nibbles",
"."
] | 159aa54010821655496177e76a3ef35a49fbd433 | https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexEncoder.java#L103-L120 |
152,872 | jinahya/hex-codec | src/main/java/com/github/jinahya/codec/HexEncoder.java | HexEncoder.encodeMultiple | public static byte[] encodeMultiple(final byte[] input) {
if (input == null) {
throw new NullPointerException("input");
}
final byte[] output = new byte[input.length << 1]; // * 2
encodeMultiple(input, 0, output, 0, input.length);
return output;
} | java | public static byte[] encodeMultiple(final byte[] input) {
if (input == null) {
throw new NullPointerException("input");
}
final byte[] output = new byte[input.length << 1]; // * 2
encodeMultiple(input, 0, output, 0, input.length);
return output;
} | [
"public",
"static",
"byte",
"[",
"]",
"encodeMultiple",
"(",
"final",
"byte",
"[",
"]",
"input",
")",
"{",
"if",
"(",
"input",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"input\"",
")",
";",
"}",
"final",
"byte",
"[",
"]",
... | Encodes given sequence of octets into a sequence of nibbles.
@param input the octets to encode
@return the encoded nibbles. | [
"Encodes",
"given",
"sequence",
"of",
"octets",
"into",
"a",
"sequence",
"of",
"nibbles",
"."
] | 159aa54010821655496177e76a3ef35a49fbd433 | https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexEncoder.java#L146-L157 |
152,873 | jbundle/jbundle | base/message/core/src/main/java/org/jbundle/base/message/core/trx/TrxMessageHeader.java | TrxMessageHeader.addTaskProperties | public void addTaskProperties(Task task)
{
if (task == null)
return;
this.put(TrxMessageHeader.USER_ID, task.getProperty(DBParams.USER_ID));
//? BaseDatabase.addDBProperties(m_mapMessageHeader, task, null); // Note: m_mapMessageHeader is guaranteed not null by previous call.
} | java | public void addTaskProperties(Task task)
{
if (task == null)
return;
this.put(TrxMessageHeader.USER_ID, task.getProperty(DBParams.USER_ID));
//? BaseDatabase.addDBProperties(m_mapMessageHeader, task, null); // Note: m_mapMessageHeader is guaranteed not null by previous call.
} | [
"public",
"void",
"addTaskProperties",
"(",
"Task",
"task",
")",
"{",
"if",
"(",
"task",
"==",
"null",
")",
"return",
";",
"this",
".",
"put",
"(",
"TrxMessageHeader",
".",
"USER_ID",
",",
"task",
".",
"getProperty",
"(",
"DBParams",
".",
"USER_ID",
")",... | Add the task properties that I will need to start up a process somewhere else with this same environment.
@param task | [
"Add",
"the",
"task",
"properties",
"that",
"I",
"will",
"need",
"to",
"start",
"up",
"a",
"process",
"somewhere",
"else",
"with",
"this",
"same",
"environment",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/core/src/main/java/org/jbundle/base/message/core/trx/TrxMessageHeader.java#L435-L441 |
152,874 | jbundle/jbundle | thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java | JDescTextField.getText | public String getText()
{
String strText = super.getText();
if (strText != null)
if (strText.equals(m_strDescription))
strText = Constants.BLANK;
return strText;
} | java | public String getText()
{
String strText = super.getText();
if (strText != null)
if (strText.equals(m_strDescription))
strText = Constants.BLANK;
return strText;
} | [
"public",
"String",
"getText",
"(",
")",
"{",
"String",
"strText",
"=",
"super",
".",
"getText",
"(",
")",
";",
"if",
"(",
"strText",
"!=",
"null",
")",
"if",
"(",
"strText",
".",
"equals",
"(",
"m_strDescription",
")",
")",
"strText",
"=",
"Constants"... | Get text from JTextField.
This method factors out the description.
@return The text for this component. | [
"Get",
"text",
"from",
"JTextField",
".",
"This",
"method",
"factors",
"out",
"the",
"description",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java#L112-L119 |
152,875 | jbundle/jbundle | thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java | JDescTextField.setText | public void setText(String strText)
{
if ((strText == null) || (strText.length() == 0))
{
if (!m_bInFocus)
{
strText = m_strDescription;
this.changeFont(true);
}
}
else
this.changeFont(false);
sup... | java | public void setText(String strText)
{
if ((strText == null) || (strText.length() == 0))
{
if (!m_bInFocus)
{
strText = m_strDescription;
this.changeFont(true);
}
}
else
this.changeFont(false);
sup... | [
"public",
"void",
"setText",
"(",
"String",
"strText",
")",
"{",
"if",
"(",
"(",
"strText",
"==",
"null",
")",
"||",
"(",
"strText",
".",
"length",
"(",
")",
"==",
"0",
")",
")",
"{",
"if",
"(",
"!",
"m_bInFocus",
")",
"{",
"strText",
"=",
"m_str... | Set this text component to this text string.
This method factors out the description.
@param text The text for this component. | [
"Set",
"this",
"text",
"component",
"to",
"this",
"text",
"string",
".",
"This",
"method",
"factors",
"out",
"the",
"description",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java#L125-L138 |
152,876 | jbundle/jbundle | thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java | JDescTextField.myFocusLost | public void myFocusLost()
{
m_bInFocus = false;
String strText = super.getText();
if ((strText == null) || (strText.length() == 0))
{ // Don't notify of change
if (m_actionListener != null)
this.removeActionListener(m_actionListener);
this.ch... | java | public void myFocusLost()
{
m_bInFocus = false;
String strText = super.getText();
if ((strText == null) || (strText.length() == 0))
{ // Don't notify of change
if (m_actionListener != null)
this.removeActionListener(m_actionListener);
this.ch... | [
"public",
"void",
"myFocusLost",
"(",
")",
"{",
"m_bInFocus",
"=",
"false",
";",
"String",
"strText",
"=",
"super",
".",
"getText",
"(",
")",
";",
"if",
"(",
"(",
"strText",
"==",
"null",
")",
"||",
"(",
"strText",
".",
"length",
"(",
")",
"==",
"0... | Gained the focus.
Need to set the description back if this component is empty. | [
"Gained",
"the",
"focus",
".",
"Need",
"to",
"set",
"the",
"description",
"back",
"if",
"this",
"component",
"is",
"empty",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java#L161-L174 |
152,877 | jbundle/jbundle | thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java | JDescTextField.changeFont | public void changeFont(boolean bDescription)
{
if (m_fontNormal == null)
{
m_fontNormal = this.getFont();
m_fontDesc = m_fontNormal.deriveFont(Font.ITALIC);
m_colorNormal = this.getForeground();
m_colorDesc = Color.gray;
}
if (bDescript... | java | public void changeFont(boolean bDescription)
{
if (m_fontNormal == null)
{
m_fontNormal = this.getFont();
m_fontDesc = m_fontNormal.deriveFont(Font.ITALIC);
m_colorNormal = this.getForeground();
m_colorDesc = Color.gray;
}
if (bDescript... | [
"public",
"void",
"changeFont",
"(",
"boolean",
"bDescription",
")",
"{",
"if",
"(",
"m_fontNormal",
"==",
"null",
")",
"{",
"m_fontNormal",
"=",
"this",
".",
"getFont",
"(",
")",
";",
"m_fontDesc",
"=",
"m_fontNormal",
".",
"deriveFont",
"(",
"Font",
".",... | Change the font depending of whether you are displaying the description or text.
@param bDescription If true, set the description text. | [
"Change",
"the",
"font",
"depending",
"of",
"whether",
"you",
"are",
"displaying",
"the",
"description",
"or",
"text",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java#L179-L198 |
152,878 | entrusc/xdata | src/main/java/com/moebiusgames/xdata/XData.java | XData.validate | public static boolean validate(InputStream in) throws IOException {
final Map<String, AbstractDataMarshaller<?>> marshallerMap = generateMarshallerMap(false, Collections.EMPTY_LIST);
marshallerMap.putAll(generateMarshallerMap(false, DEFAULT_MARSHALLERS));
final GZIPInputStream gzipInputStream =... | java | public static boolean validate(InputStream in) throws IOException {
final Map<String, AbstractDataMarshaller<?>> marshallerMap = generateMarshallerMap(false, Collections.EMPTY_LIST);
marshallerMap.putAll(generateMarshallerMap(false, DEFAULT_MARSHALLERS));
final GZIPInputStream gzipInputStream =... | [
"public",
"static",
"boolean",
"validate",
"(",
"InputStream",
"in",
")",
"throws",
"IOException",
"{",
"final",
"Map",
"<",
"String",
",",
"AbstractDataMarshaller",
"<",
"?",
">",
">",
"marshallerMap",
"=",
"generateMarshallerMap",
"(",
"false",
",",
"Collectio... | explicitly validates the given xdata stream against the embedded checksum,
if there is no checksum or the checksum does not correspond to the data,
then false is returned. Otherwise true is returned.
@param in
@return | [
"explicitly",
"validates",
"the",
"given",
"xdata",
"stream",
"against",
"the",
"embedded",
"checksum",
"if",
"there",
"is",
"no",
"checksum",
"or",
"the",
"checksum",
"does",
"not",
"correspond",
"to",
"the",
"data",
"then",
"false",
"is",
"returned",
".",
... | 44ba4c59fd639c99b89fc8995ba83fe89ca4239d | https://github.com/entrusc/xdata/blob/44ba4c59fd639c99b89fc8995ba83fe89ca4239d/src/main/java/com/moebiusgames/xdata/XData.java#L647-L678 |
152,879 | entrusc/xdata | src/main/java/com/moebiusgames/xdata/XData.java | XData.marshalObject | private static DataNode marshalObject(Map<String, AbstractDataMarshaller<?>> marshallerMap, Object object) {
//can't be null here because it is not resolved: meaning, it is an instance of an unknown class
final Class<?> clazz = object.getClass();
final AbstractDataMarshaller<Object> serializer ... | java | private static DataNode marshalObject(Map<String, AbstractDataMarshaller<?>> marshallerMap, Object object) {
//can't be null here because it is not resolved: meaning, it is an instance of an unknown class
final Class<?> clazz = object.getClass();
final AbstractDataMarshaller<Object> serializer ... | [
"private",
"static",
"DataNode",
"marshalObject",
"(",
"Map",
"<",
"String",
",",
"AbstractDataMarshaller",
"<",
"?",
">",
">",
"marshallerMap",
",",
"Object",
"object",
")",
"{",
"//can't be null here because it is not resolved: meaning, it is an instance of an unknown class... | wraps an deSerializedObject using the data marshaller for that given deSerializedObject
@param marshallerMap
@param object
@return | [
"wraps",
"an",
"deSerializedObject",
"using",
"the",
"data",
"marshaller",
"for",
"that",
"given",
"deSerializedObject"
] | 44ba4c59fd639c99b89fc8995ba83fe89ca4239d | https://github.com/entrusc/xdata/blob/44ba4c59fd639c99b89fc8995ba83fe89ca4239d/src/main/java/com/moebiusgames/xdata/XData.java#L1192-L1203 |
152,880 | entrusc/xdata | src/main/java/com/moebiusgames/xdata/XData.java | XData.serializeElement | private static boolean serializeElement(Object element, Deque<SerializationFrame> stack, DataOutputStream dOut,
Map<String, AbstractDataMarshaller<?>> marshallerMap,
Map<SerializedObject, SerializedObject> serializedObjects,
SerializedObject testSerializedObject,
boolean ... | java | private static boolean serializeElement(Object element, Deque<SerializationFrame> stack, DataOutputStream dOut,
Map<String, AbstractDataMarshaller<?>> marshallerMap,
Map<SerializedObject, SerializedObject> serializedObjects,
SerializedObject testSerializedObject,
boolean ... | [
"private",
"static",
"boolean",
"serializeElement",
"(",
"Object",
"element",
",",
"Deque",
"<",
"SerializationFrame",
">",
"stack",
",",
"DataOutputStream",
"dOut",
",",
"Map",
"<",
"String",
",",
"AbstractDataMarshaller",
"<",
"?",
">",
">",
"marshallerMap",
"... | processes one element and either serializes it directly to the stream, or pushes
a corresponding frame to the stack.
@param element
@param stack
@param dOut
@param marshallerMap
@param serializedObjects
@param testSerializedObject
@return true if a new element has been pushed to the stack, false otherwise
@throws IOEx... | [
"processes",
"one",
"element",
"and",
"either",
"serializes",
"it",
"directly",
"to",
"the",
"stream",
"or",
"pushes",
"a",
"corresponding",
"frame",
"to",
"the",
"stack",
"."
] | 44ba4c59fd639c99b89fc8995ba83fe89ca4239d | https://github.com/entrusc/xdata/blob/44ba4c59fd639c99b89fc8995ba83fe89ca4239d/src/main/java/com/moebiusgames/xdata/XData.java#L1218-L1260 |
152,881 | entrusc/xdata | src/main/java/com/moebiusgames/xdata/XData.java | XData.serialize | private static void serialize(Map<String, AbstractDataMarshaller<?>> marshallerMap,
DataOutputStream dOut, DataNode primaryNode, boolean ignoreMissingMarshallers,
ProgressListener progressListener) throws IOException {
//a map containing all serialized objects. This is used
//to... | java | private static void serialize(Map<String, AbstractDataMarshaller<?>> marshallerMap,
DataOutputStream dOut, DataNode primaryNode, boolean ignoreMissingMarshallers,
ProgressListener progressListener) throws IOException {
//a map containing all serialized objects. This is used
//to... | [
"private",
"static",
"void",
"serialize",
"(",
"Map",
"<",
"String",
",",
"AbstractDataMarshaller",
"<",
"?",
">",
">",
"marshallerMap",
",",
"DataOutputStream",
"dOut",
",",
"DataNode",
"primaryNode",
",",
"boolean",
"ignoreMissingMarshallers",
",",
"ProgressListen... | actually serializes the data
@param marshallerMap
@param dOut
@param primaryNode
@param progressListener
@throws IOException | [
"actually",
"serializes",
"the",
"data"
] | 44ba4c59fd639c99b89fc8995ba83fe89ca4239d | https://github.com/entrusc/xdata/blob/44ba4c59fd639c99b89fc8995ba83fe89ca4239d/src/main/java/com/moebiusgames/xdata/XData.java#L1271-L1321 |
152,882 | entrusc/xdata | src/main/java/com/moebiusgames/xdata/XData.java | XData.serializePrimitive | private static void serializePrimitive(DataOutputStream dOut, Object primitive) throws IOException {
if (primitive == null) {
dOut.writeByte(VAL_NULL);
} else {
dOut.writeByte(VAL_ELEMENT);
final Class<?> resolvedObjectClass = primitive.getClass();
Seriali... | java | private static void serializePrimitive(DataOutputStream dOut, Object primitive) throws IOException {
if (primitive == null) {
dOut.writeByte(VAL_NULL);
} else {
dOut.writeByte(VAL_ELEMENT);
final Class<?> resolvedObjectClass = primitive.getClass();
Seriali... | [
"private",
"static",
"void",
"serializePrimitive",
"(",
"DataOutputStream",
"dOut",
",",
"Object",
"primitive",
")",
"throws",
"IOException",
"{",
"if",
"(",
"primitive",
"==",
"null",
")",
"{",
"dOut",
".",
"writeByte",
"(",
"VAL_NULL",
")",
";",
"}",
"else... | serializes a primitive or null
@param serializerMap
@param dOut
@param primitive
@throws IOException | [
"serializes",
"a",
"primitive",
"or",
"null"
] | 44ba4c59fd639c99b89fc8995ba83fe89ca4239d | https://github.com/entrusc/xdata/blob/44ba4c59fd639c99b89fc8995ba83fe89ca4239d/src/main/java/com/moebiusgames/xdata/XData.java#L1336-L1349 |
152,883 | fuinorg/utils4swing | src/main/java/org/fuin/utils4swing/threadsafe/ThreadSafeJOptionPane.java | ThreadSafeJOptionPane.showMessageDialog | public static void showMessageDialog(final Component parentComponent, final Object message) {
execute(new VoidOptionPane() {
public void show() {
JOptionPane.showMessageDialog(parentComponent, message);
}
});
} | java | public static void showMessageDialog(final Component parentComponent, final Object message) {
execute(new VoidOptionPane() {
public void show() {
JOptionPane.showMessageDialog(parentComponent, message);
}
});
} | [
"public",
"static",
"void",
"showMessageDialog",
"(",
"final",
"Component",
"parentComponent",
",",
"final",
"Object",
"message",
")",
"{",
"execute",
"(",
"new",
"VoidOptionPane",
"(",
")",
"{",
"public",
"void",
"show",
"(",
")",
"{",
"JOptionPane",
".",
"... | Brings up an information-message dialog titled "Message".
@param parentComponent
determines the <code>Frame</code> in which the dialog is
displayed; if <code>null</code>, or if the
<code>parentComponent</code> has no <code>Frame</code>, a
default <code>Frame</code> is used
@param message
the <code>Object</code> to dis... | [
"Brings",
"up",
"an",
"information",
"-",
"message",
"dialog",
"titled",
"Message",
"."
] | 560fb69eac182e3473de9679c3c15433e524ef6b | https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/threadsafe/ThreadSafeJOptionPane.java#L827-L835 |
152,884 | inkstand-io/scribble | scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/builder/JNDIContentRepositoryBuilder.java | JNDIContentRepositoryBuilder.withContextProperty | public JNDIContentRepositoryBuilder withContextProperty(final String name, final Object value) {
contextProperties.put(name, value);
return this;
} | java | public JNDIContentRepositoryBuilder withContextProperty(final String name, final Object value) {
contextProperties.put(name, value);
return this;
} | [
"public",
"JNDIContentRepositoryBuilder",
"withContextProperty",
"(",
"final",
"String",
"name",
",",
"final",
"Object",
"value",
")",
"{",
"contextProperties",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Adds a new context property to the environment for the JNDI lookup context
@param name
the name of the environment variable
@param value
the value to assign to the variable
@return this test rule | [
"Adds",
"a",
"new",
"context",
"property",
"to",
"the",
"environment",
"for",
"the",
"JNDI",
"lookup",
"context"
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/builder/JNDIContentRepositoryBuilder.java#L131-L135 |
152,885 | inkstand-io/scribble | scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/builder/JNDIContentRepositoryBuilder.java | JNDIContentRepositoryBuilder.withSecurityPrincipal | public JNDIContentRepositoryBuilder withSecurityPrincipal(final String principalName, final String credentials) {
contextProperties.put(Context.SECURITY_PRINCIPAL, principalName);
contextProperties.put(Context.SECURITY_CREDENTIALS, credentials);
return this;
} | java | public JNDIContentRepositoryBuilder withSecurityPrincipal(final String principalName, final String credentials) {
contextProperties.put(Context.SECURITY_PRINCIPAL, principalName);
contextProperties.put(Context.SECURITY_CREDENTIALS, credentials);
return this;
} | [
"public",
"JNDIContentRepositoryBuilder",
"withSecurityPrincipal",
"(",
"final",
"String",
"principalName",
",",
"final",
"String",
"credentials",
")",
"{",
"contextProperties",
".",
"put",
"(",
"Context",
".",
"SECURITY_PRINCIPAL",
",",
"principalName",
")",
";",
"co... | Sets the context properties for SECURITY_PRINCIPAL and SECURITY_CREDENTIAL to perform the lookup. This method is
a convenience for setting the properties SECURITY_PRINCIPAL and SECURITY_CREDENTIAL on the environment.
@param principalName
the principal name to use to perform the lookup
@param credentials
the credential... | [
"Sets",
"the",
"context",
"properties",
"for",
"SECURITY_PRINCIPAL",
"and",
"SECURITY_CREDENTIAL",
"to",
"perform",
"the",
"lookup",
".",
"This",
"method",
"is",
"a",
"convenience",
"for",
"setting",
"the",
"properties",
"SECURITY_PRINCIPAL",
"and",
"SECURITY_CREDENTI... | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/builder/JNDIContentRepositoryBuilder.java#L190-L195 |
152,886 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/DatabaseSession.java | DatabaseSession.freeRemoteSession | public void freeRemoteSession() throws RemoteException
{
try {
if (m_database.getTableCount() == 0)
m_database.free(); // Free if this is my private database, or there are no tables left
} catch (Exception ex) {
ex.printStackTrace();
}
supe... | java | public void freeRemoteSession() throws RemoteException
{
try {
if (m_database.getTableCount() == 0)
m_database.free(); // Free if this is my private database, or there are no tables left
} catch (Exception ex) {
ex.printStackTrace();
}
supe... | [
"public",
"void",
"freeRemoteSession",
"(",
")",
"throws",
"RemoteException",
"{",
"try",
"{",
"if",
"(",
"m_database",
".",
"getTableCount",
"(",
")",
"==",
"0",
")",
"m_database",
".",
"free",
"(",
")",
";",
"// Free if this is my private database, or there are ... | Free the objects.
This method is called from the remote client, and frees this session. | [
"Free",
"the",
"objects",
".",
"This",
"method",
"is",
"called",
"from",
"the",
"remote",
"client",
"and",
"frees",
"this",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/DatabaseSession.java#L103-L112 |
152,887 | jmeetsma/Iglu-Util | src/main/java/org/ijsberg/iglu/util/io/FileFilterRuleSet.java | FileFilterRuleSet.fileMatchesRules | public boolean fileMatchesRules(File file) {
try {
if(file.exists()) {
if(includeFilesContainingText.length == 0 && excludeFilesContainingText.length == 0) {
return fileMatchesRules(
getComparableFileName(file));
} else {
... | java | public boolean fileMatchesRules(File file) {
try {
if(file.exists()) {
if(includeFilesContainingText.length == 0 && excludeFilesContainingText.length == 0) {
return fileMatchesRules(
getComparableFileName(file));
} else {
... | [
"public",
"boolean",
"fileMatchesRules",
"(",
"File",
"file",
")",
"{",
"try",
"{",
"if",
"(",
"file",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"includeFilesContainingText",
".",
"length",
"==",
"0",
"&&",
"excludeFilesContainingText",
".",
"length",
... | Checks if file matches rules.
@param file
@return true if a file exists, matches include and exclude rules and is successfully parsed in case of inspection of contents
@throws IOException | [
"Checks",
"if",
"file",
"matches",
"rules",
"."
] | 971eb022115247b1e34dc26dd02e7e621e29e910 | https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/io/FileFilterRuleSet.java#L98-L115 |
152,888 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/VirtualFileSystems.java | VirtualFileSystems.newFileSystem | public static final FileSystem newFileSystem(Path path, Map<String,?> env) throws IOException
{
return getDefault().provider().newFileSystem(path, env);
} | java | public static final FileSystem newFileSystem(Path path, Map<String,?> env) throws IOException
{
return getDefault().provider().newFileSystem(path, env);
} | [
"public",
"static",
"final",
"FileSystem",
"newFileSystem",
"(",
"Path",
"path",
",",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"throws",
"IOException",
"{",
"return",
"getDefault",
"(",
")",
".",
"provider",
"(",
")",
".",
"newFileSystem",
"(",
"... | Constructs a new FileSystem to access the contents of a file as a file system.
@param path
@param env
@return
@throws IOException | [
"Constructs",
"a",
"new",
"FileSystem",
"to",
"access",
"the",
"contents",
"of",
"a",
"file",
"as",
"a",
"file",
"system",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/VirtualFileSystems.java#L47-L50 |
152,889 | hdecarne/java-default | src/main/java/de/carne/util/cmdline/CmdLineProcessor.java | CmdLineProcessor.process | public void process() throws CmdLineException {
ProcessingContext context = new ProcessingContext();
for (String arg : this.args) {
if (arg != null && !context.processPendingOptionAction(arg)
&& !context.processOptionAction(arg, this.optionActions)
&& !context.processSwitchAction(arg, this.switchActio... | java | public void process() throws CmdLineException {
ProcessingContext context = new ProcessingContext();
for (String arg : this.args) {
if (arg != null && !context.processPendingOptionAction(arg)
&& !context.processOptionAction(arg, this.optionActions)
&& !context.processSwitchAction(arg, this.switchActio... | [
"public",
"void",
"process",
"(",
")",
"throws",
"CmdLineException",
"{",
"ProcessingContext",
"context",
"=",
"new",
"ProcessingContext",
"(",
")",
";",
"for",
"(",
"String",
"arg",
":",
"this",
".",
"args",
")",
"{",
"if",
"(",
"arg",
"!=",
"null",
"&&... | Processes the command line and invoke the correspond actions.
@throws CmdLineException if the command line contains an error.
@see #onSwitch(Consumer)
@see #onOption(BiConsumer)
@see #onUnnamedOption(Consumer)
@see #onUnknownArg(Consumer) | [
"Processes",
"the",
"command",
"line",
"and",
"invoke",
"the",
"correspond",
"actions",
"."
] | ca16f6fdb0436e90e9e2df3106055e320bb3c9e3 | https://github.com/hdecarne/java-default/blob/ca16f6fdb0436e90e9e2df3106055e320bb3c9e3/src/main/java/de/carne/util/cmdline/CmdLineProcessor.java#L104-L126 |
152,890 | tvesalainen/util | util/src/main/java/org/vesalainen/math/CubicSplineCurve.java | CubicSplineCurve.get141Matrix | public static final DenseMatrix64F get141Matrix(int order)
{
if (order < 2)
{
throw new IllegalArgumentException("order has to be at least 2 for 1 4 1 matrix");
}
double[] data = new double[order*order];
for (int row=0;row<order;row++)
{
... | java | public static final DenseMatrix64F get141Matrix(int order)
{
if (order < 2)
{
throw new IllegalArgumentException("order has to be at least 2 for 1 4 1 matrix");
}
double[] data = new double[order*order];
for (int row=0;row<order;row++)
{
... | [
"public",
"static",
"final",
"DenseMatrix64F",
"get141Matrix",
"(",
"int",
"order",
")",
"{",
"if",
"(",
"order",
"<",
"2",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"order has to be at least 2 for 1 4 1 matrix\"",
")",
";",
"}",
"double",
"[",
... | Creates a 1 4 1 matrix eg.
|4 1 0|
|1 4 1|
|0 1 4|
@param order Matrix dimension > 1
@return 1 4 1 matrix | [
"Creates",
"a",
"1",
"4",
"1",
"matrix",
"eg",
".",
"|4",
"1",
"0|",
"|1",
"4",
"1|",
"|0",
"1",
"4|"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/CubicSplineCurve.java#L172-L202 |
152,891 | tvesalainen/util | util/src/main/java/org/vesalainen/math/CubicSplineCurve.java | CubicSplineCurve.get | public double get(double x, double epsilon)
{
Point nearest = getNearest(x, epsilon);
return nearest.getY();
} | java | public double get(double x, double epsilon)
{
Point nearest = getNearest(x, epsilon);
return nearest.getY();
} | [
"public",
"double",
"get",
"(",
"double",
"x",
",",
"double",
"epsilon",
")",
"{",
"Point",
"nearest",
"=",
"getNearest",
"(",
"x",
",",
"epsilon",
")",
";",
"return",
"nearest",
".",
"getY",
"(",
")",
";",
"}"
] | Returns y for x. This is convenient method. Use getNearest to get exact
evaluated point.
@param x
@param epsilon Evaluated points x cannot differ more
@return
@see org.vesalainen.math.CubicSplineCurve#getNearest(double, double) | [
"Returns",
"y",
"for",
"x",
".",
"This",
"is",
"convenient",
"method",
".",
"Use",
"getNearest",
"to",
"get",
"exact",
"evaluated",
"point",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/CubicSplineCurve.java#L315-L319 |
152,892 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.loadService | public static <S> S loadService(Class<S> serviceInterface, ClassLoader classLoader)
{
Iterator<S> services = ServiceLoader.load(serviceInterface, classLoader).iterator();
if(services.hasNext()) {
return services.next();
}
// although not official, Android does not support ServiceLoader
... | java | public static <S> S loadService(Class<S> serviceInterface, ClassLoader classLoader)
{
Iterator<S> services = ServiceLoader.load(serviceInterface, classLoader).iterator();
if(services.hasNext()) {
return services.next();
}
// although not official, Android does not support ServiceLoader
... | [
"public",
"static",
"<",
"S",
">",
"S",
"loadService",
"(",
"Class",
"<",
"S",
">",
"serviceInterface",
",",
"ClassLoader",
"classLoader",
")",
"{",
"Iterator",
"<",
"S",
">",
"services",
"=",
"ServiceLoader",
".",
"load",
"(",
"serviceInterface",
",",
"cl... | Load service of requested interface using given class loader. Throws exception if service implementation not found
on run-time.
@param serviceInterface service interface,
@param classLoader class loader.
@param <S> service type.
@return service instance.
@throws NoProviderException if service provider not found on run... | [
"Load",
"service",
"of",
"requested",
"interface",
"using",
"given",
"class",
"loader",
".",
"Throws",
"exception",
"if",
"service",
"implementation",
"not",
"found",
"on",
"run",
"-",
"time",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L219-L238 |
152,893 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.loadOptionalService | public static <S> S loadOptionalService(Class<S> serviceInterface)
{
S service = null;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if(classLoader != null) {
service = loadService(serviceInterface, classLoader);
}
if(service == null) {
service = loa... | java | public static <S> S loadOptionalService(Class<S> serviceInterface)
{
S service = null;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if(classLoader != null) {
service = loadService(serviceInterface, classLoader);
}
if(service == null) {
service = loa... | [
"public",
"static",
"<",
"S",
">",
"S",
"loadOptionalService",
"(",
"Class",
"<",
"S",
">",
"serviceInterface",
")",
"{",
"S",
"service",
"=",
"null",
";",
"ClassLoader",
"classLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoad... | Load service of requested interface returning null if service provider not found. Caller should test returned value
and take appropriate actions.
@param serviceInterface service interface.
@param <S> service type.
@return service instance or null. | [
"Load",
"service",
"of",
"requested",
"interface",
"returning",
"null",
"if",
"service",
"provider",
"not",
"found",
".",
"Caller",
"should",
"test",
"returned",
"value",
"and",
"take",
"appropriate",
"actions",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L248-L259 |
152,894 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.getParameterTypes | public static Class<?>[] getParameterTypes(Object... arguments)
{
Class<?>[] types = new Class<?>[arguments.length];
for(int i = 0; i < arguments.length; i++) {
Object argument = arguments[i];
if(argument == null) {
types[i] = Object.class;
continue;
}
if(!(arg... | java | public static Class<?>[] getParameterTypes(Object... arguments)
{
Class<?>[] types = new Class<?>[arguments.length];
for(int i = 0; i < arguments.length; i++) {
Object argument = arguments[i];
if(argument == null) {
types[i] = Object.class;
continue;
}
if(!(arg... | [
"public",
"static",
"Class",
"<",
"?",
">",
"[",
"]",
"getParameterTypes",
"(",
"Object",
"...",
"arguments",
")",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"types",
"=",
"new",
"Class",
"<",
"?",
">",
"[",
"arguments",
".",
"length",
"]",
";",
"for",... | Get method formal parameter types inferred from actual invocation arguments. This utility is a helper for method
discovery when have access to the actual invocation argument, but not the formal parameter types list declared by
method signature.
@param arguments variable number of method arguments.
@return parameter ty... | [
"Get",
"method",
"formal",
"parameter",
"types",
"inferred",
"from",
"actual",
"invocation",
"arguments",
".",
"This",
"utility",
"is",
"a",
"helper",
"for",
"method",
"discovery",
"when",
"have",
"access",
"to",
"the",
"actual",
"invocation",
"argument",
"but",... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L294-L327 |
152,895 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.invoke | private static Object invoke(Object object, Method method, Object... arguments) throws Exception
{
Throwable cause = null;
try {
method.setAccessible(true);
return method.invoke(object instanceof Class<?> ? null : object, arguments);
}
catch(IllegalAccessException e) {
throw ... | java | private static Object invoke(Object object, Method method, Object... arguments) throws Exception
{
Throwable cause = null;
try {
method.setAccessible(true);
return method.invoke(object instanceof Class<?> ? null : object, arguments);
}
catch(IllegalAccessException e) {
throw ... | [
"private",
"static",
"Object",
"invoke",
"(",
"Object",
"object",
",",
"Method",
"method",
",",
"Object",
"...",
"arguments",
")",
"throws",
"Exception",
"{",
"Throwable",
"cause",
"=",
"null",
";",
"try",
"{",
"method",
".",
"setAccessible",
"(",
"true",
... | Do the actual reflexive method invocation.
@param object object instance,
@param method reflexive method,
@param arguments variable number of arguments.
@return value returned by method execution.
@throws Exception if invocation fail for whatever reason including method internals. | [
"Do",
"the",
"actual",
"reflexive",
"method",
"invocation",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L478-L498 |
152,896 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.getCallerMethod | public static String getCallerMethod()
{
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
if(stackTrace.length == 0) {
return "unknown";
}
final StackTraceElement e = stackTrace[0];
return Strings.concat(e.getClassName(), '#', e.getMethodName(), ':', e.getLineN... | java | public static String getCallerMethod()
{
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
if(stackTrace.length == 0) {
return "unknown";
}
final StackTraceElement e = stackTrace[0];
return Strings.concat(e.getClassName(), '#', e.getMethodName(), ':', e.getLineN... | [
"public",
"static",
"String",
"getCallerMethod",
"(",
")",
"{",
"StackTraceElement",
"[",
"]",
"stackTrace",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getStackTrace",
"(",
")",
";",
"if",
"(",
"stackTrace",
".",
"length",
"==",
"0",
")",
"{",
... | Get source line for the caller method.
@return caller method. | [
"Get",
"source",
"line",
"for",
"the",
"caller",
"method",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L587-L595 |
152,897 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.getOptionalField | public static Field getOptionalField(Class<?> clazz, String fieldName)
{
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
return field;
}
catch(NoSuchFieldException expectable) {}
catch(SecurityException e) {
throw new BugError(e);
... | java | public static Field getOptionalField(Class<?> clazz, String fieldName)
{
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
return field;
}
catch(NoSuchFieldException expectable) {}
catch(SecurityException e) {
throw new BugError(e);
... | [
"public",
"static",
"Field",
"getOptionalField",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"fieldName",
")",
"{",
"try",
"{",
"Field",
"field",
"=",
"clazz",
".",
"getDeclaredField",
"(",
"fieldName",
")",
";",
"field",
".",
"setAccessible",
"("... | Get class field or null if not found. Try to get named class field and returns null if not found; this method does
not throw any exception.
@param clazz Java class to return field from,
@param fieldName field name.
@return class reflective field or null. | [
"Get",
"class",
"field",
"or",
"null",
"if",
"not",
"found",
".",
"Try",
"to",
"get",
"named",
"class",
"field",
"and",
"returns",
"null",
"if",
"not",
"found",
";",
"this",
"method",
"does",
"not",
"throw",
"any",
"exception",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L630-L642 |
152,898 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.getOptionalFieldValue | @SafeVarargs
public static <T> T getOptionalFieldValue(Object object, String fieldName, Class<T>... fieldType)
{
Class<?> clazz = null;
if(object instanceof Class<?>) {
clazz = (Class<?>)object;
object = null;
}
else {
clazz = object.getClass();
}
return getField... | java | @SafeVarargs
public static <T> T getOptionalFieldValue(Object object, String fieldName, Class<T>... fieldType)
{
Class<?> clazz = null;
if(object instanceof Class<?>) {
clazz = (Class<?>)object;
object = null;
}
else {
clazz = object.getClass();
}
return getField... | [
"@",
"SafeVarargs",
"public",
"static",
"<",
"T",
">",
"T",
"getOptionalFieldValue",
"(",
"Object",
"object",
",",
"String",
"fieldName",
",",
"Class",
"<",
"T",
">",
"...",
"fieldType",
")",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"null",
";",
"if"... | Get optional field value from instance or class. Retrieve named field value from given instance or class; if field
is missing return null. Note that this method does not throw exceptions. Also, if optional desired field type is
present and named field is of different type returns null.
@param object instance or class ... | [
"Get",
"optional",
"field",
"value",
"from",
"instance",
"or",
"class",
".",
"Retrieve",
"named",
"field",
"value",
"from",
"given",
"instance",
"or",
"class",
";",
"if",
"field",
"is",
"missing",
"return",
"null",
".",
"Note",
"that",
"this",
"method",
"d... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L743-L755 |
152,899 | js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.getFieldValue | public static <T> T getFieldValue(Object object, Class<?> clazz, String fieldName)
{
return getFieldValue(object, clazz, fieldName, null, false);
} | java | public static <T> T getFieldValue(Object object, Class<?> clazz, String fieldName)
{
return getFieldValue(object, clazz, fieldName, null, false);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"getFieldValue",
"(",
"Object",
"object",
",",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"fieldName",
")",
"{",
"return",
"getFieldValue",
"(",
"object",
",",
"clazz",
",",
"fieldName",
",",
"null",
",",
"f... | Get instance field value declared into superclass. Retrieve inherited field value from given instance throwing
exception if field is not declared into superclass.
@param object instance to retrieve field value from,
@param clazz instance superclass,
@param fieldName field name.
@param <T> field value type.
@return ins... | [
"Get",
"instance",
"field",
"value",
"declared",
"into",
"superclass",
".",
"Retrieve",
"inherited",
"field",
"value",
"from",
"given",
"instance",
"throwing",
"exception",
"if",
"field",
"is",
"not",
"declared",
"into",
"superclass",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L768-L771 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.