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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7,900 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.removeAllConstraints | public final void removeAllConstraints(
@NonNull final Collection<Constraint<CharSequence>> constraints) {
Condition.INSTANCE.ensureNotNull(constraints, "The collection may not be null");
for (Constraint<CharSequence> constraint : constraints) {
removeConstraint(constraint);
... | java | public final void removeAllConstraints(
@NonNull final Collection<Constraint<CharSequence>> constraints) {
Condition.INSTANCE.ensureNotNull(constraints, "The collection may not be null");
for (Constraint<CharSequence> constraint : constraints) {
removeConstraint(constraint);
... | [
"public",
"final",
"void",
"removeAllConstraints",
"(",
"@",
"NonNull",
"final",
"Collection",
"<",
"Constraint",
"<",
"CharSequence",
">",
">",
"constraints",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"constraints",
",",
"\"The collection... | Removes all constraints, which are contained by a specific collection.
@param constraints
A collection, which contains the constraints, which should be removed, as an instance
of the type {@link Collection} or an empty collection, if no constraints should be
removed | [
"Removes",
"all",
"constraints",
"which",
"are",
"contained",
"by",
"a",
"specific",
"collection",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L428-L435 |
7,901 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.removeAllConstraints | @SafeVarargs
public final void removeAllConstraints(@NonNull final Constraint<CharSequence>... constraints) {
Condition.INSTANCE.ensureNotNull(constraints, "The array may not be null");
removeAllConstraints(Arrays.asList(constraints));
} | java | @SafeVarargs
public final void removeAllConstraints(@NonNull final Constraint<CharSequence>... constraints) {
Condition.INSTANCE.ensureNotNull(constraints, "The array may not be null");
removeAllConstraints(Arrays.asList(constraints));
} | [
"@",
"SafeVarargs",
"public",
"final",
"void",
"removeAllConstraints",
"(",
"@",
"NonNull",
"final",
"Constraint",
"<",
"CharSequence",
">",
"...",
"constraints",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"constraints",
",",
"\"The array m... | Removes all constraints, which are contained by a specific array.
@param constraints
An array, which contains the constraints, which should be removed, as an array of the
type {@link Constraint}, or an empty array, if no constraints should be removed | [
"Removes",
"all",
"constraints",
"which",
"are",
"contained",
"by",
"a",
"specific",
"array",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L444-L448 |
7,902 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.addHelperText | public final void addHelperText(@NonNull final CharSequence helperText) {
Condition.INSTANCE.ensureNotNull(helperText, "The helper text may not be null");
Condition.INSTANCE.ensureNotEmpty(helperText, "The helper text may not be empty");
if (!helperTexts.contains(helperText)) {
help... | java | public final void addHelperText(@NonNull final CharSequence helperText) {
Condition.INSTANCE.ensureNotNull(helperText, "The helper text may not be null");
Condition.INSTANCE.ensureNotEmpty(helperText, "The helper text may not be empty");
if (!helperTexts.contains(helperText)) {
help... | [
"public",
"final",
"void",
"addHelperText",
"(",
"@",
"NonNull",
"final",
"CharSequence",
"helperText",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"helperText",
",",
"\"The helper text may not be null\"",
")",
";",
"Condition",
".",
"INSTANCE... | Adds a new helper text, which should be shown, depending on the password strength. Helper
texts, which have been added later than others, are supposed to indicate a higher password
strength.
@param helperText
The helper text, which should be added, as an instance of the type {@link
CharSequence}. The helper text may n... | [
"Adds",
"a",
"new",
"helper",
"text",
"which",
"should",
"be",
"shown",
"depending",
"on",
"the",
"password",
"strength",
".",
"Helper",
"texts",
"which",
"have",
"been",
"added",
"later",
"than",
"others",
"are",
"supposed",
"to",
"indicate",
"a",
"higher",... | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L479-L487 |
7,903 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.addAllHelperTexts | public final void addAllHelperTexts(@NonNull final Collection<CharSequence> helperTexts) {
Condition.INSTANCE.ensureNotNull(helperTexts, "The collection may not be null");
for (CharSequence helperText : helperTexts) {
addHelperText(helperText);
}
} | java | public final void addAllHelperTexts(@NonNull final Collection<CharSequence> helperTexts) {
Condition.INSTANCE.ensureNotNull(helperTexts, "The collection may not be null");
for (CharSequence helperText : helperTexts) {
addHelperText(helperText);
}
} | [
"public",
"final",
"void",
"addAllHelperTexts",
"(",
"@",
"NonNull",
"final",
"Collection",
"<",
"CharSequence",
">",
"helperTexts",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"helperTexts",
",",
"\"The collection may not be null\"",
")",
";"... | Adds all helper texts, which are contained by a specific collection. The helper texts are
added in the given order.
@param helperTexts
A collection, which contains the helper texts, which should be added, as an instance
of the type {@link Collection} or an empty collection, if no helper texts should be
added | [
"Adds",
"all",
"helper",
"texts",
"which",
"are",
"contained",
"by",
"a",
"specific",
"collection",
".",
"The",
"helper",
"texts",
"are",
"added",
"in",
"the",
"given",
"order",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L511-L517 |
7,904 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.removeHelperText | public final void removeHelperText(@NonNull final CharSequence helperText) {
Condition.INSTANCE.ensureNotNull(helperText, "The helper text may not be null");
Condition.INSTANCE.ensureNotEmpty(helperText, "The helper text may not be empty");
helperTexts.remove(helperText);
verifyPasswordS... | java | public final void removeHelperText(@NonNull final CharSequence helperText) {
Condition.INSTANCE.ensureNotNull(helperText, "The helper text may not be null");
Condition.INSTANCE.ensureNotEmpty(helperText, "The helper text may not be empty");
helperTexts.remove(helperText);
verifyPasswordS... | [
"public",
"final",
"void",
"removeHelperText",
"(",
"@",
"NonNull",
"final",
"CharSequence",
"helperText",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"helperText",
",",
"\"The helper text may not be null\"",
")",
";",
"Condition",
".",
"INSTA... | Removes a specific helper text, which should not be shown, depending on the password
strength, anymore.
@param helperText
The helper text, which should be removed, as an instance of the type {@link
CharSequence}. The helper text may neither be null, nor empty | [
"Removes",
"a",
"specific",
"helper",
"text",
"which",
"should",
"not",
"be",
"shown",
"depending",
"on",
"the",
"password",
"strength",
"anymore",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L574-L579 |
7,905 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.addHelperTextColor | public final void addHelperTextColor(@ColorInt final int color) {
if (!helperTextColors.contains(color)) {
helperTextColors.add(color);
verifyPasswordStrength();
}
} | java | public final void addHelperTextColor(@ColorInt final int color) {
if (!helperTextColors.contains(color)) {
helperTextColors.add(color);
verifyPasswordStrength();
}
} | [
"public",
"final",
"void",
"addHelperTextColor",
"(",
"@",
"ColorInt",
"final",
"int",
"color",
")",
"{",
"if",
"(",
"!",
"helperTextColors",
".",
"contains",
"(",
"color",
")",
")",
"{",
"helperTextColors",
".",
"add",
"(",
"color",
")",
";",
"verifyPassw... | Adds a new helper text color, which should be used to highlight the helper text, which
indicates the password strength.
@param color
The color, which should be added, as an {@link Integer} value | [
"Adds",
"a",
"new",
"helper",
"text",
"color",
"which",
"should",
"be",
"used",
"to",
"highlight",
"the",
"helper",
"text",
"which",
"indicates",
"the",
"password",
"strength",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L680-L685 |
7,906 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/PasswordEditText.java | PasswordEditText.removeHelperTextColor | public final void removeHelperTextColor(@ColorInt final int color) {
int index = helperTextColors.indexOf(color);
if (index != -1) {
helperTextColors.remove(index);
verifyPasswordStrength();
}
} | java | public final void removeHelperTextColor(@ColorInt final int color) {
int index = helperTextColors.indexOf(color);
if (index != -1) {
helperTextColors.remove(index);
verifyPasswordStrength();
}
} | [
"public",
"final",
"void",
"removeHelperTextColor",
"(",
"@",
"ColorInt",
"final",
"int",
"color",
")",
"{",
"int",
"index",
"=",
"helperTextColors",
".",
"indexOf",
"(",
"color",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"helperTextColors",
... | Removes a specific helper text color, which should not be used to highlight the helper text,
which indicates the password strength, anymore.
@param color
The color, which should be removed, as an {@link Integer} value | [
"Removes",
"a",
"specific",
"helper",
"text",
"color",
"which",
"should",
"not",
"be",
"used",
"to",
"highlight",
"the",
"helper",
"text",
"which",
"indicates",
"the",
"password",
"strength",
"anymore",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/PasswordEditText.java#L767-L774 |
7,907 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.isAlwaysInserted | private boolean isAlwaysInserted(JDBCStorableProperty<?> property) {
return property.isVersion() ? (mVersioning == Versioning.AUTO) : !property.isAutomatic();
} | java | private boolean isAlwaysInserted(JDBCStorableProperty<?> property) {
return property.isVersion() ? (mVersioning == Versioning.AUTO) : !property.isAutomatic();
} | [
"private",
"boolean",
"isAlwaysInserted",
"(",
"JDBCStorableProperty",
"<",
"?",
">",
"property",
")",
"{",
"return",
"property",
".",
"isVersion",
"(",
")",
"?",
"(",
"mVersioning",
"==",
"Versioning",
".",
"AUTO",
")",
":",
"!",
"property",
".",
"isAutomat... | Returns true if property value is always part of insert statement. | [
"Returns",
"true",
"if",
"property",
"value",
"is",
"always",
"part",
"of",
"insert",
"statement",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1298-L1300 |
7,908 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.findLobs | private Map<JDBCStorableProperty<S>, Integer> findLobs() {
Map<JDBCStorableProperty<S>, Integer> lobIndexMap =
new IdentityHashMap<JDBCStorableProperty<S>, Integer>();
int lobIndex = 0;
for (JDBCStorableProperty<S> property : mAllProperties.values()) {
if (isLobT... | java | private Map<JDBCStorableProperty<S>, Integer> findLobs() {
Map<JDBCStorableProperty<S>, Integer> lobIndexMap =
new IdentityHashMap<JDBCStorableProperty<S>, Integer>();
int lobIndex = 0;
for (JDBCStorableProperty<S> property : mAllProperties.values()) {
if (isLobT... | [
"private",
"Map",
"<",
"JDBCStorableProperty",
"<",
"S",
">",
",",
"Integer",
">",
"findLobs",
"(",
")",
"{",
"Map",
"<",
"JDBCStorableProperty",
"<",
"S",
">",
",",
"Integer",
">",
"lobIndexMap",
"=",
"new",
"IdentityHashMap",
"<",
"JDBCStorableProperty",
"... | Finds all Lob properties and maps them to a zero-based index. This
information is used to update large Lobs after an insert or update. | [
"Finds",
"all",
"Lob",
"properties",
"and",
"maps",
"them",
"to",
"a",
"zero",
"-",
"based",
"index",
".",
"This",
"information",
"is",
"used",
"to",
"update",
"large",
"Lobs",
"after",
"an",
"insert",
"or",
"update",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1306-L1319 |
7,909 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.getJDBCSupport | private LocalVariable getJDBCSupport(CodeBuilder b) {
pushJDBCSupport(b);
LocalVariable supportVar =
b.createLocalVariable("support", TypeDesc.forClass(JDBCSupport.class));
b.storeLocal(supportVar);
return supportVar;
} | java | private LocalVariable getJDBCSupport(CodeBuilder b) {
pushJDBCSupport(b);
LocalVariable supportVar =
b.createLocalVariable("support", TypeDesc.forClass(JDBCSupport.class));
b.storeLocal(supportVar);
return supportVar;
} | [
"private",
"LocalVariable",
"getJDBCSupport",
"(",
"CodeBuilder",
"b",
")",
"{",
"pushJDBCSupport",
"(",
"b",
")",
";",
"LocalVariable",
"supportVar",
"=",
"b",
".",
"createLocalVariable",
"(",
"\"support\"",
",",
"TypeDesc",
".",
"forClass",
"(",
"JDBCSupport",
... | Generates code to get the JDBCSupport instance and store it in a local
variable. | [
"Generates",
"code",
"to",
"get",
"the",
"JDBCSupport",
"instance",
"and",
"store",
"it",
"in",
"a",
"local",
"variable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1340-L1346 |
7,910 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.pushJDBCSupport | private void pushJDBCSupport(CodeBuilder b) {
b.loadThis();
b.loadField(StorableGenerator.SUPPORT_FIELD_NAME, TypeDesc.forClass(TriggerSupport.class));
b.checkCast(TypeDesc.forClass(JDBCSupport.class));
} | java | private void pushJDBCSupport(CodeBuilder b) {
b.loadThis();
b.loadField(StorableGenerator.SUPPORT_FIELD_NAME, TypeDesc.forClass(TriggerSupport.class));
b.checkCast(TypeDesc.forClass(JDBCSupport.class));
} | [
"private",
"void",
"pushJDBCSupport",
"(",
"CodeBuilder",
"b",
")",
"{",
"b",
".",
"loadThis",
"(",
")",
";",
"b",
".",
"loadField",
"(",
"StorableGenerator",
".",
"SUPPORT_FIELD_NAME",
",",
"TypeDesc",
".",
"forClass",
"(",
"TriggerSupport",
".",
"class",
"... | Generates code to push the JDBCSupport instance on the stack. | [
"Generates",
"code",
"to",
"push",
"the",
"JDBCSupport",
"instance",
"on",
"the",
"stack",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1351-L1355 |
7,911 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.getConnection | private LocalVariable getConnection(CodeBuilder b, LocalVariable capVar) {
b.loadLocal(capVar);
b.invokeInterface(TypeDesc.forClass(JDBCConnectionCapability.class),
"getConnection", TypeDesc.forClass(Connection.class), null);
LocalVariable conVar = b.createLocalVari... | java | private LocalVariable getConnection(CodeBuilder b, LocalVariable capVar) {
b.loadLocal(capVar);
b.invokeInterface(TypeDesc.forClass(JDBCConnectionCapability.class),
"getConnection", TypeDesc.forClass(Connection.class), null);
LocalVariable conVar = b.createLocalVari... | [
"private",
"LocalVariable",
"getConnection",
"(",
"CodeBuilder",
"b",
",",
"LocalVariable",
"capVar",
")",
"{",
"b",
".",
"loadLocal",
"(",
"capVar",
")",
";",
"b",
".",
"invokeInterface",
"(",
"TypeDesc",
".",
"forClass",
"(",
"JDBCConnectionCapability",
".",
... | Generates code to get connection from JDBCConnectionCapability and store
it in a local variable.
@param capVar reference to JDBCConnectionCapability | [
"Generates",
"code",
"to",
"get",
"connection",
"from",
"JDBCConnectionCapability",
"and",
"store",
"it",
"in",
"a",
"local",
"variable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1363-L1370 |
7,912 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.branchIfDirty | private void branchIfDirty(CodeBuilder b, int propNumber,
Label target, boolean branchIfDirty)
{
String stateFieldName = StorableGenerator.PROPERTY_STATE_FIELD_NAME + (propNumber >> 4);
b.loadThis();
b.loadField(stateFieldName, TypeDesc.INT);
in... | java | private void branchIfDirty(CodeBuilder b, int propNumber,
Label target, boolean branchIfDirty)
{
String stateFieldName = StorableGenerator.PROPERTY_STATE_FIELD_NAME + (propNumber >> 4);
b.loadThis();
b.loadField(stateFieldName, TypeDesc.INT);
in... | [
"private",
"void",
"branchIfDirty",
"(",
"CodeBuilder",
"b",
",",
"int",
"propNumber",
",",
"Label",
"target",
",",
"boolean",
"branchIfDirty",
")",
"{",
"String",
"stateFieldName",
"=",
"StorableGenerator",
".",
"PROPERTY_STATE_FIELD_NAME",
"+",
"(",
"propNumber",
... | Generates code to branch if a property is dirty.
@param propNumber property number from all properties map
@param target branch target
@param when true, branch if dirty; when false, branch when not dirty | [
"Generates",
"code",
"to",
"branch",
"if",
"a",
"property",
"is",
"dirty",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1940-L1953 |
7,913 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java | QueryExecutorCache.executor | public QueryExecutor<S> executor(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws RepositoryException
{
final Key<S> key = new Key<S>(filter, ordering, hints);
synchronized (mPrimaryCache) {
QueryExecutor<S> executor = mPrimaryCache.get(key);
... | java | public QueryExecutor<S> executor(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws RepositoryException
{
final Key<S> key = new Key<S>(filter, ordering, hints);
synchronized (mPrimaryCache) {
QueryExecutor<S> executor = mPrimaryCache.get(key);
... | [
"public",
"QueryExecutor",
"<",
"S",
">",
"executor",
"(",
"Filter",
"<",
"S",
">",
"filter",
",",
"OrderingList",
"<",
"S",
">",
"ordering",
",",
"QueryHints",
"hints",
")",
"throws",
"RepositoryException",
"{",
"final",
"Key",
"<",
"S",
">",
"key",
"="... | Returns an executor from the cache.
@param filter optional filter
@param ordering optional order-by properties
@param hints optional query hints | [
"Returns",
"an",
"executor",
"from",
"the",
"cache",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/QueryExecutorCache.java#L92-L140 |
7,914 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java | IndexedRepository.getIndexInfo | public <S extends Storable> IndexInfo[] getIndexInfo(Class<S> storableType)
throws RepositoryException
{
if (Unindexed.class.isAssignableFrom(storableType)) {
return new IndexInfo[0];
}
Storage<S> masterStorage = mRepository.storageFor(storableType);
Inde... | java | public <S extends Storable> IndexInfo[] getIndexInfo(Class<S> storableType)
throws RepositoryException
{
if (Unindexed.class.isAssignableFrom(storableType)) {
return new IndexInfo[0];
}
Storage<S> masterStorage = mRepository.storageFor(storableType);
Inde... | [
"public",
"<",
"S",
"extends",
"Storable",
">",
"IndexInfo",
"[",
"]",
"getIndexInfo",
"(",
"Class",
"<",
"S",
">",
"storableType",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"Unindexed",
".",
"class",
".",
"isAssignableFrom",
"(",
"storableType",
... | Required by IndexInfoCapability. | [
"Required",
"by",
"IndexInfoCapability",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java#L161-L173 |
7,915 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java | IndexedRepository.getIndexEntryAccessors | public <S extends Storable> IndexEntryAccessor<S>[]
getIndexEntryAccessors(Class<S> storableType)
throws RepositoryException
{
if (Unindexed.class.isAssignableFrom(storableType)) {
return new IndexEntryAccessor[0];
}
Storage<S> masterStorage = mRepository... | java | public <S extends Storable> IndexEntryAccessor<S>[]
getIndexEntryAccessors(Class<S> storableType)
throws RepositoryException
{
if (Unindexed.class.isAssignableFrom(storableType)) {
return new IndexEntryAccessor[0];
}
Storage<S> masterStorage = mRepository... | [
"public",
"<",
"S",
"extends",
"Storable",
">",
"IndexEntryAccessor",
"<",
"S",
">",
"[",
"]",
"getIndexEntryAccessors",
"(",
"Class",
"<",
"S",
">",
"storableType",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"Unindexed",
".",
"class",
".",
"isAss... | Required by IndexEntryAccessCapability. | [
"Required",
"by",
"IndexEntryAccessCapability",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/indexed/IndexedRepository.java#L176-L195 |
7,916 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/MalformedTypeException.java | MalformedTypeException.getMessage | @Override
public String getMessage() {
String message = super.getMessage();
if (mType != null) {
message = mType.getName() + ": " + message;
}
return message;
} | java | @Override
public String getMessage() {
String message = super.getMessage();
if (mType != null) {
message = mType.getName() + ": " + message;
}
return message;
} | [
"@",
"Override",
"public",
"String",
"getMessage",
"(",
")",
"{",
"String",
"message",
"=",
"super",
".",
"getMessage",
"(",
")",
";",
"if",
"(",
"mType",
"!=",
"null",
")",
"{",
"message",
"=",
"mType",
".",
"getName",
"(",
")",
"+",
"\": \"",
"+",
... | Returns first message, prefixed with the malformed type. | [
"Returns",
"first",
"message",
"prefixed",
"with",
"the",
"malformed",
"type",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/MalformedTypeException.java#L53-L60 |
7,917 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | UnionQueryAnalyzer.executor | public QueryExecutor<S> executor(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws RepositoryException
{
return analyze(filter, ordering, hints).createExecutor();
} | java | public QueryExecutor<S> executor(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws RepositoryException
{
return analyze(filter, ordering, hints).createExecutor();
} | [
"public",
"QueryExecutor",
"<",
"S",
">",
"executor",
"(",
"Filter",
"<",
"S",
">",
"filter",
",",
"OrderingList",
"<",
"S",
">",
"ordering",
",",
"QueryHints",
"hints",
")",
"throws",
"RepositoryException",
"{",
"return",
"analyze",
"(",
"filter",
",",
"o... | Returns an executor that handles the given query specification.
@param filter optional filter which must be {@link Filter#isBound bound}
@param ordering optional properties which define desired ordering
@param hints optional query hints | [
"Returns",
"an",
"executor",
"that",
"handles",
"the",
"given",
"query",
"specification",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java#L106-L110 |
7,918 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | UnionQueryAnalyzer.getKeys | private List<Set<ChainedProperty<S>>> getKeys()
throws SupportException, RepositoryException
{
StorableInfo<S> info = StorableIntrospector.examine(mIndexAnalyzer.getStorableType());
List<Set<ChainedProperty<S>>> keys = new ArrayList<Set<ChainedProperty<S>>>();
keys.add(stripOr... | java | private List<Set<ChainedProperty<S>>> getKeys()
throws SupportException, RepositoryException
{
StorableInfo<S> info = StorableIntrospector.examine(mIndexAnalyzer.getStorableType());
List<Set<ChainedProperty<S>>> keys = new ArrayList<Set<ChainedProperty<S>>>();
keys.add(stripOr... | [
"private",
"List",
"<",
"Set",
"<",
"ChainedProperty",
"<",
"S",
">",
">",
">",
"getKeys",
"(",
")",
"throws",
"SupportException",
",",
"RepositoryException",
"{",
"StorableInfo",
"<",
"S",
">",
"info",
"=",
"StorableIntrospector",
".",
"examine",
"(",
"mInd... | Returns a list of all primary and alternate keys, stripped of ordering. | [
"Returns",
"a",
"list",
"of",
"all",
"primary",
"and",
"alternate",
"keys",
"stripped",
"of",
"ordering",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java#L259-L292 |
7,919 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | UnionQueryAnalyzer.pruneKeys | private boolean pruneKeys(List<Set<ChainedProperty<S>>> keys, ChainedProperty<S> property) {
boolean result = false;
for (Set<ChainedProperty<S>> key : keys) {
key.remove(property);
if (key.size() == 0) {
result = true;
continue;
... | java | private boolean pruneKeys(List<Set<ChainedProperty<S>>> keys, ChainedProperty<S> property) {
boolean result = false;
for (Set<ChainedProperty<S>> key : keys) {
key.remove(property);
if (key.size() == 0) {
result = true;
continue;
... | [
"private",
"boolean",
"pruneKeys",
"(",
"List",
"<",
"Set",
"<",
"ChainedProperty",
"<",
"S",
">",
">",
">",
"keys",
",",
"ChainedProperty",
"<",
"S",
">",
"property",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"Set",
"<",
"ChainedPr... | Removes the given property from all keys, returning true if any key has
zero properties as a result. | [
"Removes",
"the",
"given",
"property",
"from",
"all",
"keys",
"returning",
"true",
"if",
"any",
"key",
"has",
"zero",
"properties",
"as",
"a",
"result",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java#L306-L318 |
7,920 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | UnionQueryAnalyzer.splitIntoSubResults | private List<IndexedQueryAnalyzer<S>.Result>
splitIntoSubResults(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws SupportException, RepositoryException
{
// Required for split to work.
Filter<S> dnfFilter = filter.disjunctiveNormalForm();
Splitter ... | java | private List<IndexedQueryAnalyzer<S>.Result>
splitIntoSubResults(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
throws SupportException, RepositoryException
{
// Required for split to work.
Filter<S> dnfFilter = filter.disjunctiveNormalForm();
Splitter ... | [
"private",
"List",
"<",
"IndexedQueryAnalyzer",
"<",
"S",
">",
".",
"Result",
">",
"splitIntoSubResults",
"(",
"Filter",
"<",
"S",
">",
"filter",
",",
"OrderingList",
"<",
"S",
">",
"ordering",
",",
"QueryHints",
"hints",
")",
"throws",
"SupportException",
"... | Splits the filter into sub-results and possibly merges them. | [
"Splits",
"the",
"filter",
"into",
"sub",
"-",
"results",
"and",
"possibly",
"merges",
"them",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java#L347-L435 |
7,921 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/LayoutFactory.java | LayoutFactory.layoutFor | public Layout layoutFor(Class<? extends Storable> type, int generation)
throws FetchException, FetchNoneException
{
StoredLayout storedLayout =
mLayoutStorage.query("storableTypeName = ? & generation = ?")
.with(type.getName()).with(generation)
.loadOne();
... | java | public Layout layoutFor(Class<? extends Storable> type, int generation)
throws FetchException, FetchNoneException
{
StoredLayout storedLayout =
mLayoutStorage.query("storableTypeName = ? & generation = ?")
.with(type.getName()).with(generation)
.loadOne();
... | [
"public",
"Layout",
"layoutFor",
"(",
"Class",
"<",
"?",
"extends",
"Storable",
">",
"type",
",",
"int",
"generation",
")",
"throws",
"FetchException",
",",
"FetchNoneException",
"{",
"StoredLayout",
"storedLayout",
"=",
"mLayoutStorage",
".",
"query",
"(",
"\"s... | Returns the layout for a particular generation of the given type.
@param generation desired generation
@throws FetchNoneException if generation not found | [
"Returns",
"the",
"layout",
"for",
"a",
"particular",
"generation",
"of",
"the",
"given",
"type",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/LayoutFactory.java#L347-L355 |
7,922 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/LayoutFactory.java | LayoutFactory.annHashCode | private static int annHashCode(Annotation ann) {
int hash = 0;
Method[] methods = ann.getClass().getDeclaredMethods();
for (Method m : methods) {
if (m.getReturnType() == null || m.getReturnType() == void.class) {
continue;
}
if (m.get... | java | private static int annHashCode(Annotation ann) {
int hash = 0;
Method[] methods = ann.getClass().getDeclaredMethods();
for (Method m : methods) {
if (m.getReturnType() == null || m.getReturnType() == void.class) {
continue;
}
if (m.get... | [
"private",
"static",
"int",
"annHashCode",
"(",
"Annotation",
"ann",
")",
"{",
"int",
"hash",
"=",
"0",
";",
"Method",
"[",
"]",
"methods",
"=",
"ann",
".",
"getClass",
"(",
")",
".",
"getDeclaredMethods",
"(",
")",
";",
"for",
"(",
"Method",
"m",
":... | Returns an annotation hash code using a algorithm similar to the
default. The difference is in the handling of class and enum values. The
name is chosen for the hash code component instead of the instance
because it is stable between invocations of the JVM. | [
"Returns",
"an",
"annotation",
"hash",
"code",
"using",
"a",
"algorithm",
"similar",
"to",
"the",
"default",
".",
"The",
"difference",
"is",
"in",
"the",
"handling",
"of",
"class",
"and",
"enum",
"values",
".",
"The",
"name",
"is",
"chosen",
"for",
"the",
... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/LayoutFactory.java#L554-L587 |
7,923 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/MismatchException.java | MismatchException.getMessages | public List<String> getMessages() {
if (mMessages == null || mMessages.size() == 0) {
mMessages = Collections.singletonList(super.getMessage());
}
return mMessages;
} | java | public List<String> getMessages() {
if (mMessages == null || mMessages.size() == 0) {
mMessages = Collections.singletonList(super.getMessage());
}
return mMessages;
} | [
"public",
"List",
"<",
"String",
">",
"getMessages",
"(",
")",
"{",
"if",
"(",
"mMessages",
"==",
"null",
"||",
"mMessages",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"mMessages",
"=",
"Collections",
".",
"singletonList",
"(",
"super",
".",
"getMessa... | Multiple error messages may be embedded in a MismatchException.
@return non-null, unmodifiable list of messages | [
"Multiple",
"error",
"messages",
"may",
"be",
"embedded",
"in",
"a",
"MismatchException",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/MismatchException.java#L96-L101 |
7,924 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/replicated/ClobReplicationTrigger.java | ClobReplicationTrigger.create | static <S extends Storable> ClobReplicationTrigger<S> create(Storage<S> masterStorage) {
Map<String, ? extends StorableProperty<S>> properties =
StorableIntrospector.examine(masterStorage.getStorableType()).getDataProperties();
List<String> clobNames = new ArrayList<String>(2);
... | java | static <S extends Storable> ClobReplicationTrigger<S> create(Storage<S> masterStorage) {
Map<String, ? extends StorableProperty<S>> properties =
StorableIntrospector.examine(masterStorage.getStorableType()).getDataProperties();
List<String> clobNames = new ArrayList<String>(2);
... | [
"static",
"<",
"S",
"extends",
"Storable",
">",
"ClobReplicationTrigger",
"<",
"S",
">",
"create",
"(",
"Storage",
"<",
"S",
">",
"masterStorage",
")",
"{",
"Map",
"<",
"String",
",",
"?",
"extends",
"StorableProperty",
"<",
"S",
">",
">",
"properties",
... | Returns null if no Clobs need to be replicated. | [
"Returns",
"null",
"if",
"no",
"Clobs",
"need",
"to",
"be",
"replicated",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/replicated/ClobReplicationTrigger.java#L52-L70 |
7,925 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java | SyntheticStorableBuilder.definePropertyBeanMethods | protected boolean definePropertyBeanMethods(ClassFile cf,
SyntheticProperty property)
{
TypeDesc propertyType = TypeDesc.forClass(property.getType());
// Add property get method.
final MethodInfo mi = cf.addMethod(Modifiers.PUBLIC_ABSTRACT... | java | protected boolean definePropertyBeanMethods(ClassFile cf,
SyntheticProperty property)
{
TypeDesc propertyType = TypeDesc.forClass(property.getType());
// Add property get method.
final MethodInfo mi = cf.addMethod(Modifiers.PUBLIC_ABSTRACT... | [
"protected",
"boolean",
"definePropertyBeanMethods",
"(",
"ClassFile",
"cf",
",",
"SyntheticProperty",
"property",
")",
"{",
"TypeDesc",
"propertyType",
"=",
"TypeDesc",
".",
"forClass",
"(",
"property",
".",
"getType",
"(",
")",
")",
";",
"// Add property get metho... | Add the get & set methods for this property
@return true if version property was added | [
"Add",
"the",
"get",
"&",
"set",
"methods",
"for",
"this",
"property"
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java#L450-L504 |
7,926 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.assertParameterNotNull | public static void assertParameterNotNull(CodeBuilder b, int paramIndex) {
b.loadLocal(b.getParameter(paramIndex));
Label notNull = b.createLabel();
b.ifNullBranch(notNull, false);
throwException(b, IllegalArgumentException.class, null);
notNull.setLocation();
} | java | public static void assertParameterNotNull(CodeBuilder b, int paramIndex) {
b.loadLocal(b.getParameter(paramIndex));
Label notNull = b.createLabel();
b.ifNullBranch(notNull, false);
throwException(b, IllegalArgumentException.class, null);
notNull.setLocation();
} | [
"public",
"static",
"void",
"assertParameterNotNull",
"(",
"CodeBuilder",
"b",
",",
"int",
"paramIndex",
")",
"{",
"b",
".",
"loadLocal",
"(",
"b",
".",
"getParameter",
"(",
"paramIndex",
")",
")",
";",
"Label",
"notNull",
"=",
"b",
".",
"createLabel",
"("... | Generate code to throw an exception if a parameter is null
@param b CodeBuilder into which to append the code
@param paramIndex index of the parameter to check | [
"Generate",
"code",
"to",
"throw",
"an",
"exception",
"if",
"a",
"parameter",
"is",
"null"
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L55-L61 |
7,927 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.uneraseGenericParameter | public static LocalVariable uneraseGenericParameter(
CodeBuilder b, TypeDesc paramType, final int paramIndex)
{
b.loadLocal(b.getParameter(paramIndex));
b.checkCast(paramType);
LocalVariable result = b.createLocalVariable(null, paramType);
b.storeLocal(result);
... | java | public static LocalVariable uneraseGenericParameter(
CodeBuilder b, TypeDesc paramType, final int paramIndex)
{
b.loadLocal(b.getParameter(paramIndex));
b.checkCast(paramType);
LocalVariable result = b.createLocalVariable(null, paramType);
b.storeLocal(result);
... | [
"public",
"static",
"LocalVariable",
"uneraseGenericParameter",
"(",
"CodeBuilder",
"b",
",",
"TypeDesc",
"paramType",
",",
"final",
"int",
"paramIndex",
")",
"{",
"b",
".",
"loadLocal",
"(",
"b",
".",
"getParameter",
"(",
"paramIndex",
")",
")",
";",
"b",
"... | Generate code to create a local variable containing the specified parameter coerced
to the specified type. This is useful for re-interpreting erased generics into
the more specific genericized type.
@param b CodeBuilder into which to append the code
@param paramType the more specific type which was erased during comp... | [
"Generate",
"code",
"to",
"create",
"a",
"local",
"variable",
"containing",
"the",
"specified",
"parameter",
"coerced",
"to",
"the",
"specified",
"type",
".",
"This",
"is",
"useful",
"for",
"re",
"-",
"interpreting",
"erased",
"generics",
"into",
"the",
"more"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L73-L81 |
7,928 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.throwException | public static void throwException(CodeBuilder b, Class type, String message) {
TypeDesc desc = TypeDesc.forClass(type);
b.newObject(desc);
b.dup();
if (message == null) {
b.invokeConstructor(desc, null);
} else {
b.loadConstant(message);
... | java | public static void throwException(CodeBuilder b, Class type, String message) {
TypeDesc desc = TypeDesc.forClass(type);
b.newObject(desc);
b.dup();
if (message == null) {
b.invokeConstructor(desc, null);
} else {
b.loadConstant(message);
... | [
"public",
"static",
"void",
"throwException",
"(",
"CodeBuilder",
"b",
",",
"Class",
"type",
",",
"String",
"message",
")",
"{",
"TypeDesc",
"desc",
"=",
"TypeDesc",
".",
"forClass",
"(",
"type",
")",
";",
"b",
".",
"newObject",
"(",
"desc",
")",
";",
... | Generate code to throw an exception with an optional message.
@param b {@link CodeBuilder} to which to add code
@param type type of the object to throw
@param message optional message to provide to the constructor | [
"Generate",
"code",
"to",
"throw",
"an",
"exception",
"with",
"an",
"optional",
"message",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L89-L100 |
7,929 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.throwConcatException | public static void throwConcatException(CodeBuilder b, Class type, String... messages) {
if (messages == null || messages.length == 0) {
throwException(b, type, null);
return;
}
if (messages.length == 1) {
throwException(b, type, messages[0]);
... | java | public static void throwConcatException(CodeBuilder b, Class type, String... messages) {
if (messages == null || messages.length == 0) {
throwException(b, type, null);
return;
}
if (messages.length == 1) {
throwException(b, type, messages[0]);
... | [
"public",
"static",
"void",
"throwConcatException",
"(",
"CodeBuilder",
"b",
",",
"Class",
"type",
",",
"String",
"...",
"messages",
")",
"{",
"if",
"(",
"messages",
"==",
"null",
"||",
"messages",
".",
"length",
"==",
"0",
")",
"{",
"throwException",
"(",... | Generate code to throw an exception with a message concatenated at runtime.
@param b {@link CodeBuilder} to which to add code
@param type type of the object to throw
@param messages messages to concat at runtime | [
"Generate",
"code",
"to",
"throw",
"an",
"exception",
"with",
"a",
"message",
"concatenated",
"at",
"runtime",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L109-L134 |
7,930 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.definePrepareBridge | private static void definePrepareBridge(ClassFile cf, Class leaf, Class returnClass) {
TypeDesc returnType = TypeDesc.forClass(returnClass);
if (isPublicMethodFinal(leaf, PREPARE_METHOD_NAME, returnType, null)) {
// Cannot override.
return;
}
MethodInfo ... | java | private static void definePrepareBridge(ClassFile cf, Class leaf, Class returnClass) {
TypeDesc returnType = TypeDesc.forClass(returnClass);
if (isPublicMethodFinal(leaf, PREPARE_METHOD_NAME, returnType, null)) {
// Cannot override.
return;
}
MethodInfo ... | [
"private",
"static",
"void",
"definePrepareBridge",
"(",
"ClassFile",
"cf",
",",
"Class",
"leaf",
",",
"Class",
"returnClass",
")",
"{",
"TypeDesc",
"returnType",
"=",
"TypeDesc",
".",
"forClass",
"(",
"returnClass",
")",
";",
"if",
"(",
"isPublicMethodFinal",
... | Add a prepare bridge method to the classfile for the given type.
@param cf file to which to add the prepare bridge
@param leaf leaf class
@param returnClass type returned from generated bridge method
@since 1.2 | [
"Add",
"a",
"prepare",
"bridge",
"method",
"to",
"the",
"classfile",
"for",
"the",
"given",
"type",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L278-L292 |
7,931 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.isPublicMethodFinal | public static boolean isPublicMethodFinal(Class clazz, String name,
TypeDesc retType, TypeDesc[] params)
{
if (!clazz.isInterface()) {
Class[] paramClasses;
if (params == null || params.length == 0) {
paramClasses = ... | java | public static boolean isPublicMethodFinal(Class clazz, String name,
TypeDesc retType, TypeDesc[] params)
{
if (!clazz.isInterface()) {
Class[] paramClasses;
if (params == null || params.length == 0) {
paramClasses = ... | [
"public",
"static",
"boolean",
"isPublicMethodFinal",
"(",
"Class",
"clazz",
",",
"String",
"name",
",",
"TypeDesc",
"retType",
",",
"TypeDesc",
"[",
"]",
"params",
")",
"{",
"if",
"(",
"!",
"clazz",
".",
"isInterface",
"(",
")",
")",
"{",
"Class",
"[",
... | Returns true if a public final method exists which matches the given
specification. | [
"Returns",
"true",
"if",
"a",
"public",
"final",
"method",
"exists",
"which",
"matches",
"the",
"given",
"specification",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L298-L327 |
7,932 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.addValueHashCodeCall | public static void addValueHashCodeCall(CodeBuilder b,
TypeDesc valueType,
boolean testForNull,
boolean mixIn)
{
LocalVariable value = null;
if (mixIn) {
... | java | public static void addValueHashCodeCall(CodeBuilder b,
TypeDesc valueType,
boolean testForNull,
boolean mixIn)
{
LocalVariable value = null;
if (mixIn) {
... | [
"public",
"static",
"void",
"addValueHashCodeCall",
"(",
"CodeBuilder",
"b",
",",
"TypeDesc",
"valueType",
",",
"boolean",
"testForNull",
",",
"boolean",
"mixIn",
")",
"{",
"LocalVariable",
"value",
"=",
"null",
";",
"if",
"(",
"mixIn",
")",
"{",
"value",
"=... | Generates code to compute a hashcode for a value on the stack, consuming
the value. After the code executes, the stack contains an int hashcode.
@param b {@link CodeBuilder} to which to add the code
@param valueType the type of the value
@param testForNull if true and the value is a reference and might be null
@param ... | [
"Generates",
"code",
"to",
"compute",
"a",
"hashcode",
"for",
"a",
"value",
"on",
"the",
"stack",
"consuming",
"the",
"value",
".",
"After",
"the",
"code",
"executes",
"the",
"stack",
"contains",
"an",
"int",
"hashcode",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L377-L461 |
7,933 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.addEqualsCall | public static void addEqualsCall(CodeBuilder b,
String fieldName,
TypeDesc fieldType,
boolean testForNull,
Label fail,
LocalVariab... | java | public static void addEqualsCall(CodeBuilder b,
String fieldName,
TypeDesc fieldType,
boolean testForNull,
Label fail,
LocalVariab... | [
"public",
"static",
"void",
"addEqualsCall",
"(",
"CodeBuilder",
"b",
",",
"String",
"fieldName",
",",
"TypeDesc",
"fieldType",
",",
"boolean",
"testForNull",
",",
"Label",
"fail",
",",
"LocalVariable",
"other",
")",
"{",
"b",
".",
"loadThis",
"(",
")",
";",... | Generates code to compare a field in this object against the same one in a
different instance. Branch to the provided Label if they are not equal.
@param b {@link CodeBuilder} to which to add the code
@param fieldName the name of the field
@param fieldType the type of the field
@param testForNull if true and the value... | [
"Generates",
"code",
"to",
"compare",
"a",
"field",
"in",
"this",
"object",
"against",
"the",
"same",
"one",
"in",
"a",
"different",
"instance",
".",
"Branch",
"to",
"the",
"provided",
"Label",
"if",
"they",
"are",
"not",
"equal",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L489-L503 |
7,934 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.addValuesEqualCall | public static void addValuesEqualCall(final CodeBuilder b,
final TypeDesc valueType,
final boolean testForNull,
final Label label,
final boolean cho... | java | public static void addValuesEqualCall(final CodeBuilder b,
final TypeDesc valueType,
final boolean testForNull,
final Label label,
final boolean cho... | [
"public",
"static",
"void",
"addValuesEqualCall",
"(",
"final",
"CodeBuilder",
"b",
",",
"final",
"TypeDesc",
"valueType",
",",
"final",
"boolean",
"testForNull",
",",
"final",
"Label",
"label",
",",
"final",
"boolean",
"choice",
")",
"{",
"if",
"(",
"valueTyp... | Generates code to compare two values on the stack, and branch to the
provided Label if they are not equal. Both values must be of the same
type. If they are floating point values, NaN is considered equal to NaN,
which is inconsistent with the usual treatment for NaN.
<P>The generated instruction consumes both values ... | [
"Generates",
"code",
"to",
"compare",
"two",
"values",
"on",
"the",
"stack",
"and",
"branch",
"to",
"the",
"provided",
"Label",
"if",
"they",
"are",
"not",
"equal",
".",
"Both",
"values",
"must",
"be",
"of",
"the",
"same",
"type",
".",
"If",
"they",
"a... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L521-L584 |
7,935 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.initialVersion | public static void initialVersion(CodeBuilder b, TypeDesc type, int value)
throws SupportException
{
adjustVersion(b, type, value, false);
} | java | public static void initialVersion(CodeBuilder b, TypeDesc type, int value)
throws SupportException
{
adjustVersion(b, type, value, false);
} | [
"public",
"static",
"void",
"initialVersion",
"(",
"CodeBuilder",
"b",
",",
"TypeDesc",
"type",
",",
"int",
"value",
")",
"throws",
"SupportException",
"{",
"adjustVersion",
"(",
"b",
",",
"type",
",",
"value",
",",
"false",
")",
";",
"}"
] | Generates code to push an initial version property value on the stack.
@throws SupportException if version type is not supported | [
"Generates",
"code",
"to",
"push",
"an",
"initial",
"version",
"property",
"value",
"on",
"the",
"stack",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L685-L689 |
7,936 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.incrementVersion | public static void incrementVersion(CodeBuilder b, TypeDesc type)
throws SupportException
{
adjustVersion(b, type, 0, true);
} | java | public static void incrementVersion(CodeBuilder b, TypeDesc type)
throws SupportException
{
adjustVersion(b, type, 0, true);
} | [
"public",
"static",
"void",
"incrementVersion",
"(",
"CodeBuilder",
"b",
",",
"TypeDesc",
"type",
")",
"throws",
"SupportException",
"{",
"adjustVersion",
"(",
"b",
",",
"type",
",",
"0",
",",
"true",
")",
";",
"}"
] | Generates code to increment a version property value, already on the stack.
@throws SupportException if version type is not supported | [
"Generates",
"code",
"to",
"increment",
"a",
"version",
"property",
"value",
"already",
"on",
"the",
"stack",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L696-L700 |
7,937 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.blankValue | public static void blankValue(CodeBuilder b, TypeDesc type) {
switch (type.getTypeCode()) {
default:
b.loadNull();
break;
case TypeDesc.BYTE_CODE:
case TypeDesc.CHAR_CODE:
case TypeDesc.SHORT_CODE:
case TypeDesc.INT_CODE:
b.l... | java | public static void blankValue(CodeBuilder b, TypeDesc type) {
switch (type.getTypeCode()) {
default:
b.loadNull();
break;
case TypeDesc.BYTE_CODE:
case TypeDesc.CHAR_CODE:
case TypeDesc.SHORT_CODE:
case TypeDesc.INT_CODE:
b.l... | [
"public",
"static",
"void",
"blankValue",
"(",
"CodeBuilder",
"b",
",",
"TypeDesc",
"type",
")",
"{",
"switch",
"(",
"type",
".",
"getTypeCode",
"(",
")",
")",
"{",
"default",
":",
"b",
".",
"loadNull",
"(",
")",
";",
"break",
";",
"case",
"TypeDesc",
... | Generates code to push a blank value to the stack. For objects, it is
null, and for primitive types it is zero or false. | [
"Generates",
"code",
"to",
"push",
"a",
"blank",
"value",
"to",
"the",
"stack",
".",
"For",
"objects",
"it",
"is",
"null",
"and",
"for",
"primitive",
"types",
"it",
"is",
"zero",
"or",
"false",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L756-L786 |
7,938 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.bindQueryParam | public static TypeDesc bindQueryParam(Class clazz) {
// This method is a bit vestigial. Once upon a time the Query class did
// not support all primitive types.
if (clazz.isPrimitive()) {
TypeDesc type = TypeDesc.forClass(clazz);
switch (type.getTypeCode()) {
... | java | public static TypeDesc bindQueryParam(Class clazz) {
// This method is a bit vestigial. Once upon a time the Query class did
// not support all primitive types.
if (clazz.isPrimitive()) {
TypeDesc type = TypeDesc.forClass(clazz);
switch (type.getTypeCode()) {
... | [
"public",
"static",
"TypeDesc",
"bindQueryParam",
"(",
"Class",
"clazz",
")",
"{",
"// This method is a bit vestigial. Once upon a time the Query class did\r",
"// not support all primitive types.\r",
"if",
"(",
"clazz",
".",
"isPrimitive",
"(",
")",
")",
"{",
"TypeDesc",
"... | Determines which overloaded "with" method on Query should be bound to. | [
"Determines",
"which",
"overloaded",
"with",
"method",
"on",
"Query",
"should",
"be",
"bound",
"to",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L791-L809 |
7,939 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.callStringBuilderAppendString | public static void callStringBuilderAppendString(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "app... | java | public static void callStringBuilderAppendString(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "app... | [
"public",
"static",
"void",
"callStringBuilderAppendString",
"(",
"CodeBuilder",
"b",
")",
"{",
"// Because of JDK1.5 bug which exposes AbstractStringBuilder class,\r",
"// cannot use reflection to get method signature.\r",
"TypeDesc",
"stringBuilder",
"=",
"TypeDesc",
".",
"forClass... | Appends a String to a StringBuilder. A StringBuilder and String must be
on the stack, and a StringBuilder is left on the stack after the call. | [
"Appends",
"a",
"String",
"to",
"a",
"StringBuilder",
".",
"A",
"StringBuilder",
"and",
"String",
"must",
"be",
"on",
"the",
"stack",
"and",
"a",
"StringBuilder",
"is",
"left",
"on",
"the",
"stack",
"after",
"the",
"call",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L815-L820 |
7,940 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.callStringBuilderAppendChar | public static void callStringBuilderAppendChar(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "appen... | java | public static void callStringBuilderAppendChar(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "appen... | [
"public",
"static",
"void",
"callStringBuilderAppendChar",
"(",
"CodeBuilder",
"b",
")",
"{",
"// Because of JDK1.5 bug which exposes AbstractStringBuilder class,\r",
"// cannot use reflection to get method signature.\r",
"TypeDesc",
"stringBuilder",
"=",
"TypeDesc",
".",
"forClass",... | Appends a char to a StringBuilder. A StringBuilder and char must be on
the stack, and a StringBuilder is left on the stack after the call. | [
"Appends",
"a",
"char",
"to",
"a",
"StringBuilder",
".",
"A",
"StringBuilder",
"and",
"char",
"must",
"be",
"on",
"the",
"stack",
"and",
"a",
"StringBuilder",
"is",
"left",
"on",
"the",
"stack",
"after",
"the",
"call",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L826-L831 |
7,941 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.callStringBuilderLength | public static void callStringBuilderLength(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "length", ... | java | public static void callStringBuilderLength(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "length", ... | [
"public",
"static",
"void",
"callStringBuilderLength",
"(",
"CodeBuilder",
"b",
")",
"{",
"// Because of JDK1.5 bug which exposes AbstractStringBuilder class,\r",
"// cannot use reflection to get method signature.\r",
"TypeDesc",
"stringBuilder",
"=",
"TypeDesc",
".",
"forClass",
"... | Calls length on a StringBuilder on the stack, leaving an int on the stack. | [
"Calls",
"length",
"on",
"a",
"StringBuilder",
"on",
"the",
"stack",
"leaving",
"an",
"int",
"on",
"the",
"stack",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L836-L841 |
7,942 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java | CodeBuilderUtil.callStringBuilderToString | public static void callStringBuilderToString(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "toStrin... | java | public static void callStringBuilderToString(CodeBuilder b) {
// Because of JDK1.5 bug which exposes AbstractStringBuilder class,
// cannot use reflection to get method signature.
TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class);
b.invokeVirtual(stringBuilder, "toStrin... | [
"public",
"static",
"void",
"callStringBuilderToString",
"(",
"CodeBuilder",
"b",
")",
"{",
"// Because of JDK1.5 bug which exposes AbstractStringBuilder class,\r",
"// cannot use reflection to get method signature.\r",
"TypeDesc",
"stringBuilder",
"=",
"TypeDesc",
".",
"forClass",
... | Calls toString on a StringBuilder. A StringBuilder must be on the stack,
and a String is left on the stack after the call. | [
"Calls",
"toString",
"on",
"a",
"StringBuilder",
".",
"A",
"StringBuilder",
"must",
"be",
"on",
"the",
"stack",
"and",
"a",
"String",
"is",
"left",
"on",
"the",
"stack",
"after",
"the",
"call",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L858-L863 |
7,943 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/constraints/DisjunctiveConstraint.java | DisjunctiveConstraint.create | public static <Type> DisjunctiveConstraint<Type> create(
@NonNull final Constraint<Type>[] constraints) {
return new DisjunctiveConstraint<>(constraints);
} | java | public static <Type> DisjunctiveConstraint<Type> create(
@NonNull final Constraint<Type>[] constraints) {
return new DisjunctiveConstraint<>(constraints);
} | [
"public",
"static",
"<",
"Type",
">",
"DisjunctiveConstraint",
"<",
"Type",
">",
"create",
"(",
"@",
"NonNull",
"final",
"Constraint",
"<",
"Type",
">",
"[",
"]",
"constraints",
")",
"{",
"return",
"new",
"DisjunctiveConstraint",
"<>",
"(",
"constraints",
")... | Creates and returns a constraint, which allows to combine multiple constraints in a
disjunctive manner.
@param <Type>
The type of the values, which should be verified
@param constraints
The single constraints, the constraint should consist of, as an array of the type
{@link Constraint}. The constraints may neither be ... | [
"Creates",
"and",
"returns",
"a",
"constraint",
"which",
"allows",
"to",
"combine",
"multiple",
"constraints",
"in",
"a",
"disjunctive",
"manner",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/constraints/DisjunctiveConstraint.java#L60-L63 |
7,944 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/constraints/DisjunctiveConstraint.java | DisjunctiveConstraint.setConstraints | public final void setConstraints(@NonNull final Constraint<Type>[] constraints) {
Condition.INSTANCE.ensureNotNull(constraints, "The constraints may not be null");
Condition.INSTANCE.ensureAtLeast(constraints.length, 1, "The constraints may not be empty");
this.constraints = constraints;
} | java | public final void setConstraints(@NonNull final Constraint<Type>[] constraints) {
Condition.INSTANCE.ensureNotNull(constraints, "The constraints may not be null");
Condition.INSTANCE.ensureAtLeast(constraints.length, 1, "The constraints may not be empty");
this.constraints = constraints;
} | [
"public",
"final",
"void",
"setConstraints",
"(",
"@",
"NonNull",
"final",
"Constraint",
"<",
"Type",
">",
"[",
"]",
"constraints",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"constraints",
",",
"\"The constraints may not be null\"",
")",
... | Sets the single constraints, the constraint should consist of.
@param constraints
The single constraints, which should be set, as an array of the type {@link
Constraint}. The constraints may neither be null, nor empty | [
"Sets",
"the",
"single",
"constraints",
"the",
"constraint",
"should",
"consist",
"of",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/constraints/DisjunctiveConstraint.java#L82-L86 |
7,945 | cose-wg/COSE-JAVA | src/main/java/COSE/OneKey.java | OneKey.HasAlgorithmID | public boolean HasAlgorithmID(AlgorithmID algorithmId) {
CBORObject thisObj = get(KeyKeys.Algorithm);
CBORObject thatObj = (algorithmId == null ? null : algorithmId.AsCBOR());
boolean result;
if (thatObj == null) {
result = (thisObj == null);
} else {
res... | java | public boolean HasAlgorithmID(AlgorithmID algorithmId) {
CBORObject thisObj = get(KeyKeys.Algorithm);
CBORObject thatObj = (algorithmId == null ? null : algorithmId.AsCBOR());
boolean result;
if (thatObj == null) {
result = (thisObj == null);
} else {
res... | [
"public",
"boolean",
"HasAlgorithmID",
"(",
"AlgorithmID",
"algorithmId",
")",
"{",
"CBORObject",
"thisObj",
"=",
"get",
"(",
"KeyKeys",
".",
"Algorithm",
")",
";",
"CBORObject",
"thatObj",
"=",
"(",
"algorithmId",
"==",
"null",
"?",
"null",
":",
"algorithmId"... | Compares the key's assigned algorithm with the provided value, indicating if the values are the
same.
@param algorithmId
the algorithm to compare or {@code null} to check for no assignment.
@return {@code true} if the current key has the provided algorithm assigned, or {@code false}
otherwise | [
"Compares",
"the",
"key",
"s",
"assigned",
"algorithm",
"with",
"the",
"provided",
"value",
"indicating",
"if",
"the",
"values",
"are",
"the",
"same",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/OneKey.java#L155-L166 |
7,946 | cose-wg/COSE-JAVA | src/main/java/COSE/OneKey.java | OneKey.HasKeyID | public boolean HasKeyID(String id) {
CBORObject thatObj = (id == null) ? null : CBORObject.FromObject(id);
CBORObject thisObj = get(KeyKeys.KeyId);
boolean result;
if (thatObj == null) {
result = (thisObj == null);
} else {
result = thatObj.equals(thisObj)... | java | public boolean HasKeyID(String id) {
CBORObject thatObj = (id == null) ? null : CBORObject.FromObject(id);
CBORObject thisObj = get(KeyKeys.KeyId);
boolean result;
if (thatObj == null) {
result = (thisObj == null);
} else {
result = thatObj.equals(thisObj)... | [
"public",
"boolean",
"HasKeyID",
"(",
"String",
"id",
")",
"{",
"CBORObject",
"thatObj",
"=",
"(",
"id",
"==",
"null",
")",
"?",
"null",
":",
"CBORObject",
".",
"FromObject",
"(",
"id",
")",
";",
"CBORObject",
"thisObj",
"=",
"get",
"(",
"KeyKeys",
"."... | Compares the key's assigned identifier with the provided value, indicating if the values are
the same.
@param id
the identifier to compare or {@code null} to check for no assignment.
@return {@code true} if the current key has the provided identifier assigned, or {@code false}
otherwise | [
"Compares",
"the",
"key",
"s",
"assigned",
"identifier",
"with",
"the",
"provided",
"value",
"indicating",
"if",
"the",
"values",
"are",
"the",
"same",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/OneKey.java#L177-L187 |
7,947 | cose-wg/COSE-JAVA | src/main/java/COSE/OneKey.java | OneKey.HasKeyType | public boolean HasKeyType(CBORObject keyTypeObj) {
CBORObject thatObj = keyTypeObj;
CBORObject thisObj = get(KeyKeys.KeyType);
boolean result;
if (thatObj == null) {
result = (thisObj == null);
} else {
result = thatObj.equals(thisObj);
}
r... | java | public boolean HasKeyType(CBORObject keyTypeObj) {
CBORObject thatObj = keyTypeObj;
CBORObject thisObj = get(KeyKeys.KeyType);
boolean result;
if (thatObj == null) {
result = (thisObj == null);
} else {
result = thatObj.equals(thisObj);
}
r... | [
"public",
"boolean",
"HasKeyType",
"(",
"CBORObject",
"keyTypeObj",
")",
"{",
"CBORObject",
"thatObj",
"=",
"keyTypeObj",
";",
"CBORObject",
"thisObj",
"=",
"get",
"(",
"KeyKeys",
".",
"KeyType",
")",
";",
"boolean",
"result",
";",
"if",
"(",
"thatObj",
"=="... | Compares the key's assigned key type with the provided value, indicating if the values are the
same.
@param keyTypeObj
the key type to compare or {@code null} to check for no assignment.
@return {@code true} if the current key has the provided identifier assigned, or {@code false}
otherwise | [
"Compares",
"the",
"key",
"s",
"assigned",
"key",
"type",
"with",
"the",
"provided",
"value",
"indicating",
"if",
"the",
"values",
"are",
"the",
"same",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/OneKey.java#L198-L208 |
7,948 | cose-wg/COSE-JAVA | src/main/java/COSE/OneKey.java | OneKey.HasKeyOp | public boolean HasKeyOp(Integer that) {
CBORObject thisObj = get(KeyKeys.Key_Ops);
boolean result;
if (that == null) {
result = (thisObj == null);
} else {
result = false;
if (thisObj.getType() == CBORType.Number) {
if (thisObj.AsInt32(... | java | public boolean HasKeyOp(Integer that) {
CBORObject thisObj = get(KeyKeys.Key_Ops);
boolean result;
if (that == null) {
result = (thisObj == null);
} else {
result = false;
if (thisObj.getType() == CBORType.Number) {
if (thisObj.AsInt32(... | [
"public",
"boolean",
"HasKeyOp",
"(",
"Integer",
"that",
")",
"{",
"CBORObject",
"thisObj",
"=",
"get",
"(",
"KeyKeys",
".",
"Key_Ops",
")",
";",
"boolean",
"result",
";",
"if",
"(",
"that",
"==",
"null",
")",
"{",
"result",
"=",
"(",
"thisObj",
"==",
... | Compares the key's assigned key operations with the provided value, indicating if the provided
value was found in the key operation values assigned to the key.
@param that
the integer operation value to attempt to find in the values provided by the key or
{@code null} to check for no assignment.
@return {@code true} i... | [
"Compares",
"the",
"key",
"s",
"assigned",
"key",
"operations",
"with",
"the",
"provided",
"value",
"indicating",
"if",
"the",
"provided",
"value",
"was",
"found",
"in",
"the",
"key",
"operation",
"values",
"assigned",
"to",
"the",
"key",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/OneKey.java#L220-L241 |
7,949 | cose-wg/COSE-JAVA | src/main/java/COSE/OneKey.java | OneKey.PublicKey | public OneKey PublicKey()
{
OneKey newKey = new OneKey();
CBORObject val = this.get(KeyKeys.KeyType);
if (val.equals(KeyKeys.KeyType_Octet)) {
return null;
}
else if (val.equals(KeyKeys.KeyType_EC2)) {
newKey.add(KeyKeys.EC2_Curve, get(KeyKeys.EC2_Curv... | java | public OneKey PublicKey()
{
OneKey newKey = new OneKey();
CBORObject val = this.get(KeyKeys.KeyType);
if (val.equals(KeyKeys.KeyType_Octet)) {
return null;
}
else if (val.equals(KeyKeys.KeyType_EC2)) {
newKey.add(KeyKeys.EC2_Curve, get(KeyKeys.EC2_Curv... | [
"public",
"OneKey",
"PublicKey",
"(",
")",
"{",
"OneKey",
"newKey",
"=",
"new",
"OneKey",
"(",
")",
";",
"CBORObject",
"val",
"=",
"this",
".",
"get",
"(",
"KeyKeys",
".",
"KeyType",
")",
";",
"if",
"(",
"val",
".",
"equals",
"(",
"KeyKeys",
".",
"... | Create a OneKey object with only the public fields. Filters out the
private key fields but leaves all positive number labels and text labels
along with negative number labels that are public fields.
@return public version of the key | [
"Create",
"a",
"OneKey",
"object",
"with",
"only",
"the",
"public",
"fields",
".",
"Filters",
"out",
"the",
"private",
"key",
"fields",
"but",
"leaves",
"all",
"positive",
"number",
"labels",
"and",
"text",
"labels",
"along",
"with",
"negative",
"number",
"l... | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/OneKey.java#L621-L659 |
7,950 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.get | public static <S extends Storable> OrderingList<S> get(Class<S> type, String property) {
OrderingList<S> list = emptyList();
if (property != null) {
list = list.concat(type, property);
}
return list;
} | java | public static <S extends Storable> OrderingList<S> get(Class<S> type, String property) {
OrderingList<S> list = emptyList();
if (property != null) {
list = list.concat(type, property);
}
return list;
} | [
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"OrderingList",
"<",
"S",
">",
"get",
"(",
"Class",
"<",
"S",
">",
"type",
",",
"String",
"property",
")",
"{",
"OrderingList",
"<",
"S",
">",
"list",
"=",
"emptyList",
"(",
")",
";",
"if",
... | Returns a canonical instance composed of the given ordering.
@throws IllegalArgumentException if ordering property is not in S | [
"Returns",
"a",
"canonical",
"instance",
"composed",
"of",
"the",
"given",
"ordering",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L74-L80 |
7,951 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.concat | public OrderingList<S> concat(OrderingList<S> other) {
if (size() == 0) {
return other;
}
OrderingList<S> newList = this;
if (other.size() > 0) {
for (OrderedProperty<S> property : other) {
newList = newList.concat(property);
}
... | java | public OrderingList<S> concat(OrderingList<S> other) {
if (size() == 0) {
return other;
}
OrderingList<S> newList = this;
if (other.size() > 0) {
for (OrderedProperty<S> property : other) {
newList = newList.concat(property);
}
... | [
"public",
"OrderingList",
"<",
"S",
">",
"concat",
"(",
"OrderingList",
"<",
"S",
">",
"other",
")",
"{",
"if",
"(",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"other",
";",
"}",
"OrderingList",
"<",
"S",
">",
"newList",
"=",
"this",
";",
"... | Returns a list which concatenates this one with the other one. | [
"Returns",
"a",
"list",
"which",
"concatenates",
"this",
"one",
"with",
"the",
"other",
"one",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L197-L208 |
7,952 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.reduce | public OrderingList<S> reduce() {
if (size() == 0) {
return this;
}
Set<ChainedProperty<S>> seen = new HashSet<ChainedProperty<S>>();
OrderingList<S> newList = emptyList();
for (OrderedProperty<S> property : this) {
ChainedProperty<S> chained = ... | java | public OrderingList<S> reduce() {
if (size() == 0) {
return this;
}
Set<ChainedProperty<S>> seen = new HashSet<ChainedProperty<S>>();
OrderingList<S> newList = emptyList();
for (OrderedProperty<S> property : this) {
ChainedProperty<S> chained = ... | [
"public",
"OrderingList",
"<",
"S",
">",
"reduce",
"(",
")",
"{",
"if",
"(",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"this",
";",
"}",
"Set",
"<",
"ChainedProperty",
"<",
"S",
">",
">",
"seen",
"=",
"new",
"HashSet",
"<",
"ChainedProperty"... | Eliminates redundant ordering properties. | [
"Eliminates",
"redundant",
"ordering",
"properties",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L213-L230 |
7,953 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.reverseDirections | public OrderingList<S> reverseDirections() {
if (size() == 0) {
return this;
}
OrderingList<S> reversedList = emptyList();
for (int i=0; i<size(); i++) {
reversedList = reversedList.concat(get(i).reverse());
}
return reversedList;
} | java | public OrderingList<S> reverseDirections() {
if (size() == 0) {
return this;
}
OrderingList<S> reversedList = emptyList();
for (int i=0; i<size(); i++) {
reversedList = reversedList.concat(get(i).reverse());
}
return reversedList;
} | [
"public",
"OrderingList",
"<",
"S",
">",
"reverseDirections",
"(",
")",
"{",
"if",
"(",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"this",
";",
"}",
"OrderingList",
"<",
"S",
">",
"reversedList",
"=",
"emptyList",
"(",
")",
";",
"for",
"(",
"... | Returns this list with all orderings in reverse. | [
"Returns",
"this",
"list",
"with",
"all",
"orderings",
"in",
"reverse",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L235-L244 |
7,954 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.replace | public OrderingList<S> replace(int index, OrderedProperty<S> property) {
int size = size();
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
OrderingList<S> newList = emptyList();
for (int i=0; i<size; i++) {
newList = newL... | java | public OrderingList<S> replace(int index, OrderedProperty<S> property) {
int size = size();
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
OrderingList<S> newList = emptyList();
for (int i=0; i<size; i++) {
newList = newL... | [
"public",
"OrderingList",
"<",
"S",
">",
"replace",
"(",
"int",
"index",
",",
"OrderedProperty",
"<",
"S",
">",
"property",
")",
"{",
"int",
"size",
"=",
"size",
"(",
")",
";",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">=",
"size",
")",
"{",
... | Returns a list with the given element replaced. | [
"Returns",
"a",
"list",
"with",
"the",
"given",
"element",
"replaced",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L249-L259 |
7,955 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.asArray | OrderedProperty<S>[] asArray() {
if (mOrderings == null) {
OrderedProperty<S>[] orderings = new OrderedProperty[mSize];
OrderingList<S> node = this;
for (int i=mSize; --i>=0; ) {
orderings[i] = node.mProperty;
node = node.mParent;
... | java | OrderedProperty<S>[] asArray() {
if (mOrderings == null) {
OrderedProperty<S>[] orderings = new OrderedProperty[mSize];
OrderingList<S> node = this;
for (int i=mSize; --i>=0; ) {
orderings[i] = node.mProperty;
node = node.mParent;
... | [
"OrderedProperty",
"<",
"S",
">",
"[",
"]",
"asArray",
"(",
")",
"{",
"if",
"(",
"mOrderings",
"==",
"null",
")",
"{",
"OrderedProperty",
"<",
"S",
">",
"[",
"]",
"orderings",
"=",
"new",
"OrderedProperty",
"[",
"mSize",
"]",
";",
"OrderingList",
"<",
... | This method is not public because the array is not a clone. | [
"This",
"method",
"is",
"not",
"public",
"because",
"the",
"array",
"is",
"not",
"a",
"clone",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L281-L292 |
7,956 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/OrderingList.java | OrderingList.asStringArray | String[] asStringArray() {
if (mOrderingStrings == null) {
String[] orderings = new String[mSize];
OrderingList<S> node = this;
for (int i=mSize; --i>=0; ) {
orderings[i] = node.mProperty.toString();
node = node.mParent;
}
... | java | String[] asStringArray() {
if (mOrderingStrings == null) {
String[] orderings = new String[mSize];
OrderingList<S> node = this;
for (int i=mSize; --i>=0; ) {
orderings[i] = node.mProperty.toString();
node = node.mParent;
}
... | [
"String",
"[",
"]",
"asStringArray",
"(",
")",
"{",
"if",
"(",
"mOrderingStrings",
"==",
"null",
")",
"{",
"String",
"[",
"]",
"orderings",
"=",
"new",
"String",
"[",
"mSize",
"]",
";",
"OrderingList",
"<",
"S",
">",
"node",
"=",
"this",
";",
"for",
... | Returns the orderings as qualified string property names. Each is
prefixed with a '+' or '-'.
<p>This method is not public because the array is not a clone. | [
"Returns",
"the",
"orderings",
"as",
"qualified",
"string",
"property",
"names",
".",
"Each",
"is",
"prefixed",
"with",
"a",
"+",
"or",
"-",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/OrderingList.java#L300-L311 |
7,957 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.getReferenceAccess | public SyntheticStorableReferenceAccess<S> getReferenceAccess() {
if (mReferenceAccess == null) {
Class<? extends Storable> referenceClass = mBuilder.getStorableClass();
mReferenceAccess = new SyntheticStorableReferenceAccess<S>
(mMasterStorableClass, referenceClass, ... | java | public SyntheticStorableReferenceAccess<S> getReferenceAccess() {
if (mReferenceAccess == null) {
Class<? extends Storable> referenceClass = mBuilder.getStorableClass();
mReferenceAccess = new SyntheticStorableReferenceAccess<S>
(mMasterStorableClass, referenceClass, ... | [
"public",
"SyntheticStorableReferenceAccess",
"<",
"S",
">",
"getReferenceAccess",
"(",
")",
"{",
"if",
"(",
"mReferenceAccess",
"==",
"null",
")",
"{",
"Class",
"<",
"?",
"extends",
"Storable",
">",
"referenceClass",
"=",
"mBuilder",
".",
"getStorableClass",
"(... | Build and return access to the generated storable reference class.
@since 1.2.1 | [
"Build",
"and",
"return",
"access",
"to",
"the",
"generated",
"storable",
"reference",
"class",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L209-L216 |
7,958 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.addKeyProperty | public SyntheticProperty addKeyProperty(String name, Direction direction) {
StorableProperty<S> prop = mMasterStorableInfo.getAllProperties().get(name);
if (prop == null) {
throw new IllegalArgumentException(name + " is not a property of "
+ mMasterStorableInfo.getNam... | java | public SyntheticProperty addKeyProperty(String name, Direction direction) {
StorableProperty<S> prop = mMasterStorableInfo.getAllProperties().get(name);
if (prop == null) {
throw new IllegalArgumentException(name + " is not a property of "
+ mMasterStorableInfo.getNam... | [
"public",
"SyntheticProperty",
"addKeyProperty",
"(",
"String",
"name",
",",
"Direction",
"direction",
")",
"{",
"StorableProperty",
"<",
"S",
">",
"prop",
"=",
"mMasterStorableInfo",
".",
"getAllProperties",
"(",
")",
".",
"get",
"(",
"name",
")",
";",
"if",
... | Add a property to the primary key which is a member of the Storable type
being referenced by this one.
@param name | [
"Add",
"a",
"property",
"to",
"the",
"primary",
"key",
"which",
"is",
"a",
"member",
"of",
"the",
"Storable",
"type",
"being",
"referenced",
"by",
"this",
"one",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L243-L255 |
7,959 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.copyToMasterPrimaryKey | @Deprecated
public void copyToMasterPrimaryKey(Storable indexEntry, S master) throws FetchException {
getReferenceAccess().copyToMasterPrimaryKey(indexEntry, master);
} | java | @Deprecated
public void copyToMasterPrimaryKey(Storable indexEntry, S master) throws FetchException {
getReferenceAccess().copyToMasterPrimaryKey(indexEntry, master);
} | [
"@",
"Deprecated",
"public",
"void",
"copyToMasterPrimaryKey",
"(",
"Storable",
"indexEntry",
",",
"S",
"master",
")",
"throws",
"FetchException",
"{",
"getReferenceAccess",
"(",
")",
".",
"copyToMasterPrimaryKey",
"(",
"indexEntry",
",",
"master",
")",
";",
"}"
] | Sets all the primary key properties of the given master, using the
applicable properties of the given index entry.
@param indexEntry source of property values
@param master master whose primary key properties will be set
@deprecated call getReferenceAccess | [
"Sets",
"all",
"the",
"primary",
"key",
"properties",
"of",
"the",
"given",
"master",
"using",
"the",
"applicable",
"properties",
"of",
"the",
"given",
"index",
"entry",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L353-L356 |
7,960 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.copyFromMaster | @Deprecated
public void copyFromMaster(Storable indexEntry, S master) throws FetchException {
getReferenceAccess().copyFromMaster(indexEntry, master);
} | java | @Deprecated
public void copyFromMaster(Storable indexEntry, S master) throws FetchException {
getReferenceAccess().copyFromMaster(indexEntry, master);
} | [
"@",
"Deprecated",
"public",
"void",
"copyFromMaster",
"(",
"Storable",
"indexEntry",
",",
"S",
"master",
")",
"throws",
"FetchException",
"{",
"getReferenceAccess",
"(",
")",
".",
"copyFromMaster",
"(",
"indexEntry",
",",
"master",
")",
";",
"}"
] | Sets all the properties of the given index entry, using the applicable
properties of the given master.
@param indexEntry index entry whose properties will be set
@param master source of property values
@deprecated call getReferenceAccess | [
"Sets",
"all",
"the",
"properties",
"of",
"the",
"given",
"index",
"entry",
"using",
"the",
"applicable",
"properties",
"of",
"the",
"given",
"master",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L366-L369 |
7,961 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.isConsistent | @Deprecated
public boolean isConsistent(Storable indexEntry, S master) throws FetchException {
return getReferenceAccess().isConsistent(indexEntry, master);
} | java | @Deprecated
public boolean isConsistent(Storable indexEntry, S master) throws FetchException {
return getReferenceAccess().isConsistent(indexEntry, master);
} | [
"@",
"Deprecated",
"public",
"boolean",
"isConsistent",
"(",
"Storable",
"indexEntry",
",",
"S",
"master",
")",
"throws",
"FetchException",
"{",
"return",
"getReferenceAccess",
"(",
")",
".",
"isConsistent",
"(",
"indexEntry",
",",
"master",
")",
";",
"}"
] | Returns true if the properties of the given index entry match those
contained in the master, excluding any version property. This will
always return true after a call to copyFromMaster.
@param indexEntry
index entry whose properties will be tested
@param master
source of property values
@deprecated call getReferenceAc... | [
"Returns",
"true",
"if",
"the",
"properties",
"of",
"the",
"given",
"index",
"entry",
"match",
"those",
"contained",
"in",
"the",
"master",
"excluding",
"any",
"version",
"property",
".",
"This",
"will",
"always",
"return",
"true",
"after",
"a",
"call",
"to"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L382-L385 |
7,962 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.addSpecialMethods | private void addSpecialMethods(ClassFile cf) throws SupportException {
// Generate safe names for special methods.
{
mCopyToMasterPkMethodName =
generateSafeMethodName(mMasterStorableInfo, COPY_TO_MASTER_PK_PREFIX);
mCopyFromMasterMethodName =
... | java | private void addSpecialMethods(ClassFile cf) throws SupportException {
// Generate safe names for special methods.
{
mCopyToMasterPkMethodName =
generateSafeMethodName(mMasterStorableInfo, COPY_TO_MASTER_PK_PREFIX);
mCopyFromMasterMethodName =
... | [
"private",
"void",
"addSpecialMethods",
"(",
"ClassFile",
"cf",
")",
"throws",
"SupportException",
"{",
"// Generate safe names for special methods.\r",
"{",
"mCopyToMasterPkMethodName",
"=",
"generateSafeMethodName",
"(",
"mMasterStorableInfo",
",",
"COPY_TO_MASTER_PK_PREFIX",
... | Create methods for copying properties and testing properties.
@throws amazon.carbonado.SupportException | [
"Create",
"methods",
"for",
"copying",
"properties",
"and",
"testing",
"properties",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L401-L440 |
7,963 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.generateSafeMethodName | private String generateSafeMethodName(StorableInfo info, String prefix) {
Class type = info.getStorableType();
// Try a few times to generate a unique name. There's nothing special
// about choosing 100 as the limit.
int value = 0;
for (int i = 0; i < 100; i++) {
... | java | private String generateSafeMethodName(StorableInfo info, String prefix) {
Class type = info.getStorableType();
// Try a few times to generate a unique name. There's nothing special
// about choosing 100 as the limit.
int value = 0;
for (int i = 0; i < 100; i++) {
... | [
"private",
"String",
"generateSafeMethodName",
"(",
"StorableInfo",
"info",
",",
"String",
"prefix",
")",
"{",
"Class",
"type",
"=",
"info",
".",
"getStorableType",
"(",
")",
";",
"// Try a few times to generate a unique name. There's nothing special\r",
"// about choosing ... | Generates a property name which doesn't clash with any already defined. | [
"Generates",
"a",
"property",
"name",
"which",
"doesn",
"t",
"clash",
"with",
"any",
"already",
"defined",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L523-L539 |
7,964 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java | SyntheticStorableReferenceBuilder.methodExists | private boolean methodExists(Class clazz, String name) {
Method[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(name)) {
return true;
}
}
if (clazz.getSuperclass() != null
... | java | private boolean methodExists(Class clazz, String name) {
Method[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(name)) {
return true;
}
}
if (clazz.getSuperclass() != null
... | [
"private",
"boolean",
"methodExists",
"(",
"Class",
"clazz",
",",
"String",
"name",
")",
"{",
"Method",
"[",
"]",
"methods",
"=",
"clazz",
".",
"getDeclaredMethods",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methods",
".",
"len... | Look for conflicting method names | [
"Look",
"for",
"conflicting",
"method",
"names"
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L544-L565 |
7,965 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/util/AbstractWeakPool.java | AbstractWeakPool.remove | public V remove(Object key) {
clean();
ValueRef<K, V> valueRef = mValues.remove(key);
V value;
if (valueRef != null && (value = valueRef.get()) != null) {
valueRef.clear();
return value;
}
return null;
} | java | public V remove(Object key) {
clean();
ValueRef<K, V> valueRef = mValues.remove(key);
V value;
if (valueRef != null && (value = valueRef.get()) != null) {
valueRef.clear();
return value;
}
return null;
} | [
"public",
"V",
"remove",
"(",
"Object",
"key",
")",
"{",
"clean",
"(",
")",
";",
"ValueRef",
"<",
"K",
",",
"V",
">",
"valueRef",
"=",
"mValues",
".",
"remove",
"(",
"key",
")",
";",
"V",
"value",
";",
"if",
"(",
"valueRef",
"!=",
"null",
"&&",
... | Manually remove a value, returning the old value. | [
"Manually",
"remove",
"a",
"value",
"returning",
"the",
"old",
"value",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/util/AbstractWeakPool.java#L107-L119 |
7,966 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/EmptyQuery.java | EmptyQuery.withValues | @Override
public Query<S> withValues(Object... values) {
if (values == null || values.length == 0) {
return this;
}
throw error();
} | java | @Override
public Query<S> withValues(Object... values) {
if (values == null || values.length == 0) {
return this;
}
throw error();
} | [
"@",
"Override",
"public",
"Query",
"<",
"S",
">",
"withValues",
"(",
"Object",
"...",
"values",
")",
"{",
"if",
"(",
"values",
"==",
"null",
"||",
"values",
".",
"length",
"==",
"0",
")",
"{",
"return",
"this",
";",
"}",
"throw",
"error",
"(",
")"... | Throws an IllegalStateException unless no values passed in. | [
"Throws",
"an",
"IllegalStateException",
"unless",
"no",
"values",
"passed",
"in",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java#L188-L194 |
7,967 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/EmptyQuery.java | EmptyQuery.not | @Override
public Query<S> not() throws FetchException {
return mFactory.query(null, null, mOrdering, null);
} | java | @Override
public Query<S> not() throws FetchException {
return mFactory.query(null, null, mOrdering, null);
} | [
"@",
"Override",
"public",
"Query",
"<",
"S",
">",
"not",
"(",
")",
"throws",
"FetchException",
"{",
"return",
"mFactory",
".",
"query",
"(",
"null",
",",
"null",
",",
"mOrdering",
",",
"null",
")",
";",
"}"
] | Returns a query that fetches everything, possibly in a specified order. | [
"Returns",
"a",
"query",
"that",
"fetches",
"everything",
"possibly",
"in",
"a",
"specified",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java#L212-L215 |
7,968 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/validators/DisjunctiveValidator.java | DisjunctiveValidator.setValidators | @SafeVarargs
public final void setValidators(@NonNull final Validator<Type>... validators) {
Condition.INSTANCE.ensureNotNull(validators, "The validators may not be null");
Condition.INSTANCE.ensureAtLeast(validators.length, 1, "The validators may not be empty");
this.validators = validators... | java | @SafeVarargs
public final void setValidators(@NonNull final Validator<Type>... validators) {
Condition.INSTANCE.ensureNotNull(validators, "The validators may not be null");
Condition.INSTANCE.ensureAtLeast(validators.length, 1, "The validators may not be empty");
this.validators = validators... | [
"@",
"SafeVarargs",
"public",
"final",
"void",
"setValidators",
"(",
"@",
"NonNull",
"final",
"Validator",
"<",
"Type",
">",
"...",
"validators",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"validators",
",",
"\"The validators may not be nul... | Sets the single validators, the validator should consist of.
@param validators
The single validators, which should be set, as an array of the type {@link
Validator}. The validators may neither be null, nor empty | [
"Sets",
"the",
"single",
"validators",
"the",
"validator",
"should",
"consist",
"of",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/validators/DisjunctiveValidator.java#L143-L148 |
7,969 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/spi/TriggerManager.java | TriggerManager.selectTypes | private int selectTypes(Trigger<? super S> trigger) {
Class<? extends Trigger> triggerClass = trigger.getClass();
int types = 0;
if (overridesOneMethod(triggerClass, INSERT_METHODS)) {
types |= FOR_INSERT;
}
if (overridesOneMethod(triggerClass, UPDATE_METH... | java | private int selectTypes(Trigger<? super S> trigger) {
Class<? extends Trigger> triggerClass = trigger.getClass();
int types = 0;
if (overridesOneMethod(triggerClass, INSERT_METHODS)) {
types |= FOR_INSERT;
}
if (overridesOneMethod(triggerClass, UPDATE_METH... | [
"private",
"int",
"selectTypes",
"(",
"Trigger",
"<",
"?",
"super",
"S",
">",
"trigger",
")",
"{",
"Class",
"<",
"?",
"extends",
"Trigger",
">",
"triggerClass",
"=",
"trigger",
".",
"getClass",
"(",
")",
";",
"int",
"types",
"=",
"0",
";",
"if",
"(",... | Determines which operations the given trigger overrides. | [
"Determines",
"which",
"operations",
"the",
"given",
"trigger",
"overrides",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/TriggerManager.java#L425-L447 |
7,970 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | JoinedQueryExecutor.build | public static <T extends Storable> QueryExecutor<T>
build(RepositoryAccess repoAccess,
ChainedProperty<T> targetToSourceProperty,
Filter<T> targetFilter,
OrderingList<T> targetOrdering,
QueryHints hints)
throws RepositoryException
{
... | java | public static <T extends Storable> QueryExecutor<T>
build(RepositoryAccess repoAccess,
ChainedProperty<T> targetToSourceProperty,
Filter<T> targetFilter,
OrderingList<T> targetOrdering,
QueryHints hints)
throws RepositoryException
{
... | [
"public",
"static",
"<",
"T",
"extends",
"Storable",
">",
"QueryExecutor",
"<",
"T",
">",
"build",
"(",
"RepositoryAccess",
"repoAccess",
",",
"ChainedProperty",
"<",
"T",
">",
"targetToSourceProperty",
",",
"Filter",
"<",
"T",
">",
"targetFilter",
",",
"Order... | Builds and returns a complex joined excutor against a chained property,
supporting multi-way joins. Filtering and ordering may also be supplied,
in order to better distribute work throughout the join.
@param repoAccess used to create query executors for outer and inner loops
@param targetToSourceProperty join property... | [
"Builds",
"and",
"returns",
"a",
"complex",
"joined",
"excutor",
"against",
"a",
"chained",
"property",
"supporting",
"multi",
"-",
"way",
"joins",
".",
"Filtering",
"and",
"ordering",
"may",
"also",
"be",
"supplied",
"in",
"order",
"to",
"better",
"distribute... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java#L87-L118 |
7,971 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | JoinedQueryExecutor.mostOrdering | private static <T extends Storable> OrderingList
mostOrdering(StorableProperty<T> primeTarget, OrderingList<T> targetOrdering)
{
OrderingList handledOrdering = OrderingList.emptyList();
for (OrderedProperty<T> targetProp : targetOrdering) {
ChainedProperty<T> chainedProp = t... | java | private static <T extends Storable> OrderingList
mostOrdering(StorableProperty<T> primeTarget, OrderingList<T> targetOrdering)
{
OrderingList handledOrdering = OrderingList.emptyList();
for (OrderedProperty<T> targetProp : targetOrdering) {
ChainedProperty<T> chainedProp = t... | [
"private",
"static",
"<",
"T",
"extends",
"Storable",
">",
"OrderingList",
"mostOrdering",
"(",
"StorableProperty",
"<",
"T",
">",
"primeTarget",
",",
"OrderingList",
"<",
"T",
">",
"targetOrdering",
")",
"{",
"OrderingList",
"handledOrdering",
"=",
"OrderingList"... | Given a list of chained ordering properties, returns the properties
stripped of the matching chain prefix for the targetToSourceProperty. As
the target ordering is scanned left-to-right, if any property is found
which doesn't match the targetToSourceProperty, the building of the new
list stops. In other words, it retur... | [
"Given",
"a",
"list",
"of",
"chained",
"ordering",
"properties",
"returns",
"the",
"properties",
"stripped",
"of",
"the",
"matching",
"chain",
"prefix",
"for",
"the",
"targetToSourceProperty",
".",
"As",
"the",
"target",
"ordering",
"is",
"scanned",
"left",
"-",... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java#L386-L405 |
7,972 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | JoinedQueryExecutor.expectedOrdering | private static <T extends Storable> OrderingList<T>
expectedOrdering(StorageAccess<T> access, Filter<T> filter, OrderingList<T> ordering)
{
List<Filter<T>> split;
if (filter == null) {
split = Filter.getOpenFilter(access.getStorableType()).disjunctiveNormalFormSplit();
... | java | private static <T extends Storable> OrderingList<T>
expectedOrdering(StorageAccess<T> access, Filter<T> filter, OrderingList<T> ordering)
{
List<Filter<T>> split;
if (filter == null) {
split = Filter.getOpenFilter(access.getStorableType()).disjunctiveNormalFormSplit();
... | [
"private",
"static",
"<",
"T",
"extends",
"Storable",
">",
"OrderingList",
"<",
"T",
">",
"expectedOrdering",
"(",
"StorageAccess",
"<",
"T",
">",
"access",
",",
"Filter",
"<",
"T",
">",
"filter",
",",
"OrderingList",
"<",
"T",
">",
"ordering",
")",
"{",... | Examines the given ordering against available indexes, returning the
ordering that the best index can provide for free. | [
"Examines",
"the",
"given",
"ordering",
"against",
"available",
"indexes",
"returning",
"the",
"ordering",
"that",
"the",
"best",
"index",
"can",
"provide",
"for",
"free",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java#L411-L438 |
7,973 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java | JoinedQueryExecutor.commonOrderingCount | private static <T extends Storable> int
commonOrderingCount(OrderingList<T> orderingA, OrderingList<T> orderingB)
{
int commonCount = Math.min(orderingA.size(), orderingB.size());
for (int i=0; i<commonCount; i++) {
if (!orderingA.get(i).equals(orderingB.get(i))) {
... | java | private static <T extends Storable> int
commonOrderingCount(OrderingList<T> orderingA, OrderingList<T> orderingB)
{
int commonCount = Math.min(orderingA.size(), orderingB.size());
for (int i=0; i<commonCount; i++) {
if (!orderingA.get(i).equals(orderingB.get(i))) {
... | [
"private",
"static",
"<",
"T",
"extends",
"Storable",
">",
"int",
"commonOrderingCount",
"(",
"OrderingList",
"<",
"T",
">",
"orderingA",
",",
"OrderingList",
"<",
"T",
">",
"orderingB",
")",
"{",
"int",
"commonCount",
"=",
"Math",
".",
"min",
"(",
"orderi... | Returns the count of exactly matching properties from the two
orderings. The match must be consecutive and start at the first
property. | [
"Returns",
"the",
"count",
"of",
"exactly",
"matching",
"properties",
"from",
"the",
"two",
"orderings",
".",
"The",
"match",
"must",
"be",
"consecutive",
"and",
"start",
"at",
"the",
"first",
"property",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/JoinedQueryExecutor.java#L445-L457 |
7,974 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/filter/FilterValues.java | FilterValues.with | public FilterValues<S> with(char value) {
PropertyFilterList<S> current = currentProperty();
Object obj;
try {
obj = current.getPropertyFilter().adaptValue(value);
} catch (IllegalArgumentException e) {
throw mismatch(e);
}
return with(curr... | java | public FilterValues<S> with(char value) {
PropertyFilterList<S> current = currentProperty();
Object obj;
try {
obj = current.getPropertyFilter().adaptValue(value);
} catch (IllegalArgumentException e) {
throw mismatch(e);
}
return with(curr... | [
"public",
"FilterValues",
"<",
"S",
">",
"with",
"(",
"char",
"value",
")",
"{",
"PropertyFilterList",
"<",
"S",
">",
"current",
"=",
"currentProperty",
"(",
")",
";",
"Object",
"obj",
";",
"try",
"{",
"obj",
"=",
"current",
".",
"getPropertyFilter",
"("... | Returns a new FilterValues instance with the next blank parameter filled in.
@param value parameter value to fill in
@throws IllegalStateException if no blank parameters
@throws IllegalArgumentException if type doesn't match | [
"Returns",
"a",
"new",
"FilterValues",
"instance",
"with",
"the",
"next",
"blank",
"parameter",
"filled",
"in",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterValues.java#L186-L195 |
7,975 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/filter/FilterValues.java | FilterValues.withValues | public FilterValues<S> withValues(Object... values) {
if (values == null) {
return this;
}
if (values.length > getBlankParameterCount()) {
throw new IllegalStateException("Too many values supplied");
}
FilterValues<S> filterValues = this;
f... | java | public FilterValues<S> withValues(Object... values) {
if (values == null) {
return this;
}
if (values.length > getBlankParameterCount()) {
throw new IllegalStateException("Too many values supplied");
}
FilterValues<S> filterValues = this;
f... | [
"public",
"FilterValues",
"<",
"S",
">",
"withValues",
"(",
"Object",
"...",
"values",
")",
"{",
"if",
"(",
"values",
"==",
"null",
")",
"{",
"return",
"this",
";",
"}",
"if",
"(",
"values",
".",
"length",
">",
"getBlankParameterCount",
"(",
")",
")",
... | Returns a new FilterValues instance with the next blank parameters filled in.
@param values parameter values to fill in; if null or empty, this
FilterValues instance is returned
@throws IllegalStateException if no blank parameters or if too many
parameter values supplied
@throws IllegalArgumentException if type doesn'... | [
"Returns",
"a",
"new",
"FilterValues",
"instance",
"with",
"the",
"next",
"blank",
"parameters",
"filled",
"in",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterValues.java#L260-L272 |
7,976 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/filter/FilterValues.java | FilterValues.isAssigned | public boolean isAssigned(PropertyFilter<S> propFilter) {
if (propFilter.isConstant()) {
return true;
}
Map<PropertyFilter<S>, Object> map = mValueMap;
if (map == null) {
FilterValues<S> prevValues = mPrevValues;
if (prevValues == null) {
... | java | public boolean isAssigned(PropertyFilter<S> propFilter) {
if (propFilter.isConstant()) {
return true;
}
Map<PropertyFilter<S>, Object> map = mValueMap;
if (map == null) {
FilterValues<S> prevValues = mPrevValues;
if (prevValues == null) {
... | [
"public",
"boolean",
"isAssigned",
"(",
"PropertyFilter",
"<",
"S",
">",
"propFilter",
")",
"{",
"if",
"(",
"propFilter",
".",
"isConstant",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"Map",
"<",
"PropertyFilter",
"<",
"S",
">",
",",
"Object",
">"... | Returns true if a value is assigned to the given PropertyFilter. | [
"Returns",
"true",
"if",
"a",
"value",
"is",
"assigned",
"to",
"the",
"given",
"PropertyFilter",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterValues.java#L353-L383 |
7,977 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/filter/FilterValues.java | FilterValues.getSuppliedValues | public Object[] getSuppliedValues() {
FilterValues<S> prevValues = mPrevValues;
if (prevValues == null) {
return NO_VALUES;
}
int i = prevValues.mCurrentProperty.getBlankCount();
if (i == 0) {
return NO_VALUES;
}
Object[] values ... | java | public Object[] getSuppliedValues() {
FilterValues<S> prevValues = mPrevValues;
if (prevValues == null) {
return NO_VALUES;
}
int i = prevValues.mCurrentProperty.getBlankCount();
if (i == 0) {
return NO_VALUES;
}
Object[] values ... | [
"public",
"Object",
"[",
"]",
"getSuppliedValues",
"(",
")",
"{",
"FilterValues",
"<",
"S",
">",
"prevValues",
"=",
"mPrevValues",
";",
"if",
"(",
"prevValues",
"==",
"null",
")",
"{",
"return",
"NO_VALUES",
";",
"}",
"int",
"i",
"=",
"prevValues",
".",
... | Returns all supplied values in this object. Constant filter values are
not included.
@return new object array | [
"Returns",
"all",
"supplied",
"values",
"in",
"this",
"object",
".",
"Constant",
"filter",
"values",
"are",
"not",
"included",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterValues.java#L419-L444 |
7,978 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/filter/FilterValues.java | FilterValues.getValuesFor | public Object[] getValuesFor(Filter<S> filter) throws IllegalStateException {
// Traverse filter properties in reverse, since the filter likely was
// used to create this FilterValues instance. If so, then no value map
// needs to be constructed.
PropertyFilterList<S> list = filter.g... | java | public Object[] getValuesFor(Filter<S> filter) throws IllegalStateException {
// Traverse filter properties in reverse, since the filter likely was
// used to create this FilterValues instance. If so, then no value map
// needs to be constructed.
PropertyFilterList<S> list = filter.g... | [
"public",
"Object",
"[",
"]",
"getValuesFor",
"(",
"Filter",
"<",
"S",
">",
"filter",
")",
"throws",
"IllegalStateException",
"{",
"// Traverse filter properties in reverse, since the filter likely was\r",
"// used to create this FilterValues instance. If so, then no value map\r",
... | Returns all values in this object, as required by the given Filter. The
given Filter must be composed only of the same PropertyFilter instances
as used to construct this object. An IllegalStateException will result
otherwise.
@param filter filter must be bound
@return new object array
@throws IllegalStateException if ... | [
"Returns",
"all",
"values",
"in",
"this",
"object",
"as",
"required",
"by",
"the",
"given",
"Filter",
".",
"The",
"given",
"Filter",
"must",
"be",
"composed",
"only",
"of",
"the",
"same",
"PropertyFilter",
"instances",
"as",
"used",
"to",
"construct",
"this"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterValues.java#L456-L513 |
7,979 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/filter/FilterValues.java | FilterValues.getSuppliedValuesFor | public Object[] getSuppliedValuesFor(Filter<S> filter) throws IllegalStateException {
// Traverse filter properties in reverse, since the filter likely was
// used to create this FilterValues instance. If so, then no value map
// needs to be constructed.
PropertyFilterList<S> list = ... | java | public Object[] getSuppliedValuesFor(Filter<S> filter) throws IllegalStateException {
// Traverse filter properties in reverse, since the filter likely was
// used to create this FilterValues instance. If so, then no value map
// needs to be constructed.
PropertyFilterList<S> list = ... | [
"public",
"Object",
"[",
"]",
"getSuppliedValuesFor",
"(",
"Filter",
"<",
"S",
">",
"filter",
")",
"throws",
"IllegalStateException",
"{",
"// Traverse filter properties in reverse, since the filter likely was\r",
"// used to create this FilterValues instance. If so, then no value ma... | Returns all supplied values in this object, as required by the given
Filter. Constant filter values are not included. The given Filter must
be composed only of the same PropertyFilter instances as used to
construct this object. An IllegalStateException will result otherwise.
@param filter filter must be bound
@return ... | [
"Returns",
"all",
"supplied",
"values",
"in",
"this",
"object",
"as",
"required",
"by",
"the",
"given",
"Filter",
".",
"Constant",
"filter",
"values",
"are",
"not",
"included",
".",
"The",
"given",
"Filter",
"must",
"be",
"composed",
"only",
"of",
"the",
"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterValues.java#L524-L613 |
7,980 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/validators/text/LetterOrNumberValidator.java | LetterOrNumberValidator.setCaseSensitivity | public final void setCaseSensitivity(@NonNull final Case caseSensitivty) {
Condition.INSTANCE.ensureNotNull(caseSensitivty, "The case sensitivity may not be null");
this.caseSensitivity = caseSensitivty;
} | java | public final void setCaseSensitivity(@NonNull final Case caseSensitivty) {
Condition.INSTANCE.ensureNotNull(caseSensitivty, "The case sensitivity may not be null");
this.caseSensitivity = caseSensitivty;
} | [
"public",
"final",
"void",
"setCaseSensitivity",
"(",
"@",
"NonNull",
"final",
"Case",
"caseSensitivty",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"caseSensitivty",
",",
"\"The case sensitivity may not be null\"",
")",
";",
"this",
".",
"cas... | Sets the case sensitivity, which should be used by the validator.
@param caseSensitivty
The case senstivitiy, which should be set, as a value of the enum {@link Case}. The
value may either be <code>UPPERCASE</code>, <code>LOWERCASE</code> or
<code>CASE_INSENSITIVE</code> | [
"Sets",
"the",
"case",
"sensitivity",
"which",
"should",
"be",
"used",
"by",
"the",
"validator",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/validators/text/LetterOrNumberValidator.java#L146-L149 |
7,981 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/adapter/ProxySpinnerAdapter.java | ProxySpinnerAdapter.inflateHintView | private View inflateHintView(@Nullable final ViewGroup parent) {
TextView view = (TextView) LayoutInflater.from(context).inflate(hintViewId, parent, false);
view.setText(hint);
if (hintColor != null) {
view.setTextColor(hintColor);
}
return view;
} | java | private View inflateHintView(@Nullable final ViewGroup parent) {
TextView view = (TextView) LayoutInflater.from(context).inflate(hintViewId, parent, false);
view.setText(hint);
if (hintColor != null) {
view.setTextColor(hintColor);
}
return view;
} | [
"private",
"View",
"inflateHintView",
"(",
"@",
"Nullable",
"final",
"ViewGroup",
"parent",
")",
"{",
"TextView",
"view",
"=",
"(",
"TextView",
")",
"LayoutInflater",
".",
"from",
"(",
"context",
")",
".",
"inflate",
"(",
"hintViewId",
",",
"parent",
",",
... | Inflates and returns the view, which is used to display the hint.
@param parent
The parent view of the view, which should be inflated, as an instance of the class
{@link ViewGroup} or null, if no parent view is available
@return The view, which has been inflated, as an instance of the class {@link View} | [
"Inflates",
"and",
"returns",
"the",
"view",
"which",
"is",
"used",
"to",
"display",
"the",
"hint",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/adapter/ProxySpinnerAdapter.java#L73-L82 |
7,982 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/spi/StoragePool.java | StoragePool.getStorage | public <S extends Storable> Storage<S> getStorage(Class<S> type)
throws MalformedTypeException, SupportException, RepositoryException
{
return (Storage<S>) super.get(type);
} | java | public <S extends Storable> Storage<S> getStorage(Class<S> type)
throws MalformedTypeException, SupportException, RepositoryException
{
return (Storage<S>) super.get(type);
} | [
"public",
"<",
"S",
"extends",
"Storable",
">",
"Storage",
"<",
"S",
">",
"getStorage",
"(",
"Class",
"<",
"S",
">",
"type",
")",
"throws",
"MalformedTypeException",
",",
"SupportException",
",",
"RepositoryException",
"{",
"return",
"(",
"Storage",
"<",
"S"... | Returns a Storage instance for the given Storable type, which is lazily
created and pooled. If multiple threads are requesting upon the same type
concurrently, at most one thread attempts to lazily create the
Storage. The others wait for it to become available. | [
"Returns",
"a",
"Storage",
"instance",
"for",
"the",
"given",
"Storable",
"type",
"which",
"is",
"lazily",
"created",
"and",
"pooled",
".",
"If",
"multiple",
"threads",
"are",
"requesting",
"upon",
"the",
"same",
"type",
"concurrently",
"at",
"most",
"one",
... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/StoragePool.java#L48-L52 |
7,983 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JoinNodeBuilder.java | JoinNodeBuilder.captureOrderings | public void captureOrderings(OrderingList<?> ordering) {
try {
if (ordering != null) {
for (OrderedProperty<?> orderedProperty : ordering) {
ChainedProperty<?> chained = orderedProperty.getChainedProperty();
if (!chained.isDerived()) {
... | java | public void captureOrderings(OrderingList<?> ordering) {
try {
if (ordering != null) {
for (OrderedProperty<?> orderedProperty : ordering) {
ChainedProperty<?> chained = orderedProperty.getChainedProperty();
if (!chained.isDerived()) {
... | [
"public",
"void",
"captureOrderings",
"(",
"OrderingList",
"<",
"?",
">",
"ordering",
")",
"{",
"try",
"{",
"if",
"(",
"ordering",
"!=",
"null",
")",
"{",
"for",
"(",
"OrderedProperty",
"<",
"?",
">",
"orderedProperty",
":",
"ordering",
")",
"{",
"Chaine... | Processes the given property orderings and ensures that they are
part of the JoinNode tree.
@throws UndeclaredThrowableException wraps a RepositoryException | [
"Processes",
"the",
"given",
"property",
"orderings",
"and",
"ensures",
"that",
"they",
"are",
"part",
"of",
"the",
"JoinNode",
"tree",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JoinNodeBuilder.java#L64-L77 |
7,984 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/util/AbstractPool.java | AbstractPool.get | public V get(K key) throws E {
// Quick check without locking.
V value = mValues.get(key);
if (value != null) {
return value;
}
// Check again with key lock held.
Lock lock = mLockPool.get(key);
lock.lock();
try {
value ... | java | public V get(K key) throws E {
// Quick check without locking.
V value = mValues.get(key);
if (value != null) {
return value;
}
// Check again with key lock held.
Lock lock = mLockPool.get(key);
lock.lock();
try {
value ... | [
"public",
"V",
"get",
"(",
"K",
"key",
")",
"throws",
"E",
"{",
"// Quick check without locking.\r",
"V",
"value",
"=",
"mValues",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"return",
"value",
";",
"}",
"// Check agai... | Returns a value for the given key, which is lazily created and
pooled. If multiple threads are requesting upon the same key
concurrently, at most one thread attempts to lazily create the
value. The others wait for it to become available. | [
"Returns",
"a",
"value",
"for",
"the",
"given",
"key",
"which",
"is",
"lazily",
"created",
"and",
"pooled",
".",
"If",
"multiple",
"threads",
"are",
"requesting",
"upon",
"the",
"same",
"key",
"concurrently",
"at",
"most",
"one",
"thread",
"attempts",
"to",
... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/util/AbstractPool.java#L49-L75 |
7,985 | cose-wg/COSE-JAVA | src/main/java/COSE/Message.java | Message.EncodeToCBORObject | public CBORObject EncodeToCBORObject() throws CoseException {
CBORObject obj;
obj = EncodeCBORObject();
if (emitTag) {
obj = CBORObject.FromObjectAndTag(obj, messageTag.value);
}
return obj;
} | java | public CBORObject EncodeToCBORObject() throws CoseException {
CBORObject obj;
obj = EncodeCBORObject();
if (emitTag) {
obj = CBORObject.FromObjectAndTag(obj, messageTag.value);
}
return obj;
} | [
"public",
"CBORObject",
"EncodeToCBORObject",
"(",
")",
"throws",
"CoseException",
"{",
"CBORObject",
"obj",
";",
"obj",
"=",
"EncodeCBORObject",
"(",
")",
";",
"if",
"(",
"emitTag",
")",
"{",
"obj",
"=",
"CBORObject",
".",
"FromObjectAndTag",
"(",
"obj",
",... | Encode the COSE message object to a CBORObject tree. This function call will force cryptographic operations to be executed as needed.
@return CBORObject representing the message.
@throws CoseException | [
"Encode",
"the",
"COSE",
"message",
"object",
"to",
"a",
"CBORObject",
"tree",
".",
"This",
"function",
"call",
"will",
"force",
"cryptographic",
"operations",
"to",
"be",
"executed",
"as",
"needed",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/Message.java#L191-L201 |
7,986 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/constraints/NegateConstraint.java | NegateConstraint.create | public static final <Type> NegateConstraint<Type> create(
@NonNull final Constraint<Type> constraint) {
return new NegateConstraint<>(constraint);
} | java | public static final <Type> NegateConstraint<Type> create(
@NonNull final Constraint<Type> constraint) {
return new NegateConstraint<>(constraint);
} | [
"public",
"static",
"final",
"<",
"Type",
">",
"NegateConstraint",
"<",
"Type",
">",
"create",
"(",
"@",
"NonNull",
"final",
"Constraint",
"<",
"Type",
">",
"constraint",
")",
"{",
"return",
"new",
"NegateConstraint",
"<>",
"(",
"constraint",
")",
";",
"}"... | Creates and returns a constraint, which allows to negate the result of an other constraint.
@param <Type>
The type of the values, which should be verified
@param constraint
The constraint, whose result should be negated, as an instance of the type {@link
Constraint}. The constraint may not be null
@return The constrai... | [
"Creates",
"and",
"returns",
"a",
"constraint",
"which",
"allows",
"to",
"negate",
"the",
"result",
"of",
"an",
"other",
"constraint",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/constraints/NegateConstraint.java#L57-L60 |
7,987 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/constraints/NegateConstraint.java | NegateConstraint.setConstraint | public final void setConstraint(@NonNull final Constraint<Type> constraint) {
Condition.INSTANCE.ensureNotNull(constraint, "The constraint may not be null");
this.constraint = constraint;
} | java | public final void setConstraint(@NonNull final Constraint<Type> constraint) {
Condition.INSTANCE.ensureNotNull(constraint, "The constraint may not be null");
this.constraint = constraint;
} | [
"public",
"final",
"void",
"setConstraint",
"(",
"@",
"NonNull",
"final",
"Constraint",
"<",
"Type",
">",
"constraint",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"constraint",
",",
"\"The constraint may not be null\"",
")",
";",
"this",
... | Sets the constraint, whose result should be negated.
@param constraint
The constraint, which should be set, as an instance of the type {@link Constraint}.
The constraint may not be null | [
"Sets",
"the",
"constraint",
"whose",
"result",
"should",
"be",
"negated",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/constraints/NegateConstraint.java#L79-L82 |
7,988 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.buildKeyEncoding | public LocalVariable buildKeyEncoding(CodeAssembler assembler,
OrderedProperty<S>[] properties,
LocalVariable instanceVar,
Class<?> adapterInstanceClass,
... | java | public LocalVariable buildKeyEncoding(CodeAssembler assembler,
OrderedProperty<S>[] properties,
LocalVariable instanceVar,
Class<?> adapterInstanceClass,
... | [
"public",
"LocalVariable",
"buildKeyEncoding",
"(",
"CodeAssembler",
"assembler",
",",
"OrderedProperty",
"<",
"S",
">",
"[",
"]",
"properties",
",",
"LocalVariable",
"instanceVar",
",",
"Class",
"<",
"?",
">",
"adapterInstanceClass",
",",
"boolean",
"useReadMethods... | Generates bytecode instructions to encode properties. The encoding is
suitable for "key" encoding, which means it is correctly comparable.
<p>Note: if a partialStartVar is provided and this strategy has a key
prefix, the prefix is allocated only if the runtime value of
partialStartVar is zero. Likewise, if a partialEn... | [
"Generates",
"bytecode",
"instructions",
"to",
"encode",
"properties",
".",
"The",
"encoding",
"is",
"suitable",
"for",
"key",
"encoding",
"which",
"means",
"it",
"is",
"correctly",
"comparable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L167-L183 |
7,989 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.buildDataEncoding | public LocalVariable buildDataEncoding(CodeAssembler assembler,
StorableProperty<S>[] properties,
LocalVariable instanceVar,
Class<?> adapterInstanceClass,
... | java | public LocalVariable buildDataEncoding(CodeAssembler assembler,
StorableProperty<S>[] properties,
LocalVariable instanceVar,
Class<?> adapterInstanceClass,
... | [
"public",
"LocalVariable",
"buildDataEncoding",
"(",
"CodeAssembler",
"assembler",
",",
"StorableProperty",
"<",
"S",
">",
"[",
"]",
"properties",
",",
"LocalVariable",
"instanceVar",
",",
"Class",
"<",
"?",
">",
"adapterInstanceClass",
",",
"boolean",
"useReadMetho... | Generates bytecode instructions to encode properties. The encoding is
suitable for "data" encoding, which means it is not correctly
comparable, but it is more efficient than key encoding. Partial encoding
is not supported.
@param assembler code assembler to receive bytecode instructions
@param properties specific prop... | [
"Generates",
"bytecode",
"instructions",
"to",
"encode",
"properties",
".",
"The",
"encoding",
"is",
"suitable",
"for",
"data",
"encoding",
"which",
"means",
"it",
"is",
"not",
"correctly",
"comparable",
"but",
"it",
"is",
"more",
"efficient",
"than",
"key",
"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L251-L264 |
7,990 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.buildSerialEncoding | public LocalVariable buildSerialEncoding(CodeAssembler assembler,
StorableProperty<S>[] properties)
throws SupportException
{
properties = ensureAllProperties(properties);
return buildEncoding
(Mode.SERIAL, assembler, properties,... | java | public LocalVariable buildSerialEncoding(CodeAssembler assembler,
StorableProperty<S>[] properties)
throws SupportException
{
properties = ensureAllProperties(properties);
return buildEncoding
(Mode.SERIAL, assembler, properties,... | [
"public",
"LocalVariable",
"buildSerialEncoding",
"(",
"CodeAssembler",
"assembler",
",",
"StorableProperty",
"<",
"S",
">",
"[",
"]",
"properties",
")",
"throws",
"SupportException",
"{",
"properties",
"=",
"ensureAllProperties",
"(",
"properties",
")",
";",
"retur... | Generates bytecode instructions to encode properties and their
states. This encoding is suitable for short-term serialization only.
@param assembler code assembler to receive bytecode instructions
@param properties specific properties to decode, defaults to all
properties if null
@return local variable referencing a b... | [
"Generates",
"bytecode",
"instructions",
"to",
"encode",
"properties",
"and",
"their",
"states",
".",
"This",
"encoding",
"is",
"suitable",
"for",
"short",
"-",
"term",
"serialization",
"only",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L324-L331 |
7,991 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.buildSerialDecoding | public void buildSerialDecoding(CodeAssembler assembler,
StorableProperty<S>[] properties,
LocalVariable encodedVar)
throws SupportException
{
properties = ensureAllProperties(properties);
buildDecoding
... | java | public void buildSerialDecoding(CodeAssembler assembler,
StorableProperty<S>[] properties,
LocalVariable encodedVar)
throws SupportException
{
properties = ensureAllProperties(properties);
buildDecoding
... | [
"public",
"void",
"buildSerialDecoding",
"(",
"CodeAssembler",
"assembler",
",",
"StorableProperty",
"<",
"S",
">",
"[",
"]",
"properties",
",",
"LocalVariable",
"encodedVar",
")",
"throws",
"SupportException",
"{",
"properties",
"=",
"ensureAllProperties",
"(",
"pr... | Generates bytecode instructions to decode properties and their states. A
CorruptEncodingException may be thrown from generated code.
@param assembler code assembler to receive bytecode instructions
@param properties specific properties to decode, defaults to all
properties if null
@param encodedVar required variable, ... | [
"Generates",
"bytecode",
"instructions",
"to",
"decode",
"properties",
"and",
"their",
"states",
".",
"A",
"CorruptEncodingException",
"may",
"be",
"thrown",
"from",
"generated",
"code",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L346-L354 |
7,992 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.isSupported | public boolean isSupported(TypeDesc propertyType) {
if (propertyType.toPrimitiveType() != null) {
return true;
}
if (propertyType == TypeDesc.STRING || propertyType == TypeDesc.forClass(byte[].class)) {
return true;
}
Class clazz = propertyType.toCl... | java | public boolean isSupported(TypeDesc propertyType) {
if (propertyType.toPrimitiveType() != null) {
return true;
}
if (propertyType == TypeDesc.STRING || propertyType == TypeDesc.forClass(byte[].class)) {
return true;
}
Class clazz = propertyType.toCl... | [
"public",
"boolean",
"isSupported",
"(",
"TypeDesc",
"propertyType",
")",
"{",
"if",
"(",
"propertyType",
".",
"toPrimitiveType",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"propertyType",
"==",
"TypeDesc",
".",
"STRING",
"||"... | Returns true if the type of the given property type is supported. The
types currently supported are primitives, primitive wrapper objects,
Strings, byte arrays and Lobs. | [
"Returns",
"true",
"if",
"the",
"type",
"of",
"the",
"given",
"property",
"type",
"is",
"supported",
".",
"The",
"types",
"currently",
"supported",
"are",
"primitives",
"primitive",
"wrapper",
"objects",
"Strings",
"byte",
"arrays",
"and",
"Lobs",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L377-L391 |
7,993 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.gatherAllDataProperties | @SuppressWarnings("unchecked")
protected StorableProperty<S>[] gatherAllDataProperties() {
Map<String, ? extends StorableProperty<S>> map =
StorableIntrospector.examine(mType).getDataProperties();
List<StorableProperty<S>> list = new ArrayList<StorableProperty<S>>(map.size());
... | java | @SuppressWarnings("unchecked")
protected StorableProperty<S>[] gatherAllDataProperties() {
Map<String, ? extends StorableProperty<S>> map =
StorableIntrospector.examine(mType).getDataProperties();
List<StorableProperty<S>> list = new ArrayList<StorableProperty<S>>(map.size());
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"StorableProperty",
"<",
"S",
">",
"[",
"]",
"gatherAllDataProperties",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"?",
"extends",
"StorableProperty",
"<",
"S",
">",
">",
"map",
"=",
"StorableIn... | Returns all non-derived data properties for storable. | [
"Returns",
"all",
"non",
"-",
"derived",
"data",
"properties",
"for",
"storable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L456-L470 |
7,994 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.gatherAllProperties | @SuppressWarnings("unchecked")
protected StorableProperty<S>[] gatherAllProperties() {
Map<String, ? extends StorableProperty<S>> map =
StorableIntrospector.examine(mType).getAllProperties();
List<StorableProperty<S>> list = new ArrayList<StorableProperty<S>>(map.size());
... | java | @SuppressWarnings("unchecked")
protected StorableProperty<S>[] gatherAllProperties() {
Map<String, ? extends StorableProperty<S>> map =
StorableIntrospector.examine(mType).getAllProperties();
List<StorableProperty<S>> list = new ArrayList<StorableProperty<S>>(map.size());
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"StorableProperty",
"<",
"S",
">",
"[",
"]",
"gatherAllProperties",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"?",
"extends",
"StorableProperty",
"<",
"S",
">",
">",
"map",
"=",
"StorableIntros... | Returns all non-join, non-derived properties for storable. | [
"Returns",
"all",
"non",
"-",
"join",
"non",
"-",
"derived",
"properties",
"for",
"storable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L475-L489 |
7,995 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.loadBlankValue | private void loadBlankValue(CodeAssembler a, TypeDesc type) {
switch (type.getTypeCode()) {
case TypeDesc.OBJECT_CODE:
a.loadNull();
break;
case TypeDesc.LONG_CODE:
a.loadConstant(0L);
break;
case TypeDesc.FLOAT_CODE:
a... | java | private void loadBlankValue(CodeAssembler a, TypeDesc type) {
switch (type.getTypeCode()) {
case TypeDesc.OBJECT_CODE:
a.loadNull();
break;
case TypeDesc.LONG_CODE:
a.loadConstant(0L);
break;
case TypeDesc.FLOAT_CODE:
a... | [
"private",
"void",
"loadBlankValue",
"(",
"CodeAssembler",
"a",
",",
"TypeDesc",
"type",
")",
"{",
"switch",
"(",
"type",
".",
"getTypeCode",
"(",
")",
")",
"{",
"case",
"TypeDesc",
".",
"OBJECT_CODE",
":",
"a",
".",
"loadNull",
"(",
")",
";",
"break",
... | Generates code that loads zero, false, or null to the stack. | [
"Generates",
"code",
"that",
"loads",
"zero",
"false",
"or",
"null",
"to",
"the",
"stack",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1447-L1465 |
7,996 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.staticEncodingLength | private int staticEncodingLength(GenericPropertyInfo info) {
TypeDesc type = info.getStorageType();
TypeDesc primType = type.toPrimitiveType();
if (primType == null) {
if (info.isLob()) {
// Lob locator is stored as a long.
return 8;
... | java | private int staticEncodingLength(GenericPropertyInfo info) {
TypeDesc type = info.getStorageType();
TypeDesc primType = type.toPrimitiveType();
if (primType == null) {
if (info.isLob()) {
// Lob locator is stored as a long.
return 8;
... | [
"private",
"int",
"staticEncodingLength",
"(",
"GenericPropertyInfo",
"info",
")",
"{",
"TypeDesc",
"type",
"=",
"info",
".",
"getStorageType",
"(",
")",
";",
"TypeDesc",
"primType",
"=",
"type",
".",
"toPrimitiveType",
"(",
")",
";",
"if",
"(",
"primType",
... | Returns a negative value if encoding is variable. The minimum static
amount is computed from the one's compliment. Of the types with variable
encoding lengths, only for primitives is the minimum static amount
returned more than zero. | [
"Returns",
"a",
"negative",
"value",
"if",
"encoding",
"is",
"variable",
".",
"The",
"minimum",
"static",
"amount",
"is",
"computed",
"from",
"the",
"one",
"s",
"compliment",
".",
"Of",
"the",
"types",
"with",
"variable",
"encoding",
"lengths",
"only",
"for"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1473-L1522 |
7,997 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.encodeProperty | private int encodeProperty(CodeAssembler a, TypeDesc type, Mode mode, boolean descending) {
TypeDesc[] params = new TypeDesc[] {
type, TypeDesc.forClass(byte[].class), TypeDesc.INT
};
if (type.isPrimitive()) {
if (mode == Mode.KEY && descending) {
... | java | private int encodeProperty(CodeAssembler a, TypeDesc type, Mode mode, boolean descending) {
TypeDesc[] params = new TypeDesc[] {
type, TypeDesc.forClass(byte[].class), TypeDesc.INT
};
if (type.isPrimitive()) {
if (mode == Mode.KEY && descending) {
... | [
"private",
"int",
"encodeProperty",
"(",
"CodeAssembler",
"a",
",",
"TypeDesc",
"type",
",",
"Mode",
"mode",
",",
"boolean",
"descending",
")",
"{",
"TypeDesc",
"[",
"]",
"params",
"=",
"new",
"TypeDesc",
"[",
"]",
"{",
"type",
",",
"TypeDesc",
".",
"for... | Generates code that calls an encoding method in DataEncoder or
KeyEncoder. Parameters must already be on the stack.
@return 0 if an int amount is pushed onto the stack, or a positive value
if offset adjust amount is constant | [
"Generates",
"code",
"that",
"calls",
"an",
"encoding",
"method",
"in",
"DataEncoder",
"or",
"KeyEncoder",
".",
"Parameters",
"must",
"already",
"be",
"on",
"the",
"stack",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1561-L1633 |
7,998 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.encodeGeneration | private void encodeGeneration(CodeAssembler a, LocalVariable encodedVar,
int offset, int generation)
{
if (offset < 0) {
throw new IllegalArgumentException();
}
if (generation < 0) {
return;
}
if (generation <... | java | private void encodeGeneration(CodeAssembler a, LocalVariable encodedVar,
int offset, int generation)
{
if (offset < 0) {
throw new IllegalArgumentException();
}
if (generation < 0) {
return;
}
if (generation <... | [
"private",
"void",
"encodeGeneration",
"(",
"CodeAssembler",
"a",
",",
"LocalVariable",
"encodedVar",
",",
"int",
"offset",
",",
"int",
"generation",
")",
"{",
"if",
"(",
"offset",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";"... | Generates code that stores a one or four byte generation value into a
byte array referenced by the local variable.
@param encodedVar references a byte array
@param offset offset into byte array
@param generation if less than zero, no code is generated | [
"Generates",
"code",
"that",
"stores",
"a",
"one",
"or",
"four",
"byte",
"generation",
"value",
"into",
"a",
"byte",
"array",
"referenced",
"by",
"the",
"local",
"variable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1643-L1666 |
7,999 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.getLobLocator | private void getLobLocator(CodeAssembler a, StorablePropertyInfo info) {
if (!info.isLob()) {
throw new IllegalArgumentException();
}
a.invokeInterface(TypeDesc.forClass(RawSupport.class), "getLocator",
TypeDesc.LONG, new TypeDesc[] {info.getStorageType... | java | private void getLobLocator(CodeAssembler a, StorablePropertyInfo info) {
if (!info.isLob()) {
throw new IllegalArgumentException();
}
a.invokeInterface(TypeDesc.forClass(RawSupport.class), "getLocator",
TypeDesc.LONG, new TypeDesc[] {info.getStorageType... | [
"private",
"void",
"getLobLocator",
"(",
"CodeAssembler",
"a",
",",
"StorablePropertyInfo",
"info",
")",
"{",
"if",
"(",
"!",
"info",
".",
"isLob",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"a",
".",
"invokeInterfa... | Generates code to get a Lob locator value from RawSupport. RawSupport
instance and Lob instance must be on the stack. Result is a long locator
value on the stack. | [
"Generates",
"code",
"to",
"get",
"a",
"Lob",
"locator",
"value",
"from",
"RawSupport",
".",
"RawSupport",
"instance",
"and",
"Lob",
"instance",
"must",
"be",
"on",
"the",
"stack",
".",
"Result",
"is",
"a",
"long",
"locator",
"value",
"on",
"the",
"stack",... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1795-L1801 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.