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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
57,500 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java | AbstractExpressionGenerator.getOperatorSymbol | protected String getOperatorSymbol(XAbstractFeatureCall call) {
if (call != null) {
final Resource res = call.eResource();
if (res instanceof StorageAwareResource) {
final boolean isLoadedFromStorage = ((StorageAwareResource) res).isLoadedFromStorage();
if (isLoadedFromStorage) {
final QualifiedNam... | java | protected String getOperatorSymbol(XAbstractFeatureCall call) {
if (call != null) {
final Resource res = call.eResource();
if (res instanceof StorageAwareResource) {
final boolean isLoadedFromStorage = ((StorageAwareResource) res).isLoadedFromStorage();
if (isLoadedFromStorage) {
final QualifiedNam... | [
"protected",
"String",
"getOperatorSymbol",
"(",
"XAbstractFeatureCall",
"call",
")",
"{",
"if",
"(",
"call",
"!=",
"null",
")",
"{",
"final",
"Resource",
"res",
"=",
"call",
".",
"eResource",
"(",
")",
";",
"if",
"(",
"res",
"instanceof",
"StorageAwareResou... | Get the string representation of an operator.
@param call the call to the operator feature.
@return the string representation of the operator or {@code null} if not a valid operator. | [
"Get",
"the",
"string",
"representation",
"of",
"an",
"operator",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java#L363-L377 |
57,501 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java | AbstractExpressionGenerator.getCallSimpleName | public static String getCallSimpleName(XAbstractFeatureCall featureCall,
ILogicalContainerProvider logicalContainerProvider,
IdentifiableSimpleNameProvider featureNameProvider,
Function0<? extends String> nullKeyword,
Function0<? extends String> thisKeyword,
Function0<? extends String> superKeyword,
F... | java | public static String getCallSimpleName(XAbstractFeatureCall featureCall,
ILogicalContainerProvider logicalContainerProvider,
IdentifiableSimpleNameProvider featureNameProvider,
Function0<? extends String> nullKeyword,
Function0<? extends String> thisKeyword,
Function0<? extends String> superKeyword,
F... | [
"public",
"static",
"String",
"getCallSimpleName",
"(",
"XAbstractFeatureCall",
"featureCall",
",",
"ILogicalContainerProvider",
"logicalContainerProvider",
",",
"IdentifiableSimpleNameProvider",
"featureNameProvider",
",",
"Function0",
"<",
"?",
"extends",
"String",
">",
"nu... | Compute the simple name for the called feature.
@param featureCall the feature call.
@param logicalContainerProvider the provider of logicial container.
@param featureNameProvider the provider of feature name.
@param nullKeyword the null-equivalent keyword.
@param thisKeyword the this-equivalent keyword.
@param superK... | [
"Compute",
"the",
"simple",
"name",
"for",
"the",
"called",
"feature",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java#L390-L422 |
57,502 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java | AbstractExpressionGenerator.buildCallReceiver | public static boolean buildCallReceiver(XAbstractFeatureCall call, Function0<? extends String> thisKeyword,
Function1<? super XExpression, ? extends String> referenceNameDefinition, List<Object> output) {
if (call.isStatic()) {
if (call instanceof XMemberFeatureCall) {
final XMemberFeatureCall memberFeature... | java | public static boolean buildCallReceiver(XAbstractFeatureCall call, Function0<? extends String> thisKeyword,
Function1<? super XExpression, ? extends String> referenceNameDefinition, List<Object> output) {
if (call.isStatic()) {
if (call instanceof XMemberFeatureCall) {
final XMemberFeatureCall memberFeature... | [
"public",
"static",
"boolean",
"buildCallReceiver",
"(",
"XAbstractFeatureCall",
"call",
",",
"Function0",
"<",
"?",
"extends",
"String",
">",
"thisKeyword",
",",
"Function1",
"<",
"?",
"super",
"XExpression",
",",
"?",
"extends",
"String",
">",
"referenceNameDefi... | Compute the list of object that serve as the receiver for the given call.
@param call the feature call to analyze.
@param output the objects that constitute the call's receiver.
@param thisKeyword the "this" keyword.
@param referenceNameDefinition replies the name of the expression, if defined.
@return {@code true} if... | [
"Compute",
"the",
"list",
"of",
"object",
"that",
"serve",
"as",
"the",
"receiver",
"for",
"the",
"given",
"call",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java#L432-L473 |
57,503 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java | BootModule.getContextID | @Provides
@Named(JanusConfig.DEFAULT_CONTEXT_ID_NAME)
public static UUID getContextID() {
String str = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_CONTEXT_ID_NAME);
if (Strings.isNullOrEmpty(str)) {
Boolean v;
// From boot agent type
str = JanusConfig.g... | java | @Provides
@Named(JanusConfig.DEFAULT_CONTEXT_ID_NAME)
public static UUID getContextID() {
String str = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_CONTEXT_ID_NAME);
if (Strings.isNullOrEmpty(str)) {
Boolean v;
// From boot agent type
str = JanusConfig.g... | [
"@",
"Provides",
"@",
"Named",
"(",
"JanusConfig",
".",
"DEFAULT_CONTEXT_ID_NAME",
")",
"public",
"static",
"UUID",
"getContextID",
"(",
")",
"{",
"String",
"str",
"=",
"JanusConfig",
".",
"getSystemProperty",
"(",
"JanusConfig",
".",
"DEFAULT_CONTEXT_ID_NAME",
")... | Create a context identifier.
@return the contextID | [
"Create",
"a",
"context",
"identifier",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java#L78-L116 |
57,504 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java | BootModule.getSpaceID | @Provides
@Named(JanusConfig.DEFAULT_SPACE_ID_NAME)
public static UUID getSpaceID() {
final String v = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_SPACE_ID_NAME, JanusConfig.DEFAULT_SPACE_ID_VALUE);
return UUID.fromString(v);
} | java | @Provides
@Named(JanusConfig.DEFAULT_SPACE_ID_NAME)
public static UUID getSpaceID() {
final String v = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_SPACE_ID_NAME, JanusConfig.DEFAULT_SPACE_ID_VALUE);
return UUID.fromString(v);
} | [
"@",
"Provides",
"@",
"Named",
"(",
"JanusConfig",
".",
"DEFAULT_SPACE_ID_NAME",
")",
"public",
"static",
"UUID",
"getSpaceID",
"(",
")",
"{",
"final",
"String",
"v",
"=",
"JanusConfig",
".",
"getSystemProperty",
"(",
"JanusConfig",
".",
"DEFAULT_SPACE_ID_NAME",
... | Construct a space identifier.
@return the spaceID | [
"Construct",
"a",
"space",
"identifier",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java#L123-L128 |
57,505 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java | BootModule.getPUBURIAsString | private static String getPUBURIAsString() {
String pubUri = JanusConfig.getSystemProperty(JanusConfig.PUB_URI);
if (pubUri == null || pubUri.isEmpty()) {
InetAddress a = NetworkUtil.getPrimaryAddress();
if (a == null) {
a = NetworkUtil.getLoopbackAddress();
... | java | private static String getPUBURIAsString() {
String pubUri = JanusConfig.getSystemProperty(JanusConfig.PUB_URI);
if (pubUri == null || pubUri.isEmpty()) {
InetAddress a = NetworkUtil.getPrimaryAddress();
if (a == null) {
a = NetworkUtil.getLoopbackAddress();
... | [
"private",
"static",
"String",
"getPUBURIAsString",
"(",
")",
"{",
"String",
"pubUri",
"=",
"JanusConfig",
".",
"getSystemProperty",
"(",
"JanusConfig",
".",
"PUB_URI",
")",
";",
"if",
"(",
"pubUri",
"==",
"null",
"||",
"pubUri",
".",
"isEmpty",
"(",
")",
... | Extract the current value of the PUB_URI from the system's property or form the platform default value.
@return the current PUB_URI | [
"Extract",
"the",
"current",
"value",
"of",
"the",
"PUB_URI",
"from",
"the",
"system",
"s",
"property",
"or",
"form",
"the",
"platform",
"default",
"value",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java#L151-L164 |
57,506 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.populateInterfaceElements | public static void populateInterfaceElements(
JvmDeclaredType jvmElement,
Map<ActionPrototype, JvmOperation> operations,
Map<String, JvmField> fields,
IActionPrototypeProvider sarlSignatureProvider) {
for (final JvmFeature feature : jvmElement.getAllFeatures()) {
if (!"java.lang.Object".equals(feature.... | java | public static void populateInterfaceElements(
JvmDeclaredType jvmElement,
Map<ActionPrototype, JvmOperation> operations,
Map<String, JvmField> fields,
IActionPrototypeProvider sarlSignatureProvider) {
for (final JvmFeature feature : jvmElement.getAllFeatures()) {
if (!"java.lang.Object".equals(feature.... | [
"public",
"static",
"void",
"populateInterfaceElements",
"(",
"JvmDeclaredType",
"jvmElement",
",",
"Map",
"<",
"ActionPrototype",
",",
"JvmOperation",
">",
"operations",
",",
"Map",
"<",
"String",
",",
"JvmField",
">",
"fields",
",",
"IActionPrototypeProvider",
"sa... | Analyzing the type hierarchy of the given interface and
extract hierarchy information.
@param jvmElement - the element to analyze
@param operations - filled with the operations inside and inherited by the element.
@param fields - filled with the fields inside and inherited by the element.
@param sarlSignatureProvider ... | [
"Analyzing",
"the",
"type",
"hierarchy",
"of",
"the",
"given",
"interface",
"and",
"extract",
"hierarchy",
"information",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L184-L203 |
57,507 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isVarArg | public static boolean isVarArg(List<? extends XtendParameter> params) {
assert params != null;
if (params.size() > 0) {
final XtendParameter param = params.get(params.size() - 1);
assert param != null;
return param.isVarArg();
}
return false;
} | java | public static boolean isVarArg(List<? extends XtendParameter> params) {
assert params != null;
if (params.size() > 0) {
final XtendParameter param = params.get(params.size() - 1);
assert param != null;
return param.isVarArg();
}
return false;
} | [
"public",
"static",
"boolean",
"isVarArg",
"(",
"List",
"<",
"?",
"extends",
"XtendParameter",
">",
"params",
")",
"{",
"assert",
"params",
"!=",
"null",
";",
"if",
"(",
"params",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"final",
"XtendParameter",
"p... | Replies if the last parameter is a variadic parameter.
@param params - parameters.
@return <code>true</code> if the late parameter is variadic. | [
"Replies",
"if",
"the",
"last",
"parameter",
"is",
"a",
"variadic",
"parameter",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L363-L371 |
57,508 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.createNameForHiddenCapacityImplementationAttribute | public static String createNameForHiddenCapacityImplementationAttribute(String id) {
return PREFIX_CAPACITY_IMPLEMENTATION + fixHiddenMember(id.toUpperCase()).replace(".", //$NON-NLS-1$
HIDDEN_MEMBER_REPLACEMENT_CHARACTER);
} | java | public static String createNameForHiddenCapacityImplementationAttribute(String id) {
return PREFIX_CAPACITY_IMPLEMENTATION + fixHiddenMember(id.toUpperCase()).replace(".", //$NON-NLS-1$
HIDDEN_MEMBER_REPLACEMENT_CHARACTER);
} | [
"public",
"static",
"String",
"createNameForHiddenCapacityImplementationAttribute",
"(",
"String",
"id",
")",
"{",
"return",
"PREFIX_CAPACITY_IMPLEMENTATION",
"+",
"fixHiddenMember",
"(",
"id",
".",
"toUpperCase",
"(",
")",
")",
".",
"replace",
"(",
"\".\"",
",",
"/... | Create the name of the hidden field that is containing a capacity implementation.
@param id the id of the capacity.
@return the field name. | [
"Create",
"the",
"name",
"of",
"the",
"hidden",
"field",
"that",
"is",
"containing",
"a",
"capacity",
"implementation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L414-L417 |
57,509 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isNameForHiddenCapacityImplementationCallingMethod | public static boolean isNameForHiddenCapacityImplementationCallingMethod(String simpleName) {
return simpleName != null && simpleName.startsWith(PREFIX_CAPACITY_IMPLEMENTATION)
&& simpleName.endsWith(POSTFIX_CAPACITY_IMPLEMENTATION_CALLER);
} | java | public static boolean isNameForHiddenCapacityImplementationCallingMethod(String simpleName) {
return simpleName != null && simpleName.startsWith(PREFIX_CAPACITY_IMPLEMENTATION)
&& simpleName.endsWith(POSTFIX_CAPACITY_IMPLEMENTATION_CALLER);
} | [
"public",
"static",
"boolean",
"isNameForHiddenCapacityImplementationCallingMethod",
"(",
"String",
"simpleName",
")",
"{",
"return",
"simpleName",
"!=",
"null",
"&&",
"simpleName",
".",
"startsWith",
"(",
"PREFIX_CAPACITY_IMPLEMENTATION",
")",
"&&",
"simpleName",
".",
... | Replies if the given simple name is the name of the hidden method that is calling a capacity implementation.
@param simpleName the simple name.
@return <code>true</code> if the given simple name if for the hidden method for capacuty uses. | [
"Replies",
"if",
"the",
"given",
"simple",
"name",
"is",
"the",
"name",
"of",
"the",
"hidden",
"method",
"that",
"is",
"calling",
"a",
"capacity",
"implementation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L434-L437 |
57,510 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.createNameForHiddenGuardEvaluatorMethod | public static String createNameForHiddenGuardEvaluatorMethod(String eventId, int handlerIndex) {
return PREFIX_GUARD + fixHiddenMember(eventId)
+ HIDDEN_MEMBER_CHARACTER + handlerIndex;
} | java | public static String createNameForHiddenGuardEvaluatorMethod(String eventId, int handlerIndex) {
return PREFIX_GUARD + fixHiddenMember(eventId)
+ HIDDEN_MEMBER_CHARACTER + handlerIndex;
} | [
"public",
"static",
"String",
"createNameForHiddenGuardEvaluatorMethod",
"(",
"String",
"eventId",
",",
"int",
"handlerIndex",
")",
"{",
"return",
"PREFIX_GUARD",
"+",
"fixHiddenMember",
"(",
"eventId",
")",
"+",
"HIDDEN_MEMBER_CHARACTER",
"+",
"handlerIndex",
";",
"}... | Create the name of the hidden method that is containing the event guard evaluation.
@param eventId the id of the event.
@param handlerIndex the index of the handler in the container type.
@return the method name. | [
"Create",
"the",
"name",
"of",
"the",
"hidden",
"method",
"that",
"is",
"containing",
"the",
"event",
"guard",
"evaluation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L463-L466 |
57,511 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.createNameForHiddenEventHandlerMethod | public static String createNameForHiddenEventHandlerMethod(String eventId, int handlerIndex) {
return PREFIX_EVENT_HANDLER + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex;
} | java | public static String createNameForHiddenEventHandlerMethod(String eventId, int handlerIndex) {
return PREFIX_EVENT_HANDLER + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex;
} | [
"public",
"static",
"String",
"createNameForHiddenEventHandlerMethod",
"(",
"String",
"eventId",
",",
"int",
"handlerIndex",
")",
"{",
"return",
"PREFIX_EVENT_HANDLER",
"+",
"fixHiddenMember",
"(",
"eventId",
")",
"+",
"HIDDEN_MEMBER_CHARACTER",
"+",
"handlerIndex",
";"... | Create the name of the hidden method that is containing the event handler code.
@param eventId the id of the event.
@param handlerIndex the index of the handler in the container type.
@return the attribute name. | [
"Create",
"the",
"name",
"of",
"the",
"hidden",
"method",
"that",
"is",
"containing",
"the",
"event",
"handler",
"code",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L474-L476 |
57,512 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isClass | public static boolean isClass(LightweightTypeReference typeRef) {
final JvmType t = typeRef.getType();
if (t instanceof JvmGenericType) {
return !((JvmGenericType) t).isInterface();
}
return false;
} | java | public static boolean isClass(LightweightTypeReference typeRef) {
final JvmType t = typeRef.getType();
if (t instanceof JvmGenericType) {
return !((JvmGenericType) t).isInterface();
}
return false;
} | [
"public",
"static",
"boolean",
"isClass",
"(",
"LightweightTypeReference",
"typeRef",
")",
"{",
"final",
"JvmType",
"t",
"=",
"typeRef",
".",
"getType",
"(",
")",
";",
"if",
"(",
"t",
"instanceof",
"JvmGenericType",
")",
"{",
"return",
"!",
"(",
"(",
"JvmG... | Replies if the given reference is pointing to a class type.
@param typeRef - the type reference to test.
@return <code>true</code> if the pointed element is a class type. | [
"Replies",
"if",
"the",
"given",
"reference",
"is",
"pointing",
"to",
"a",
"class",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L483-L489 |
57,513 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isFinal | public static boolean isFinal(LightweightTypeReference expressionTypeRef) {
if (expressionTypeRef.isArray()) {
return isFinal(expressionTypeRef.getComponentType());
}
if (expressionTypeRef.isPrimitive()) {
return true;
}
return expressionTypeRef.getType() instanceof JvmDeclaredType
&& ((JvmDeclaredT... | java | public static boolean isFinal(LightweightTypeReference expressionTypeRef) {
if (expressionTypeRef.isArray()) {
return isFinal(expressionTypeRef.getComponentType());
}
if (expressionTypeRef.isPrimitive()) {
return true;
}
return expressionTypeRef.getType() instanceof JvmDeclaredType
&& ((JvmDeclaredT... | [
"public",
"static",
"boolean",
"isFinal",
"(",
"LightweightTypeReference",
"expressionTypeRef",
")",
"{",
"if",
"(",
"expressionTypeRef",
".",
"isArray",
"(",
")",
")",
"{",
"return",
"isFinal",
"(",
"expressionTypeRef",
".",
"getComponentType",
"(",
")",
")",
"... | Replies if the given reference is referencing a final type.
@param expressionTypeRef - the type reference to test.
@return <code>true</code> if the given type is final. | [
"Replies",
"if",
"the",
"given",
"reference",
"is",
"referencing",
"a",
"final",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L505-L514 |
57,514 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isFinal | public static boolean isFinal(Class<?> expressionType) {
if (expressionType.isArray()) {
return isFinal(expressionType.getComponentType());
}
if (expressionType.isPrimitive()) {
return true;
}
return expressionType.isEnum()
|| Modifier.isFinal(expressionType.getModifiers());
} | java | public static boolean isFinal(Class<?> expressionType) {
if (expressionType.isArray()) {
return isFinal(expressionType.getComponentType());
}
if (expressionType.isPrimitive()) {
return true;
}
return expressionType.isEnum()
|| Modifier.isFinal(expressionType.getModifiers());
} | [
"public",
"static",
"boolean",
"isFinal",
"(",
"Class",
"<",
"?",
">",
"expressionType",
")",
"{",
"if",
"(",
"expressionType",
".",
"isArray",
"(",
")",
")",
"{",
"return",
"isFinal",
"(",
"expressionType",
".",
"getComponentType",
"(",
")",
")",
";",
"... | Replies if the given type is a final type.
@param expressionType - the type to test.
@return <code>true</code> if the given type is final. | [
"Replies",
"if",
"the",
"given",
"type",
"is",
"a",
"final",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L521-L530 |
57,515 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isInterface | public static boolean isInterface(LightweightTypeReference type) {
return type.getType() instanceof JvmGenericType
&& ((JvmGenericType) type.getType()).isInterface();
} | java | public static boolean isInterface(LightweightTypeReference type) {
return type.getType() instanceof JvmGenericType
&& ((JvmGenericType) type.getType()).isInterface();
} | [
"public",
"static",
"boolean",
"isInterface",
"(",
"LightweightTypeReference",
"type",
")",
"{",
"return",
"type",
".",
"getType",
"(",
")",
"instanceof",
"JvmGenericType",
"&&",
"(",
"(",
"JvmGenericType",
")",
"type",
".",
"getType",
"(",
")",
")",
".",
"i... | Replies if the given type is an interface.
@param type - the type to test.
@return <code>true</code> if the given type is an interface. | [
"Replies",
"if",
"the",
"given",
"type",
"is",
"an",
"interface",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L537-L540 |
57,516 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.canCast | @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:booleanexpressioncomplexity"})
public static boolean canCast(
LightweightTypeReference fromType, LightweightTypeReference toType,
boolean enablePrimitiveWidening, boolean enableVoidMatchingNull,
boolean allowSynonyms) {
if (enableVoidMatching... | java | @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:booleanexpressioncomplexity"})
public static boolean canCast(
LightweightTypeReference fromType, LightweightTypeReference toType,
boolean enablePrimitiveWidening, boolean enableVoidMatchingNull,
boolean allowSynonyms) {
if (enableVoidMatching... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:cyclomaticcomplexity\"",
",",
"\"checkstyle:booleanexpressioncomplexity\"",
"}",
")",
"public",
"static",
"boolean",
"canCast",
"(",
"LightweightTypeReference",
"fromType",
",",
"LightweightTypeReference",
"toType",
",",
"boole... | Replies if it is allowed to cast between the given types.
@param fromType - source type
@param toType - target type
@param enablePrimitiveWidening - indicates if the widening of the primitive types is allowed.
@param enableVoidMatchingNull - indicates if the <code>null</code> is matching <code>void</code>.
@param allo... | [
"Replies",
"if",
"it",
"is",
"allowed",
"to",
"cast",
"between",
"the",
"given",
"types",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L551-L587 |
57,517 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.toLightweightTypeReference | public static LightweightTypeReference toLightweightTypeReference(
JvmType type, CommonTypeComputationServices services,
boolean keepUnboundWildcardInformation) {
if (type == null) {
return null;
}
final StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type);
final Lightweigh... | java | public static LightweightTypeReference toLightweightTypeReference(
JvmType type, CommonTypeComputationServices services,
boolean keepUnboundWildcardInformation) {
if (type == null) {
return null;
}
final StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type);
final Lightweigh... | [
"public",
"static",
"LightweightTypeReference",
"toLightweightTypeReference",
"(",
"JvmType",
"type",
",",
"CommonTypeComputationServices",
"services",
",",
"boolean",
"keepUnboundWildcardInformation",
")",
"{",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"return",
"null... | Convert a type to a lightweight type reference.
@param type - type to convert.
@param services - services used for the conversion
@param keepUnboundWildcardInformation - indicates if the unbound wild card
information must be keeped in the lightweight reference.
@return the lightweight type reference. | [
"Convert",
"a",
"type",
"to",
"a",
"lightweight",
"type",
"reference",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L641-L652 |
57,518 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.compareVersions | public static int compareVersions(String v1, String v2) {
// Remove the SNAPSHOT version.
//final String fixedv1 = v1.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$
//final String fixedv2 = v2.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$
//final Version vobject1 = Version.parseVersio... | java | public static int compareVersions(String v1, String v2) {
// Remove the SNAPSHOT version.
//final String fixedv1 = v1.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$
//final String fixedv2 = v2.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$
//final Version vobject1 = Version.parseVersio... | [
"public",
"static",
"int",
"compareVersions",
"(",
"String",
"v1",
",",
"String",
"v2",
")",
"{",
"// Remove the SNAPSHOT version.",
"//final String fixedv1 = v1.replaceFirst(\"-SNAPSHOT$\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$",
"//final String fixedv2 = v2.replaceFirst(\"-SNAPSHOT$\", \"... | Compare the two strings as they are version numbers.
@param v1 - first version to compare.
@param v2 - second version to compare.
@return Negative integer of <code>v1</code> is lower than <code>v2</code>;
positive integer of <code>v1</code> is greater than <code>v2</code>;
{@code 0} if they are strictly equal. | [
"Compare",
"the",
"two",
"strings",
"as",
"they",
"are",
"version",
"numbers",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L662-L671 |
57,519 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.getSarlCodeFor | public static String getSarlCodeFor(EObject object) {
final ICompositeNode node = NodeModelUtils.getNode(object);
if (node != null) {
String text = node.getText();
if (text != null) {
text = text.trim();
text = text.replaceAll("[\n\r\f]+", " "); //$NON-NLS-1$//$NON-NLS-2$
}
return Strings.emptyT... | java | public static String getSarlCodeFor(EObject object) {
final ICompositeNode node = NodeModelUtils.getNode(object);
if (node != null) {
String text = node.getText();
if (text != null) {
text = text.trim();
text = text.replaceAll("[\n\r\f]+", " "); //$NON-NLS-1$//$NON-NLS-2$
}
return Strings.emptyT... | [
"public",
"static",
"String",
"getSarlCodeFor",
"(",
"EObject",
"object",
")",
"{",
"final",
"ICompositeNode",
"node",
"=",
"NodeModelUtils",
".",
"getNode",
"(",
"object",
")",
";",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"String",
"text",
"=",
"node",... | Replies the original code for the given Ecore object.
<p>The replied code is the SARL code within the source file. It's format depends on
how the developer has input it.
<p>This function does:<ul>
<li>replace any sequence of "new line" characters by a space character, and</li>
<li>trim the whitespaces.</li>
</ul>
@p... | [
"Replies",
"the",
"original",
"code",
"for",
"the",
"given",
"Ecore",
"object",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L712-L723 |
57,520 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.hasAbstractMember | public static boolean hasAbstractMember(XtendTypeDeclaration declaration) {
if (declaration != null) {
for (final XtendMember member : declaration.getMembers()) {
if (member instanceof XtendFunction) {
if (((XtendFunction) member).isAbstract()) {
return true;
}
}
}
}
return false;
} | java | public static boolean hasAbstractMember(XtendTypeDeclaration declaration) {
if (declaration != null) {
for (final XtendMember member : declaration.getMembers()) {
if (member instanceof XtendFunction) {
if (((XtendFunction) member).isAbstract()) {
return true;
}
}
}
}
return false;
} | [
"public",
"static",
"boolean",
"hasAbstractMember",
"(",
"XtendTypeDeclaration",
"declaration",
")",
"{",
"if",
"(",
"declaration",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"XtendMember",
"member",
":",
"declaration",
".",
"getMembers",
"(",
")",
")",
"{",... | Replies if the given declaration has an abstract member.
@param declaration - the declaration.
@return <code>true</code> if the given type has an abstract function. | [
"Replies",
"if",
"the",
"given",
"declaration",
"has",
"an",
"abstract",
"member",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1027-L1038 |
57,521 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isCompatibleSARLLibraryOnClasspath | public static boolean isCompatibleSARLLibraryOnClasspath(TypeReferences typeReferences, Notifier context) {
final OutParameter<String> version = new OutParameter<>();
final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath(typeReferences, context, version);
if (code == SarlLibraryErrorCode.SARL_FOUND) ... | java | public static boolean isCompatibleSARLLibraryOnClasspath(TypeReferences typeReferences, Notifier context) {
final OutParameter<String> version = new OutParameter<>();
final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath(typeReferences, context, version);
if (code == SarlLibraryErrorCode.SARL_FOUND) ... | [
"public",
"static",
"boolean",
"isCompatibleSARLLibraryOnClasspath",
"(",
"TypeReferences",
"typeReferences",
",",
"Notifier",
"context",
")",
"{",
"final",
"OutParameter",
"<",
"String",
">",
"version",
"=",
"new",
"OutParameter",
"<>",
"(",
")",
";",
"final",
"S... | Check if a compatible SARL library is available on the classpath.
@param typeReferences - the accessor to the types.
@param context - the context that is providing the access to the classpath.
@return <code>true</code> if a compatible SARL library was found.
Otherwise <code>false</code>. | [
"Check",
"if",
"a",
"compatible",
"SARL",
"library",
"is",
"available",
"on",
"the",
"classpath",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1047-L1054 |
57,522 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isCompatibleSARLLibraryVersion | public static boolean isCompatibleSARLLibraryVersion(String version) {
if (version != null) {
final Version currentVersion = Version.parseVersion(SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING);
final Version paramVersion = Version.parseVersion(version);
return currentVersion.getMajor() == paramVersion.get... | java | public static boolean isCompatibleSARLLibraryVersion(String version) {
if (version != null) {
final Version currentVersion = Version.parseVersion(SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING);
final Version paramVersion = Version.parseVersion(version);
return currentVersion.getMajor() == paramVersion.get... | [
"public",
"static",
"boolean",
"isCompatibleSARLLibraryVersion",
"(",
"String",
"version",
")",
"{",
"if",
"(",
"version",
"!=",
"null",
")",
"{",
"final",
"Version",
"currentVersion",
"=",
"Version",
".",
"parseVersion",
"(",
"SARLVersion",
".",
"SPECIFICATION_RE... | Check if a version is compatible with the expected SARL library.
@param version - the version to test.
@return <code>true</code> if a compatible SARL library was found.
Otherwise <code>false</code>. | [
"Check",
"if",
"a",
"version",
"is",
"compatible",
"with",
"the",
"expected",
"SARL",
"library",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1062-L1070 |
57,523 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isCompatibleJREVersion | public static boolean isCompatibleJREVersion(String version) {
if (version != null && !version.isEmpty()) {
final Version current = Version.parseVersion(version);
if (current != null) {
final Version minJdk = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION);
assert minJdk != null;
if (current.c... | java | public static boolean isCompatibleJREVersion(String version) {
if (version != null && !version.isEmpty()) {
final Version current = Version.parseVersion(version);
if (current != null) {
final Version minJdk = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION);
assert minJdk != null;
if (current.c... | [
"public",
"static",
"boolean",
"isCompatibleJREVersion",
"(",
"String",
"version",
")",
"{",
"if",
"(",
"version",
"!=",
"null",
"&&",
"!",
"version",
".",
"isEmpty",
"(",
")",
")",
"{",
"final",
"Version",
"current",
"=",
"Version",
".",
"parseVersion",
"... | Check if a version of the JRE is compatible with the SARL library.
@param version - the version to test.
@return <code>true</code> if this version is for a compatible JRE.
Otherwise <code>false</code>. | [
"Check",
"if",
"a",
"version",
"of",
"the",
"JRE",
"is",
"compatible",
"with",
"the",
"SARL",
"library",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1078-L1092 |
57,524 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isCompatibleXtextVersion | public static boolean isCompatibleXtextVersion(String version) {
return version != null && !version.isEmpty()
&& compareVersions(version, SARLVersion.MINIMAL_XTEXT_VERSION) >= 0;
} | java | public static boolean isCompatibleXtextVersion(String version) {
return version != null && !version.isEmpty()
&& compareVersions(version, SARLVersion.MINIMAL_XTEXT_VERSION) >= 0;
} | [
"public",
"static",
"boolean",
"isCompatibleXtextVersion",
"(",
"String",
"version",
")",
"{",
"return",
"version",
"!=",
"null",
"&&",
"!",
"version",
".",
"isEmpty",
"(",
")",
"&&",
"compareVersions",
"(",
"version",
",",
"SARLVersion",
".",
"MINIMAL_XTEXT_VER... | Check if a version of Xtext is compatible with the SARL library.
@param version - the version to test.
@return <code>true</code> if this version is for a compatible Xtext.
Otherwise <code>false</code>. | [
"Check",
"if",
"a",
"version",
"of",
"Xtext",
"is",
"compatible",
"with",
"the",
"SARL",
"library",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1109-L1112 |
57,525 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isCompatibleXtextVersion | public static boolean isCompatibleXtextVersion() {
final XtextVersion xtextVersion = XtextVersion.getCurrent();
if (xtextVersion != null && !Strings.isNullOrEmpty(xtextVersion.getVersion())) {
return isCompatibleXtextVersion(xtextVersion.getVersion());
}
return false;
} | java | public static boolean isCompatibleXtextVersion() {
final XtextVersion xtextVersion = XtextVersion.getCurrent();
if (xtextVersion != null && !Strings.isNullOrEmpty(xtextVersion.getVersion())) {
return isCompatibleXtextVersion(xtextVersion.getVersion());
}
return false;
} | [
"public",
"static",
"boolean",
"isCompatibleXtextVersion",
"(",
")",
"{",
"final",
"XtextVersion",
"xtextVersion",
"=",
"XtextVersion",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"xtextVersion",
"!=",
"null",
"&&",
"!",
"Strings",
".",
"isNullOrEmpty",
"(",
... | Check if a version of the current Xtext is compatible with the SARL library.
@return <code>true</code> if this version is for a compatible Xtext.
Otherwise <code>false</code>. | [
"Check",
"if",
"a",
"version",
"of",
"the",
"current",
"Xtext",
"is",
"compatible",
"with",
"the",
"SARL",
"library",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1119-L1125 |
57,526 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isSARLAnnotation | public static boolean isSARLAnnotation(Class<?> type) {
return (type != null && Annotation.class.isAssignableFrom(type))
&& isSARLAnnotation(type.getPackage().getName());
} | java | public static boolean isSARLAnnotation(Class<?> type) {
return (type != null && Annotation.class.isAssignableFrom(type))
&& isSARLAnnotation(type.getPackage().getName());
} | [
"public",
"static",
"boolean",
"isSARLAnnotation",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"return",
"(",
"type",
"!=",
"null",
"&&",
"Annotation",
".",
"class",
".",
"isAssignableFrom",
"(",
"type",
")",
")",
"&&",
"isSARLAnnotation",
"(",
"type",
... | Replies if the given annotation is an annotation from the SARL core library.
@param type the type of the annotation
@return <code>true</code> if the given type is a SARL annotation. | [
"Replies",
"if",
"the",
"given",
"annotation",
"is",
"an",
"annotation",
"from",
"the",
"SARL",
"core",
"library",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1206-L1209 |
57,527 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.isFunctionalInterface | public static boolean isFunctionalInterface(JvmGenericType type, IActionPrototypeProvider sarlSignatureProvider) {
if (type != null && type.isInterface()) {
final Map<ActionPrototype, JvmOperation> operations = new HashMap<>();
populateInterfaceElements(type, operations, null, sarlSignatureProvider);
if (ope... | java | public static boolean isFunctionalInterface(JvmGenericType type, IActionPrototypeProvider sarlSignatureProvider) {
if (type != null && type.isInterface()) {
final Map<ActionPrototype, JvmOperation> operations = new HashMap<>();
populateInterfaceElements(type, operations, null, sarlSignatureProvider);
if (ope... | [
"public",
"static",
"boolean",
"isFunctionalInterface",
"(",
"JvmGenericType",
"type",
",",
"IActionPrototypeProvider",
"sarlSignatureProvider",
")",
"{",
"if",
"(",
"type",
"!=",
"null",
"&&",
"type",
".",
"isInterface",
"(",
")",
")",
"{",
"final",
"Map",
"<",... | Replies if the given type is a functional interface.
<p>This function does not test if the {@code @FunctionalInterface} is attached to the type.
The function counts the number of operations.
@param type the type to test.
@param sarlSignatureProvider the provider of SARL operation signatures.
@return <code>true</code>... | [
"Replies",
"if",
"the",
"given",
"type",
"is",
"a",
"functional",
"interface",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1229-L1239 |
57,528 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.dump | @SuppressWarnings("checkstyle:npathcomplexity")
public static String dump(Object object, boolean includeStaticField) {
if (object == null) {
return new String();
}
final StringBuilder buffer = new StringBuilder();
final LinkedList<Class<?>> types = new LinkedList<>();
types.add(object.getClass());
while... | java | @SuppressWarnings("checkstyle:npathcomplexity")
public static String dump(Object object, boolean includeStaticField) {
if (object == null) {
return new String();
}
final StringBuilder buffer = new StringBuilder();
final LinkedList<Class<?>> types = new LinkedList<>();
types.add(object.getClass());
while... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:npathcomplexity\"",
")",
"public",
"static",
"String",
"dump",
"(",
"Object",
"object",
",",
"boolean",
"includeStaticField",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"return",
"new",
"String",
"(",
")"... | Dump the object.
@param object the object.
@param includeStaticField indicates if the static fields should be included.
@return the string representation of the object.
@since 0.6 | [
"Dump",
"the",
"object",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1385-L1438 |
57,529 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.cloneWithTypeParametersAndProxies | public static JvmTypeReference cloneWithTypeParametersAndProxies(
JvmTypeReference type,
Iterable<JvmTypeParameter> executableTypeParameters,
Map<String, JvmTypeReference> superTypeParameterMapping,
JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder,
TypeReferences typeReferences, ... | java | public static JvmTypeReference cloneWithTypeParametersAndProxies(
JvmTypeReference type,
Iterable<JvmTypeParameter> executableTypeParameters,
Map<String, JvmTypeReference> superTypeParameterMapping,
JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder,
TypeReferences typeReferences, ... | [
"public",
"static",
"JvmTypeReference",
"cloneWithTypeParametersAndProxies",
"(",
"JvmTypeReference",
"type",
",",
"Iterable",
"<",
"JvmTypeParameter",
">",
"executableTypeParameters",
",",
"Map",
"<",
"String",
",",
"JvmTypeReference",
">",
"superTypeParameterMapping",
","... | Clone the given type reference that for being link to the given operation.
<p>The proxies are not resolved, and the type parameters are clone when they are
related to the type parameter of the type container.
@param type the source type.
@param executableTypeParameters the type parameters of the executable component ... | [
"Clone",
"the",
"given",
"type",
"reference",
"that",
"for",
"being",
"link",
"to",
"the",
"given",
"operation",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1455-L1507 |
57,530 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.getSuperTypeParameterMap | public static void getSuperTypeParameterMap(JvmDeclaredType type, Map<String, JvmTypeReference> mapping) {
for (final JvmTypeReference superTypeReference : type.getSuperTypes()) {
if (superTypeReference instanceof JvmParameterizedTypeReference) {
final JvmParameterizedTypeReference parameterizedTypeReference =... | java | public static void getSuperTypeParameterMap(JvmDeclaredType type, Map<String, JvmTypeReference> mapping) {
for (final JvmTypeReference superTypeReference : type.getSuperTypes()) {
if (superTypeReference instanceof JvmParameterizedTypeReference) {
final JvmParameterizedTypeReference parameterizedTypeReference =... | [
"public",
"static",
"void",
"getSuperTypeParameterMap",
"(",
"JvmDeclaredType",
"type",
",",
"Map",
"<",
"String",
",",
"JvmTypeReference",
">",
"mapping",
")",
"{",
"for",
"(",
"final",
"JvmTypeReference",
"superTypeReference",
":",
"type",
".",
"getSuperTypes",
... | Extract the mapping between the type parameters declared within the super types and the
type parameters arguments that are declared within the given type.
<p>For example, consider the following code:
<pre><code>
interface X<T> {
def a(p1 : T, p2 : U) with U
}
interface Y<T> {
}
class Z<TT> implements... | [
"Extract",
"the",
"mapping",
"between",
"the",
"type",
"parameters",
"declared",
"within",
"the",
"super",
"types",
"and",
"the",
"type",
"parameters",
"arguments",
"that",
"are",
"declared",
"within",
"the",
"given",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1590-L1605 |
57,531 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.setStructuralFeature | public static void setStructuralFeature(EObject object, EStructuralFeature property, Object value) {
assert object != null;
assert property != null;
if (value == null) {
object.eUnset(property);
} else {
object.eSet(property, value);
}
} | java | public static void setStructuralFeature(EObject object, EStructuralFeature property, Object value) {
assert object != null;
assert property != null;
if (value == null) {
object.eUnset(property);
} else {
object.eSet(property, value);
}
} | [
"public",
"static",
"void",
"setStructuralFeature",
"(",
"EObject",
"object",
",",
"EStructuralFeature",
"property",
",",
"Object",
"value",
")",
"{",
"assert",
"object",
"!=",
"null",
";",
"assert",
"property",
"!=",
"null",
";",
"if",
"(",
"value",
"==",
"... | Set the given structure feature with the given value.
@param object the object that contains the feature.
@param property the feature to change.
@param value the value of the feature. | [
"Set",
"the",
"given",
"structure",
"feature",
"with",
"the",
"given",
"value",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1696-L1704 |
57,532 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.getRootFeatureCall | public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall) {
final EObject container = featureCall.eContainer();
final XAbstractFeatureCall rootFeatureCall;
if (container instanceof XMemberFeatureCall || container instanceof XFeatureCall) {
rootFeatureCall = (XAbstractFeatureCall) ... | java | public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall) {
final EObject container = featureCall.eContainer();
final XAbstractFeatureCall rootFeatureCall;
if (container instanceof XMemberFeatureCall || container instanceof XFeatureCall) {
rootFeatureCall = (XAbstractFeatureCall) ... | [
"public",
"static",
"XAbstractFeatureCall",
"getRootFeatureCall",
"(",
"XAbstractFeatureCall",
"featureCall",
")",
"{",
"final",
"EObject",
"container",
"=",
"featureCall",
".",
"eContainer",
"(",
")",
";",
"final",
"XAbstractFeatureCall",
"rootFeatureCall",
";",
"if",
... | Replies the root feature call into a sequence of feature calls.
@param featureCall the leaf feature call.
@return the root feature call.
@since 0.8.6
@see #getRootFeatureCall(XAbstractFeatureCall, XExpression, List) | [
"Replies",
"the",
"root",
"feature",
"call",
"into",
"a",
"sequence",
"of",
"feature",
"calls",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1713-L1723 |
57,533 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.getRootFeatureCall | public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall,
XExpression container, List<JvmFormalParameter> containerParameters) {
if (hasLocalParameters(featureCall, container, containerParameters)
|| !(featureCall instanceof XMemberFeatureCall || featureCall instanceof XFeatureCal... | java | public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall,
XExpression container, List<JvmFormalParameter> containerParameters) {
if (hasLocalParameters(featureCall, container, containerParameters)
|| !(featureCall instanceof XMemberFeatureCall || featureCall instanceof XFeatureCal... | [
"public",
"static",
"XAbstractFeatureCall",
"getRootFeatureCall",
"(",
"XAbstractFeatureCall",
"featureCall",
",",
"XExpression",
"container",
",",
"List",
"<",
"JvmFormalParameter",
">",
"containerParameters",
")",
"{",
"if",
"(",
"hasLocalParameters",
"(",
"featureCall"... | Replies the root feature call into a sequence of feature calls that has
not reference to elements declared within the container, and that are
not one of the container's parameters.
@param featureCall the leaf feature call.
@param container the container of the feature call.
@param containerParameters the parameters of... | [
"Replies",
"the",
"root",
"feature",
"call",
"into",
"a",
"sequence",
"of",
"feature",
"calls",
"that",
"has",
"not",
"reference",
"to",
"elements",
"declared",
"within",
"the",
"container",
"and",
"that",
"are",
"not",
"one",
"of",
"the",
"container",
"s",
... | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1736-L1757 |
57,534 | amzn/ion-java | src/com/amazon/ion/impl/IonWriterSystem.java | IonWriterSystem.isFieldNameSet | @Override
public final boolean isFieldNameSet()
{
if (_field_name_type != null) {
switch (_field_name_type) {
case STRING:
return _field_name != null;
case INT:
return _field_name_sid >= 0;
default:
break;
... | java | @Override
public final boolean isFieldNameSet()
{
if (_field_name_type != null) {
switch (_field_name_type) {
case STRING:
return _field_name != null;
case INT:
return _field_name_sid >= 0;
default:
break;
... | [
"@",
"Override",
"public",
"final",
"boolean",
"isFieldNameSet",
"(",
")",
"{",
"if",
"(",
"_field_name_type",
"!=",
"null",
")",
"{",
"switch",
"(",
"_field_name_type",
")",
"{",
"case",
"STRING",
":",
"return",
"_field_name",
"!=",
"null",
";",
"case",
"... | not supported. | [
"not",
"supported",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonWriterSystem.java#L341-L355 |
57,535 | amzn/ion-java | src/com/amazon/ion/impl/LocalSymbolTable.java | LocalSymbolTable.putSymbol | int putSymbol(String symbolName)
{
if (isReadOnly)
{
throw new ReadOnlyValueException(SymbolTable.class);
}
if (mySymbolsCount == mySymbolNames.length)
{
int newlen = mySymbolsCount * 2;
if (newlen < DEFAULT_CAPACITY)
{
... | java | int putSymbol(String symbolName)
{
if (isReadOnly)
{
throw new ReadOnlyValueException(SymbolTable.class);
}
if (mySymbolsCount == mySymbolNames.length)
{
int newlen = mySymbolsCount * 2;
if (newlen < DEFAULT_CAPACITY)
{
... | [
"int",
"putSymbol",
"(",
"String",
"symbolName",
")",
"{",
"if",
"(",
"isReadOnly",
")",
"{",
"throw",
"new",
"ReadOnlyValueException",
"(",
"SymbolTable",
".",
"class",
")",
";",
"}",
"if",
"(",
"mySymbolsCount",
"==",
"mySymbolNames",
".",
"length",
")",
... | NOT SYNCHRONIZED! Call within constructor or from synch'd method. | [
"NOT",
"SYNCHRONIZED!",
"Call",
"within",
"constructor",
"or",
"from",
"synch",
"d",
"method",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/LocalSymbolTable.java#L534-L566 |
57,536 | amzn/ion-java | src/com/amazon/ion/impl/LocalSymbolTable.java | LocalSymbolTable.symtabExtends | boolean symtabExtends(SymbolTable other)
{
// Throws ClassCastException if other isn't a local symtab
LocalSymbolTable subset = (LocalSymbolTable) other;
// Gather snapshots of each LST's data, so we don't
// Superset must have same/more known symbols than subset.
if (getMa... | java | boolean symtabExtends(SymbolTable other)
{
// Throws ClassCastException if other isn't a local symtab
LocalSymbolTable subset = (LocalSymbolTable) other;
// Gather snapshots of each LST's data, so we don't
// Superset must have same/more known symbols than subset.
if (getMa... | [
"boolean",
"symtabExtends",
"(",
"SymbolTable",
"other",
")",
"{",
"// Throws ClassCastException if other isn't a local symtab",
"LocalSymbolTable",
"subset",
"=",
"(",
"LocalSymbolTable",
")",
"other",
";",
"// Gather snapshots of each LST's data, so we don't",
"// Superset must h... | This method, and the context from which it is called, assumes that the
symtabs are not being mutated by another thread.
Therefore it doesn't use synchronization. | [
"This",
"method",
"and",
"the",
"context",
"from",
"which",
"it",
"is",
"called",
"assumes",
"that",
"the",
"symtabs",
"are",
"not",
"being",
"mutated",
"by",
"another",
"thread",
".",
"Therefore",
"it",
"doesn",
"t",
"use",
"synchronization",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/LocalSymbolTable.java#L819-L862 |
57,537 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.newSymbolToken | public static SymbolToken newSymbolToken(SymbolTable symtab,
String text)
{
// TODO amzn/ion-java/issues/21 symtab should not be null
text.getClass(); // quick null check
SymbolToken tok = (symtab == null ? null : symtab.find(text));
if (... | java | public static SymbolToken newSymbolToken(SymbolTable symtab,
String text)
{
// TODO amzn/ion-java/issues/21 symtab should not be null
text.getClass(); // quick null check
SymbolToken tok = (symtab == null ? null : symtab.find(text));
if (... | [
"public",
"static",
"SymbolToken",
"newSymbolToken",
"(",
"SymbolTable",
"symtab",
",",
"String",
"text",
")",
"{",
"// TODO amzn/ion-java/issues/21 symtab should not be null",
"text",
".",
"getClass",
"(",
")",
";",
"// quick null check",
"SymbolToken",
"tok",
"=",
"("... | Checks symbol content.
@return not null | [
"Checks",
"symbol",
"content",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L208-L220 |
57,538 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.newSymbolTokens | public static SymbolToken[] newSymbolTokens(SymbolTable symtab,
String... text)
{
if (text != null)
{
int count = text.length;
if (count != 0)
{
SymbolToken[] result = new SymbolToken[count];
... | java | public static SymbolToken[] newSymbolTokens(SymbolTable symtab,
String... text)
{
if (text != null)
{
int count = text.length;
if (count != 0)
{
SymbolToken[] result = new SymbolToken[count];
... | [
"public",
"static",
"SymbolToken",
"[",
"]",
"newSymbolTokens",
"(",
"SymbolTable",
"symtab",
",",
"String",
"...",
"text",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
")",
"{",
"int",
"count",
"=",
"text",
".",
"length",
";",
"if",
"(",
"count",
"!=",
... | Validates each text element.
@param text may be null or empty.
@return not null. | [
"Validates",
"each",
"text",
"element",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L240-L258 |
57,539 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.toStrings | public static String[] toStrings(SymbolToken[] symbols, int count)
{
if (count == 0) return _Private_Utils.EMPTY_STRING_ARRAY;
String[] annotations = new String[count];
for (int i = 0; i < count; i++)
{
SymbolToken tok = symbols[i];
String text = tok.getText(... | java | public static String[] toStrings(SymbolToken[] symbols, int count)
{
if (count == 0) return _Private_Utils.EMPTY_STRING_ARRAY;
String[] annotations = new String[count];
for (int i = 0; i < count; i++)
{
SymbolToken tok = symbols[i];
String text = tok.getText(... | [
"public",
"static",
"String",
"[",
"]",
"toStrings",
"(",
"SymbolToken",
"[",
"]",
"symbols",
",",
"int",
"count",
")",
"{",
"if",
"(",
"count",
"==",
"0",
")",
"return",
"_Private_Utils",
".",
"EMPTY_STRING_ARRAY",
";",
"String",
"[",
"]",
"annotations",
... | Extracts the non-null text from a list of symbol tokens.
@return not null.
@throws UnknownSymbolException if any token is missing text. | [
"Extracts",
"the",
"non",
"-",
"null",
"text",
"from",
"a",
"list",
"of",
"symbol",
"tokens",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L358-L374 |
57,540 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.iterate | public static Iterator<IonValue> iterate(ValueFactory valueFactory,
IonReader input)
{
return new IonIteratorImpl(valueFactory, input);
} | java | public static Iterator<IonValue> iterate(ValueFactory valueFactory,
IonReader input)
{
return new IonIteratorImpl(valueFactory, input);
} | [
"public",
"static",
"Iterator",
"<",
"IonValue",
">",
"iterate",
"(",
"ValueFactory",
"valueFactory",
",",
"IonReader",
"input",
")",
"{",
"return",
"new",
"IonIteratorImpl",
"(",
"valueFactory",
",",
"input",
")",
";",
"}"
] | Create a value iterator from a reader.
Primarily a trampoline for access permission. | [
"Create",
"a",
"value",
"iterator",
"from",
"a",
"reader",
".",
"Primarily",
"a",
"trampoline",
"for",
"access",
"permission",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L661-L665 |
57,541 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.isTrivialTable | public static boolean isTrivialTable(SymbolTable table)
{
if (table == null) return true;
if (table.isSystemTable()) return true;
if (table.isLocalTable()) {
// this is only true when there are no local
// symbols defined
// and there are no import... | java | public static boolean isTrivialTable(SymbolTable table)
{
if (table == null) return true;
if (table.isSystemTable()) return true;
if (table.isLocalTable()) {
// this is only true when there are no local
// symbols defined
// and there are no import... | [
"public",
"static",
"boolean",
"isTrivialTable",
"(",
"SymbolTable",
"table",
")",
"{",
"if",
"(",
"table",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"table",
".",
"isSystemTable",
"(",
")",
")",
"return",
"true",
";",
"if",
"(",
"table",
".... | Is the table null, system, or local without imported symbols? | [
"Is",
"the",
"table",
"null",
"system",
"or",
"local",
"without",
"imported",
"symbols?"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L716-L729 |
57,542 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.copyLocalSymbolTable | public static SymbolTable copyLocalSymbolTable(SymbolTable symtab)
throws SubstituteSymbolTableException
{
if (! symtab.isLocalTable())
{
String message = "symtab should be a local symtab";
throw new IllegalArgumentException(message);
}
SymbolTable[] ... | java | public static SymbolTable copyLocalSymbolTable(SymbolTable symtab)
throws SubstituteSymbolTableException
{
if (! symtab.isLocalTable())
{
String message = "symtab should be a local symtab";
throw new IllegalArgumentException(message);
}
SymbolTable[] ... | [
"public",
"static",
"SymbolTable",
"copyLocalSymbolTable",
"(",
"SymbolTable",
"symtab",
")",
"throws",
"SubstituteSymbolTableException",
"{",
"if",
"(",
"!",
"symtab",
".",
"isLocalTable",
"(",
")",
")",
"{",
"String",
"message",
"=",
"\"symtab should be a local symt... | local symtab has substituted symtabs for imports. | [
"local",
"symtab",
"has",
"substituted",
"symtabs",
"for",
"imports",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L793-L820 |
57,543 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.initialSymtab | public static SymbolTable initialSymtab(_Private_LocalSymbolTableFactory lstFactory,
SymbolTable defaultSystemSymtab,
SymbolTable... imports)
{
if (imports == null || imports.length == 0)
{
return def... | java | public static SymbolTable initialSymtab(_Private_LocalSymbolTableFactory lstFactory,
SymbolTable defaultSystemSymtab,
SymbolTable... imports)
{
if (imports == null || imports.length == 0)
{
return def... | [
"public",
"static",
"SymbolTable",
"initialSymtab",
"(",
"_Private_LocalSymbolTableFactory",
"lstFactory",
",",
"SymbolTable",
"defaultSystemSymtab",
",",
"SymbolTable",
"...",
"imports",
")",
"{",
"if",
"(",
"imports",
"==",
"null",
"||",
"imports",
".",
"length",
... | Returns a minimal symtab that, either system or local depending on the
given values, that supports representation as an IonStruct. If the
imports are empty, the default system symtab is returned.
@param lstFactory
the factory to use to build the local symbol table, never null
@param defaultSystemSymtab
the default sys... | [
"Returns",
"a",
"minimal",
"symtab",
"that",
"either",
"system",
"or",
"local",
"depending",
"on",
"the",
"given",
"values",
"that",
"supports",
"representation",
"as",
"an",
"IonStruct",
".",
"If",
"the",
"imports",
"are",
"empty",
"the",
"default",
"system",... | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L851-L866 |
57,544 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.isNonSymbolScalar | public static boolean isNonSymbolScalar(IonType type)
{
return ! IonType.isContainer(type) && ! type.equals(IonType.SYMBOL);
} | java | public static boolean isNonSymbolScalar(IonType type)
{
return ! IonType.isContainer(type) && ! type.equals(IonType.SYMBOL);
} | [
"public",
"static",
"boolean",
"isNonSymbolScalar",
"(",
"IonType",
"type",
")",
"{",
"return",
"!",
"IonType",
".",
"isContainer",
"(",
"type",
")",
"&&",
"!",
"type",
".",
"equals",
"(",
"IonType",
".",
"SYMBOL",
")",
";",
"}"
] | Determines whether the passed-in data type is a scalar and not a symbol. | [
"Determines",
"whether",
"the",
"passed",
"-",
"in",
"data",
"type",
"is",
"a",
"scalar",
"and",
"not",
"a",
"symbol",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L991-L994 |
57,545 | amzn/ion-java | src/com/amazon/ion/impl/_Private_Utils.java | _Private_Utils.getSidForSymbolTableField | public static final int getSidForSymbolTableField(String text)
{
final int shortestFieldNameLength = 4; // 'name'
if (text != null && text.length() >= shortestFieldNameLength)
{
int c = text.charAt(0);
switch (c)
{
case 'v':
... | java | public static final int getSidForSymbolTableField(String text)
{
final int shortestFieldNameLength = 4; // 'name'
if (text != null && text.length() >= shortestFieldNameLength)
{
int c = text.charAt(0);
switch (c)
{
case 'v':
... | [
"public",
"static",
"final",
"int",
"getSidForSymbolTableField",
"(",
"String",
"text",
")",
"{",
"final",
"int",
"shortestFieldNameLength",
"=",
"4",
";",
"// 'name'",
"if",
"(",
"text",
"!=",
"null",
"&&",
"text",
".",
"length",
"(",
")",
">=",
"shortestFi... | Returns the symbol ID matching a system symbol text of a
local or shared symtab field. | [
"Returns",
"the",
"symbol",
"ID",
"matching",
"a",
"system",
"symbol",
"text",
"of",
"a",
"local",
"or",
"shared",
"symtab",
"field",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L1001-L1046 |
57,546 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.make_localtime | private Timestamp make_localtime()
{
int offset = _offset != null
? _offset.intValue()
: 0;
// We use a Copy-Constructor that expects the time parameters to be in
// UTC, as that's what we're supposed to have.
// As this Copy-Constructor doesn't apply local o... | java | private Timestamp make_localtime()
{
int offset = _offset != null
? _offset.intValue()
: 0;
// We use a Copy-Constructor that expects the time parameters to be in
// UTC, as that's what we're supposed to have.
// As this Copy-Constructor doesn't apply local o... | [
"private",
"Timestamp",
"make_localtime",
"(",
")",
"{",
"int",
"offset",
"=",
"_offset",
"!=",
"null",
"?",
"_offset",
".",
"intValue",
"(",
")",
":",
"0",
";",
"// We use a Copy-Constructor that expects the time parameters to be in",
"// UTC, as that's what we're suppos... | Applies the local offset from UTC to each of the applicable time field
values and returns the new Timestamp. In short, this makes the Timestamp
represent local time.
@return a new Timestamp in its local time | [
"Applies",
"the",
"local",
"offset",
"from",
"UTC",
"to",
"each",
"of",
"the",
"applicable",
"time",
"field",
"values",
"and",
"returns",
"the",
"new",
"Timestamp",
".",
"In",
"short",
"this",
"makes",
"the",
"Timestamp",
"represent",
"local",
"time",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1192-L1220 |
57,547 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.getYear | public int getYear()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._year;
} | java | public int getYear()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._year;
} | [
"public",
"int",
"getYear",
"(",
")",
"{",
"Timestamp",
"adjusted",
"=",
"this",
";",
"if",
"(",
"this",
".",
"_offset",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"_offset",
".",
"intValue",
"(",
")",
"!=",
"0",
")",
"{",
"adjusted",
"=",
"... | Returns the year of this Timestamp, in its local time.
@return
a number within the range [1, 9999], in its local time | [
"Returns",
"the",
"year",
"of",
"this",
"Timestamp",
"in",
"its",
"local",
"time",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1649-L1659 |
57,548 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.getMonth | public int getMonth()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._month;
} | java | public int getMonth()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._month;
} | [
"public",
"int",
"getMonth",
"(",
")",
"{",
"Timestamp",
"adjusted",
"=",
"this",
";",
"if",
"(",
"this",
".",
"_offset",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"_offset",
".",
"intValue",
"(",
")",
"!=",
"0",
")",
"{",
"adjusted",
"=",
... | Returns the month of this Timestamp, in its local time.
@return
a number within the range [1, 12], whereby 1 refers to January
and 12 refers to December, in its local time;
1 is returned if the Timestamp isn't precise to
the month | [
"Returns",
"the",
"month",
"of",
"this",
"Timestamp",
"in",
"its",
"local",
"time",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1671-L1681 |
57,549 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.getHour | public int getHour()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._hour;
} | java | public int getHour()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._hour;
} | [
"public",
"int",
"getHour",
"(",
")",
"{",
"Timestamp",
"adjusted",
"=",
"this",
";",
"if",
"(",
"this",
".",
"_offset",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"_offset",
".",
"intValue",
"(",
")",
"!=",
"0",
")",
"{",
"adjusted",
"=",
"... | Returns the hour of this Timestamp, in its local time.
@return
a number within the range [0, 23], in its local time;
0 is returned if the Timestamp isn't
precise to the hour | [
"Returns",
"the",
"hour",
"of",
"this",
"Timestamp",
"in",
"its",
"local",
"time",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1712-L1721 |
57,550 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.getMinute | public int getMinute()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._minute;
} | java | public int getMinute()
{
Timestamp adjusted = this;
if (this._offset != null) {
if (this._offset.intValue() != 0) {
adjusted = make_localtime();
}
}
return adjusted._minute;
} | [
"public",
"int",
"getMinute",
"(",
")",
"{",
"Timestamp",
"adjusted",
"=",
"this",
";",
"if",
"(",
"this",
".",
"_offset",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"_offset",
".",
"intValue",
"(",
")",
"!=",
"0",
")",
"{",
"adjusted",
"=",
... | Returns the minute of this Timestamp, in its local time.
@return
a number within the range [0, 59], in its local time;
0 is returned if the Timestamp isn't
precise to the minute | [
"Returns",
"the",
"minute",
"of",
"this",
"Timestamp",
"in",
"its",
"local",
"time",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1732-L1741 |
57,551 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.withLocalOffset | public Timestamp withLocalOffset(Integer offset)
{
Precision precision = getPrecision();
if (precision.alwaysUnknownOffset() ||
safeEquals(offset, getLocalOffset()))
{
return this;
}
Timestamp ts = createFromUtcFields(precision,
... | java | public Timestamp withLocalOffset(Integer offset)
{
Precision precision = getPrecision();
if (precision.alwaysUnknownOffset() ||
safeEquals(offset, getLocalOffset()))
{
return this;
}
Timestamp ts = createFromUtcFields(precision,
... | [
"public",
"Timestamp",
"withLocalOffset",
"(",
"Integer",
"offset",
")",
"{",
"Precision",
"precision",
"=",
"getPrecision",
"(",
")",
";",
"if",
"(",
"precision",
".",
"alwaysUnknownOffset",
"(",
")",
"||",
"safeEquals",
"(",
"offset",
",",
"getLocalOffset",
... | Returns a timestamp at the same point in time, but with the given local
offset. If this timestamp has precision coarser than minutes, then it
is returned unchanged since such timestamps always have an unknown
offset. | [
"Returns",
"a",
"timestamp",
"at",
"the",
"same",
"point",
"in",
"time",
"but",
"with",
"the",
"given",
"local",
"offset",
".",
"If",
"this",
"timestamp",
"has",
"precision",
"coarser",
"than",
"minutes",
"then",
"it",
"is",
"returned",
"unchanged",
"since",... | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1948-L1967 |
57,552 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.clearUnusedPrecision | private void clearUnusedPrecision() {
switch (_precision) {
case YEAR:
_month = 1;
case MONTH:
_day = 1;
case DAY:
_hour = 0;
_minute = 0;
case MINUTE:
_second = 0;
_fr... | java | private void clearUnusedPrecision() {
switch (_precision) {
case YEAR:
_month = 1;
case MONTH:
_day = 1;
case DAY:
_hour = 0;
_minute = 0;
case MINUTE:
_second = 0;
_fr... | [
"private",
"void",
"clearUnusedPrecision",
"(",
")",
"{",
"switch",
"(",
"_precision",
")",
"{",
"case",
"YEAR",
":",
"_month",
"=",
"1",
";",
"case",
"MONTH",
":",
"_day",
"=",
"1",
";",
"case",
"DAY",
":",
"_hour",
"=",
"0",
";",
"_minute",
"=",
... | Clears any fields more precise than this Timestamp's precision supports. | [
"Clears",
"any",
"fields",
"more",
"precise",
"than",
"this",
"Timestamp",
"s",
"precision",
"supports",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L2303-L2317 |
57,553 | amzn/ion-java | src/com/amazon/ion/Timestamp.java | Timestamp.addDay | public final Timestamp addDay(int amount)
{
long delta = (long) amount * 24 * 60 * 60 * 1000;
return addMillisForPrecision(delta, Precision.DAY, false);
} | java | public final Timestamp addDay(int amount)
{
long delta = (long) amount * 24 * 60 * 60 * 1000;
return addMillisForPrecision(delta, Precision.DAY, false);
} | [
"public",
"final",
"Timestamp",
"addDay",
"(",
"int",
"amount",
")",
"{",
"long",
"delta",
"=",
"(",
"long",
")",
"amount",
"*",
"24",
"*",
"60",
"*",
"60",
"*",
"1000",
";",
"return",
"addMillisForPrecision",
"(",
"delta",
",",
"Precision",
".",
"DAY"... | Returns a timestamp relative to this one by the given number of days.
@param amount a number of days. | [
"Returns",
"a",
"timestamp",
"relative",
"to",
"this",
"one",
"by",
"the",
"given",
"number",
"of",
"days",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L2443-L2447 |
57,554 | amzn/ion-java | src/com/amazon/ion/util/IonTextUtils.java | IonTextUtils.printStringCodePoint | public static void printStringCodePoint(Appendable out, int codePoint)
throws IOException
{
printCodePoint(out, codePoint, EscapeMode.ION_STRING);
} | java | public static void printStringCodePoint(Appendable out, int codePoint)
throws IOException
{
printCodePoint(out, codePoint, EscapeMode.ION_STRING);
} | [
"public",
"static",
"void",
"printStringCodePoint",
"(",
"Appendable",
"out",
",",
"int",
"codePoint",
")",
"throws",
"IOException",
"{",
"printCodePoint",
"(",
"out",
",",
"codePoint",
",",
"EscapeMode",
".",
"ION_STRING",
")",
";",
"}"
] | Prints a single Unicode code point for use in an ASCII-safe Ion string.
@param out the stream to receive the data.
@param codePoint a Unicode code point. | [
"Prints",
"a",
"single",
"Unicode",
"code",
"point",
"for",
"use",
"in",
"an",
"ASCII",
"-",
"safe",
"Ion",
"string",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L200-L204 |
57,555 | amzn/ion-java | src/com/amazon/ion/util/IonTextUtils.java | IonTextUtils.printSymbolCodePoint | public static void printSymbolCodePoint(Appendable out, int codePoint)
throws IOException
{
printCodePoint(out, codePoint, EscapeMode.ION_SYMBOL);
} | java | public static void printSymbolCodePoint(Appendable out, int codePoint)
throws IOException
{
printCodePoint(out, codePoint, EscapeMode.ION_SYMBOL);
} | [
"public",
"static",
"void",
"printSymbolCodePoint",
"(",
"Appendable",
"out",
",",
"int",
"codePoint",
")",
"throws",
"IOException",
"{",
"printCodePoint",
"(",
"out",
",",
"codePoint",
",",
"EscapeMode",
".",
"ION_SYMBOL",
")",
";",
"}"
] | Prints a single Unicode code point for use in an ASCII-safe Ion symbol.
@param out the stream to receive the data.
@param codePoint a Unicode code point. | [
"Prints",
"a",
"single",
"Unicode",
"code",
"point",
"for",
"use",
"in",
"an",
"ASCII",
"-",
"safe",
"Ion",
"symbol",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L212-L216 |
57,556 | amzn/ion-java | src/com/amazon/ion/util/IonTextUtils.java | IonTextUtils.printJsonCodePoint | public static void printJsonCodePoint(Appendable out, int codePoint)
throws IOException
{
// JSON only allows double-quote strings.
printCodePoint(out, codePoint, EscapeMode.JSON);
} | java | public static void printJsonCodePoint(Appendable out, int codePoint)
throws IOException
{
// JSON only allows double-quote strings.
printCodePoint(out, codePoint, EscapeMode.JSON);
} | [
"public",
"static",
"void",
"printJsonCodePoint",
"(",
"Appendable",
"out",
",",
"int",
"codePoint",
")",
"throws",
"IOException",
"{",
"// JSON only allows double-quote strings.",
"printCodePoint",
"(",
"out",
",",
"codePoint",
",",
"EscapeMode",
".",
"JSON",
")",
... | Prints a single Unicode code point for use in an ASCII-safe JSON string.
@param out the stream to receive the data.
@param codePoint a Unicode code point. | [
"Prints",
"a",
"single",
"Unicode",
"code",
"point",
"for",
"use",
"in",
"an",
"ASCII",
"-",
"safe",
"JSON",
"string",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L224-L229 |
57,557 | amzn/ion-java | src/com/amazon/ion/util/IonTextUtils.java | IonTextUtils.printCodePoint | private static void printCodePoint(Appendable out, int c, EscapeMode mode)
throws IOException
{
// JSON only allows uHHHH numeric escapes.
switch (c) {
case 0:
out.append(mode == EscapeMode.JSON ? "\\u0000" : "\\0");
return;
case '\t':
... | java | private static void printCodePoint(Appendable out, int c, EscapeMode mode)
throws IOException
{
// JSON only allows uHHHH numeric escapes.
switch (c) {
case 0:
out.append(mode == EscapeMode.JSON ? "\\u0000" : "\\0");
return;
case '\t':
... | [
"private",
"static",
"void",
"printCodePoint",
"(",
"Appendable",
"out",
",",
"int",
"c",
",",
"EscapeMode",
"mode",
")",
"throws",
"IOException",
"{",
"// JSON only allows uHHHH numeric escapes.",
"switch",
"(",
"c",
")",
"{",
"case",
"0",
":",
"out",
".",
"a... | Prints a single code point, ASCII safe. | [
"Prints",
"a",
"single",
"code",
"point",
"ASCII",
"safe",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L235-L331 |
57,558 | amzn/ion-java | src/com/amazon/ion/util/IonTextUtils.java | IonTextUtils.printCodePointAsString | public static String printCodePointAsString(int codePoint)
{
StringBuilder builder = new StringBuilder(12);
builder.append('"');
try
{
printStringCodePoint(builder, codePoint);
}
catch (IOException e)
{
// Shouldn't happen
t... | java | public static String printCodePointAsString(int codePoint)
{
StringBuilder builder = new StringBuilder(12);
builder.append('"');
try
{
printStringCodePoint(builder, codePoint);
}
catch (IOException e)
{
// Shouldn't happen
t... | [
"public",
"static",
"String",
"printCodePointAsString",
"(",
"int",
"codePoint",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
"12",
")",
";",
"builder",
".",
"append",
"(",
"'",
"'",
")",
";",
"try",
"{",
"printStringCodePoint",
"(... | Builds a String denoting an ASCII-encoded Ion string,
with double-quotes surrounding a single Unicode code point.
@param codePoint a Unicode code point. | [
"Builds",
"a",
"String",
"denoting",
"an",
"ASCII",
"-",
"encoded",
"Ion",
"string",
"with",
"double",
"-",
"quotes",
"surrounding",
"a",
"single",
"Unicode",
"code",
"point",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L547-L562 |
57,559 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.truncate | public void truncate(final long position)
{
final int index = index(position);
final int offset = offset(position);
final Block block = blocks.get(index);
this.index = index;
block.limit = offset;
current = block;
} | java | public void truncate(final long position)
{
final int index = index(position);
final int offset = offset(position);
final Block block = blocks.get(index);
this.index = index;
block.limit = offset;
current = block;
} | [
"public",
"void",
"truncate",
"(",
"final",
"long",
"position",
")",
"{",
"final",
"int",
"index",
"=",
"index",
"(",
"position",
")",
";",
"final",
"int",
"offset",
"=",
"offset",
"(",
"position",
")",
";",
"final",
"Block",
"block",
"=",
"blocks",
".... | Resets the write buffer to a particular point. | [
"Resets",
"the",
"write",
"buffer",
"to",
"a",
"particular",
"point",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L85-L93 |
57,560 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.getUInt8At | public int getUInt8At(final long position)
{
final int index = index(position);
final int offset = offset(position);
final Block block = blocks.get(index);
return block.data[offset] & OCTET_MASK;
} | java | public int getUInt8At(final long position)
{
final int index = index(position);
final int offset = offset(position);
final Block block = blocks.get(index);
return block.data[offset] & OCTET_MASK;
} | [
"public",
"int",
"getUInt8At",
"(",
"final",
"long",
"position",
")",
"{",
"final",
"int",
"index",
"=",
"index",
"(",
"position",
")",
";",
"final",
"int",
"offset",
"=",
"offset",
"(",
"position",
")",
";",
"final",
"Block",
"block",
"=",
"blocks",
"... | Returns the octet at the logical position given. | [
"Returns",
"the",
"octet",
"at",
"the",
"logical",
"position",
"given",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L110-L116 |
57,561 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.writeByte | public void writeByte(final byte octet)
{
if (remaining() < 1)
{
if (index == blocks.size() - 1)
{
allocateNewBlock();
}
index++;
current = blocks.get(index);
}
final Block block = current;
block.data... | java | public void writeByte(final byte octet)
{
if (remaining() < 1)
{
if (index == blocks.size() - 1)
{
allocateNewBlock();
}
index++;
current = blocks.get(index);
}
final Block block = current;
block.data... | [
"public",
"void",
"writeByte",
"(",
"final",
"byte",
"octet",
")",
"{",
"if",
"(",
"remaining",
"(",
")",
"<",
"1",
")",
"{",
"if",
"(",
"index",
"==",
"blocks",
".",
"size",
"(",
")",
"-",
"1",
")",
"{",
"allocateNewBlock",
"(",
")",
";",
"}",
... | Writes a single octet to the buffer, expanding if necessary. | [
"Writes",
"a",
"single",
"octet",
"to",
"the",
"buffer",
"expanding",
"if",
"necessary",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L119-L133 |
57,562 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.writeBytesSlow | private void writeBytesSlow(final byte[] bytes, int off, int len)
{
while (len > 0)
{
final Block block = current;
final int amount = Math.min(len, block.remaining());
System.arraycopy(bytes, off, block.data, block.limit, amount);
block.limit += amount... | java | private void writeBytesSlow(final byte[] bytes, int off, int len)
{
while (len > 0)
{
final Block block = current;
final int amount = Math.min(len, block.remaining());
System.arraycopy(bytes, off, block.data, block.limit, amount);
block.limit += amount... | [
"private",
"void",
"writeBytesSlow",
"(",
"final",
"byte",
"[",
"]",
"bytes",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"while",
"(",
"len",
">",
"0",
")",
"{",
"final",
"Block",
"block",
"=",
"current",
";",
"final",
"int",
"amount",
"=",
"M... | slow in the sense that we do all kind of block boundary checking | [
"slow",
"in",
"the",
"sense",
"that",
"we",
"do",
"all",
"kind",
"of",
"block",
"boundary",
"checking"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L136-L157 |
57,563 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.writeBytes | public void writeBytes(final byte[] bytes, final int off, final int len)
{
if (len > remaining())
{
writeBytesSlow(bytes, off, len);
return;
}
final Block block = current;
System.arraycopy(bytes, off, block.data, block.limit, len);
block.limit... | java | public void writeBytes(final byte[] bytes, final int off, final int len)
{
if (len > remaining())
{
writeBytesSlow(bytes, off, len);
return;
}
final Block block = current;
System.arraycopy(bytes, off, block.data, block.limit, len);
block.limit... | [
"public",
"void",
"writeBytes",
"(",
"final",
"byte",
"[",
"]",
"bytes",
",",
"final",
"int",
"off",
",",
"final",
"int",
"len",
")",
"{",
"if",
"(",
"len",
">",
"remaining",
"(",
")",
")",
"{",
"writeBytesSlow",
"(",
"bytes",
",",
"off",
",",
"len... | Writes an array of bytes to the buffer expanding if necessary. | [
"Writes",
"an",
"array",
"of",
"bytes",
"to",
"the",
"buffer",
"expanding",
"if",
"necessary",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L160-L171 |
57,564 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.writeUTF8Slow | private int writeUTF8Slow(final CharSequence chars, int off, int len)
{
int octets = 0;
while (len > 0)
{
final char ch = chars.charAt(off);
if (ch >= LOW_SURROGATE_FIRST && ch <= LOW_SURROGATE_LAST)
{
throw new IllegalArgumentException("Un... | java | private int writeUTF8Slow(final CharSequence chars, int off, int len)
{
int octets = 0;
while (len > 0)
{
final char ch = chars.charAt(off);
if (ch >= LOW_SURROGATE_FIRST && ch <= LOW_SURROGATE_LAST)
{
throw new IllegalArgumentException("Un... | [
"private",
"int",
"writeUTF8Slow",
"(",
"final",
"CharSequence",
"chars",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"int",
"octets",
"=",
"0",
";",
"while",
"(",
"len",
">",
"0",
")",
"{",
"final",
"char",
"ch",
"=",
"chars",
".",
"charAt",
"... | slow in the sense that we deal with any kind of UTF-8 sequence and block boundaries | [
"slow",
"in",
"the",
"sense",
"that",
"we",
"deal",
"with",
"any",
"kind",
"of",
"UTF",
"-",
"8",
"sequence",
"and",
"block",
"boundaries"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L205-L262 |
57,565 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.writeTo | public void writeTo(final OutputStream out) throws IOException
{
for (int i = 0; i <= index; i++)
{
Block block = blocks.get(i);
out.write(block.data, 0, block.limit);
}
} | java | public void writeTo(final OutputStream out) throws IOException
{
for (int i = 0; i <= index; i++)
{
Block block = blocks.get(i);
out.write(block.data, 0, block.limit);
}
} | [
"public",
"void",
"writeTo",
"(",
"final",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"index",
";",
"i",
"++",
")",
"{",
"Block",
"block",
"=",
"blocks",
".",
"get",
"(",
"i",
")",
... | Write the entire buffer to output stream. | [
"Write",
"the",
"entire",
"buffer",
"to",
"output",
"stream",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L1073-L1080 |
57,566 | amzn/ion-java | src/com/amazon/ion/impl/bin/WriteBuffer.java | WriteBuffer.writeTo | public void writeTo(final OutputStream out, long position, long length) throws IOException
{
while (length > 0)
{
final int index = index(position);
final int offset = offset(position);
final Block block = blocks.get(index);
final int amount = (int) Ma... | java | public void writeTo(final OutputStream out, long position, long length) throws IOException
{
while (length > 0)
{
final int index = index(position);
final int offset = offset(position);
final Block block = blocks.get(index);
final int amount = (int) Ma... | [
"public",
"void",
"writeTo",
"(",
"final",
"OutputStream",
"out",
",",
"long",
"position",
",",
"long",
"length",
")",
"throws",
"IOException",
"{",
"while",
"(",
"length",
">",
"0",
")",
"{",
"final",
"int",
"index",
"=",
"index",
"(",
"position",
")",
... | Write a specific segment of data from the buffer to a stream. | [
"Write",
"a",
"specific",
"segment",
"of",
"data",
"from",
"the",
"buffer",
"to",
"a",
"stream",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/WriteBuffer.java#L1083-L1096 |
57,567 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonTextAppender.java | _Private_IonTextAppender.forAppendable | public static _Private_IonTextAppender forAppendable(Appendable out)
{
_Private_FastAppendable fast = new AppendableFastAppendable(out);
boolean escapeNonAscii = false;
return new _Private_IonTextAppender(fast, escapeNonAscii);
} | java | public static _Private_IonTextAppender forAppendable(Appendable out)
{
_Private_FastAppendable fast = new AppendableFastAppendable(out);
boolean escapeNonAscii = false;
return new _Private_IonTextAppender(fast, escapeNonAscii);
} | [
"public",
"static",
"_Private_IonTextAppender",
"forAppendable",
"(",
"Appendable",
"out",
")",
"{",
"_Private_FastAppendable",
"fast",
"=",
"new",
"AppendableFastAppendable",
"(",
"out",
")",
";",
"boolean",
"escapeNonAscii",
"=",
"false",
";",
"return",
"new",
"_P... | Doesn't escape non-ASCII characters. | [
"Doesn",
"t",
"escape",
"non",
"-",
"ASCII",
"characters",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonTextAppender.java#L259-L264 |
57,568 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonTextAppender.java | _Private_IonTextAppender.printString | public final void printString(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.string");
}
else
{
appendAscii('"');
printCodePoints(text, STRING_ESCAPE_CODES);
appendAscii('"');
}
... | java | public final void printString(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.string");
}
else
{
appendAscii('"');
printCodePoints(text, STRING_ESCAPE_CODES);
appendAscii('"');
}
... | [
"public",
"final",
"void",
"printString",
"(",
"CharSequence",
"text",
")",
"throws",
"IOException",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"appendAscii",
"(",
"\"null.string\"",
")",
";",
"}",
"else",
"{",
"appendAscii",
"(",
"'",
"'",
")",
";"... | Print an Ion String type
@param text
@throws IOException | [
"Print",
"an",
"Ion",
"String",
"type"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonTextAppender.java#L342-L355 |
57,569 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonTextAppender.java | _Private_IonTextAppender.printLongString | public final void printLongString(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.string");
}
else
{
appendAscii(TRIPLE_QUOTES);
printCodePoints(text, LONG_STRING_ESCAPE_CODES);
appendAscii(... | java | public final void printLongString(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.string");
}
else
{
appendAscii(TRIPLE_QUOTES);
printCodePoints(text, LONG_STRING_ESCAPE_CODES);
appendAscii(... | [
"public",
"final",
"void",
"printLongString",
"(",
"CharSequence",
"text",
")",
"throws",
"IOException",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"appendAscii",
"(",
"\"null.string\"",
")",
";",
"}",
"else",
"{",
"appendAscii",
"(",
"TRIPLE_QUOTES",
"... | Print an Ion triple-quoted string
@param text
@throws IOException | [
"Print",
"an",
"Ion",
"triple",
"-",
"quoted",
"string"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonTextAppender.java#L362-L375 |
57,570 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonTextAppender.java | _Private_IonTextAppender.printJsonString | public final void printJsonString(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null");
}
else
{
appendAscii('"');
printCodePoints(text, JSON_ESCAPE_CODES);
appendAscii('"');
}
} | java | public final void printJsonString(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null");
}
else
{
appendAscii('"');
printCodePoints(text, JSON_ESCAPE_CODES);
appendAscii('"');
}
} | [
"public",
"final",
"void",
"printJsonString",
"(",
"CharSequence",
"text",
")",
"throws",
"IOException",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"appendAscii",
"(",
"\"null\"",
")",
";",
"}",
"else",
"{",
"appendAscii",
"(",
"'",
"'",
")",
";",
... | Print a JSON string
@param text
@throws IOException | [
"Print",
"a",
"JSON",
"string"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonTextAppender.java#L382-L395 |
57,571 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonTextAppender.java | _Private_IonTextAppender.printSymbol | public final void printSymbol(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.symbol");
}
else if (symbolNeedsQuoting(text, true)) {
appendAscii('\'');
printCodePoints(text, SYMBOL_ESCAPE_CODES);
ap... | java | public final void printSymbol(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.symbol");
}
else if (symbolNeedsQuoting(text, true)) {
appendAscii('\'');
printCodePoints(text, SYMBOL_ESCAPE_CODES);
ap... | [
"public",
"final",
"void",
"printSymbol",
"(",
"CharSequence",
"text",
")",
"throws",
"IOException",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"appendAscii",
"(",
"\"null.symbol\"",
")",
";",
"}",
"else",
"if",
"(",
"symbolNeedsQuoting",
"(",
"text",
... | Print an Ion Symbol type. This method will check if symbol needs quoting
@param text
@throws IOException | [
"Print",
"an",
"Ion",
"Symbol",
"type",
".",
"This",
"method",
"will",
"check",
"if",
"symbol",
"needs",
"quoting"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonTextAppender.java#L535-L551 |
57,572 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonTextAppender.java | _Private_IonTextAppender.printQuotedSymbol | public final void printQuotedSymbol(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.symbol");
}
else
{
appendAscii('\'');
printCodePoints(text, SYMBOL_ESCAPE_CODES);
appendAscii('\'');
... | java | public final void printQuotedSymbol(CharSequence text)
throws IOException
{
if (text == null)
{
appendAscii("null.symbol");
}
else
{
appendAscii('\'');
printCodePoints(text, SYMBOL_ESCAPE_CODES);
appendAscii('\'');
... | [
"public",
"final",
"void",
"printQuotedSymbol",
"(",
"CharSequence",
"text",
")",
"throws",
"IOException",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"appendAscii",
"(",
"\"null.symbol\"",
")",
";",
"}",
"else",
"{",
"appendAscii",
"(",
"'",
"'",
")",... | Print single-quoted Ion Symbol type
@param text
@throws IOException | [
"Print",
"single",
"-",
"quoted",
"Ion",
"Symbol",
"type"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonTextAppender.java#L558-L571 |
57,573 | amzn/ion-java | src/com/amazon/ion/impl/IonReaderTextSystemX.java | IonReaderTextSystemX.getSymbolTable | @Override
public SymbolTable getSymbolTable()
{
SymbolTable symtab = super.getSymbolTable();
if (symtab == null)
{
symtab = _system_symtab;
}
return symtab;
} | java | @Override
public SymbolTable getSymbolTable()
{
SymbolTable symtab = super.getSymbolTable();
if (symtab == null)
{
symtab = _system_symtab;
}
return symtab;
} | [
"@",
"Override",
"public",
"SymbolTable",
"getSymbolTable",
"(",
")",
"{",
"SymbolTable",
"symtab",
"=",
"super",
".",
"getSymbolTable",
"(",
")",
";",
"if",
"(",
"symtab",
"==",
"null",
")",
"{",
"symtab",
"=",
"_system_symtab",
";",
"}",
"return",
"symta... | Horrible temporary hack.
@return not null. | [
"Horrible",
"temporary",
"hack",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonReaderTextSystemX.java#L605-L614 |
57,574 | amzn/ion-java | src/com/amazon/ion/impl/bin/_Private_IonManagedBinaryWriterBuilder.java | _Private_IonManagedBinaryWriterBuilder.withFlatImports | public _Private_IonManagedBinaryWriterBuilder withFlatImports(final SymbolTable... tables)
{
if (tables != null)
{
return withFlatImports(Arrays.asList(tables));
}
return this;
} | java | public _Private_IonManagedBinaryWriterBuilder withFlatImports(final SymbolTable... tables)
{
if (tables != null)
{
return withFlatImports(Arrays.asList(tables));
}
return this;
} | [
"public",
"_Private_IonManagedBinaryWriterBuilder",
"withFlatImports",
"(",
"final",
"SymbolTable",
"...",
"tables",
")",
"{",
"if",
"(",
"tables",
"!=",
"null",
")",
"{",
"return",
"withFlatImports",
"(",
"Arrays",
".",
"asList",
"(",
"tables",
")",
")",
";",
... | Adds imports, flattening them to make lookup more efficient. This is particularly useful
when a builder instance is long lived. | [
"Adds",
"imports",
"flattening",
"them",
"to",
"make",
"lookup",
"more",
"efficient",
".",
"This",
"is",
"particularly",
"useful",
"when",
"a",
"builder",
"instance",
"is",
"long",
"lived",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/_Private_IonManagedBinaryWriterBuilder.java#L152-L159 |
57,575 | amzn/ion-java | src/com/amazon/ion/impl/_Private_IonWriterBase.java | _Private_IonWriterBase.writeValue | public void writeValue(IonReader reader) throws IOException
{
// TODO this should do symtab optimization as per writeValues()
IonType type = reader.getType();
writeValueRecursively(type, reader);
} | java | public void writeValue(IonReader reader) throws IOException
{
// TODO this should do symtab optimization as per writeValues()
IonType type = reader.getType();
writeValueRecursively(type, reader);
} | [
"public",
"void",
"writeValue",
"(",
"IonReader",
"reader",
")",
"throws",
"IOException",
"{",
"// TODO this should do symtab optimization as per writeValues()",
"IonType",
"type",
"=",
"reader",
".",
"getType",
"(",
")",
";",
"writeValueRecursively",
"(",
"type",
",",
... | Overrides can optimize special cases. | [
"Overrides",
"can",
"optimize",
"special",
"cases",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_IonWriterBase.java#L355-L360 |
57,576 | amzn/ion-java | src/com/amazon/ion/impl/lite/IonValueLite.java | IonValueLite.attemptClearSymbolIDValues | boolean attemptClearSymbolIDValues()
{
boolean sidsRemain = false;
if (_fieldName != null)
{
_fieldId = UNKNOWN_SYMBOL_ID;
} else if (_fieldId > UNKNOWN_SYMBOL_ID)
{
// retaining the field SID, as it couldn't be cleared due to loss of context
... | java | boolean attemptClearSymbolIDValues()
{
boolean sidsRemain = false;
if (_fieldName != null)
{
_fieldId = UNKNOWN_SYMBOL_ID;
} else if (_fieldId > UNKNOWN_SYMBOL_ID)
{
// retaining the field SID, as it couldn't be cleared due to loss of context
... | [
"boolean",
"attemptClearSymbolIDValues",
"(",
")",
"{",
"boolean",
"sidsRemain",
"=",
"false",
";",
"if",
"(",
"_fieldName",
"!=",
"null",
")",
"{",
"_fieldId",
"=",
"UNKNOWN_SYMBOL_ID",
";",
"}",
"else",
"if",
"(",
"_fieldId",
">",
"UNKNOWN_SYMBOL_ID",
")",
... | Sets this value's symbol table to null, and erases any SIDs here and
recursively.
@return true if all SID's have been successfully removed, otherwise false | [
"Sets",
"this",
"value",
"s",
"symbol",
"table",
"to",
"null",
"and",
"erases",
"any",
"SIDs",
"here",
"and",
"recursively",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/IonValueLite.java#L538-L571 |
57,577 | amzn/ion-java | src/com/amazon/ion/impl/lite/IonValueLite.java | IonValueLite.setFieldNameSymbol | final void setFieldNameSymbol(SymbolToken name)
{
assert _fieldId == UNKNOWN_SYMBOL_ID && _fieldName == null;
_fieldName = name.getText();
_fieldId = name.getSid();
// if a SID has been added by this operation to a previously SID-less node we have to mark upwards
// toward... | java | final void setFieldNameSymbol(SymbolToken name)
{
assert _fieldId == UNKNOWN_SYMBOL_ID && _fieldName == null;
_fieldName = name.getText();
_fieldId = name.getSid();
// if a SID has been added by this operation to a previously SID-less node we have to mark upwards
// toward... | [
"final",
"void",
"setFieldNameSymbol",
"(",
"SymbolToken",
"name",
")",
"{",
"assert",
"_fieldId",
"==",
"UNKNOWN_SYMBOL_ID",
"&&",
"_fieldName",
"==",
"null",
";",
"_fieldName",
"=",
"name",
".",
"getText",
"(",
")",
";",
"_fieldId",
"=",
"name",
".",
"getS... | Sets the field name and ID based on a SymbolToken.
Both parts of the SymbolToken are trusted!
@param name is not retained by this value, but both fields are copied. | [
"Sets",
"the",
"field",
"name",
"and",
"ID",
"based",
"on",
"a",
"SymbolToken",
".",
"Both",
"parts",
"of",
"the",
"SymbolToken",
"are",
"trusted!"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/IonValueLite.java#L598-L609 |
57,578 | amzn/ion-java | src/com/amazon/ion/impl/lite/IonValueLite.java | IonValueLite.detachFromContainer | final void detachFromContainer() // throws IOException
{
checkForLock();
clearSymbolIDValues();
_context = ContainerlessContext.wrap(getSystem());
_fieldName = null;
_fieldId = UNKNOWN_SYMBOL_ID;
_elementid(0);
} | java | final void detachFromContainer() // throws IOException
{
checkForLock();
clearSymbolIDValues();
_context = ContainerlessContext.wrap(getSystem());
_fieldName = null;
_fieldId = UNKNOWN_SYMBOL_ID;
_elementid(0);
} | [
"final",
"void",
"detachFromContainer",
"(",
")",
"// throws IOException",
"{",
"checkForLock",
"(",
")",
";",
"clearSymbolIDValues",
"(",
")",
";",
"_context",
"=",
"ContainerlessContext",
".",
"wrap",
"(",
"getSystem",
"(",
")",
")",
";",
"_fieldName",
"=",
... | Removes this value from its container, ensuring that all data stays
available. Dirties this value and it's original container. | [
"Removes",
"this",
"value",
"from",
"its",
"container",
"ensuring",
"that",
"all",
"data",
"stays",
"available",
".",
"Dirties",
"this",
"value",
"and",
"it",
"s",
"original",
"container",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/IonValueLite.java#L1080-L1090 |
57,579 | amzn/ion-java | src/com/amazon/ion/impl/IonUTF8.java | IonUTF8.convertToUTF8Bytes | public final static int convertToUTF8Bytes(int unicodeScalar, byte[] outputBytes, int offset, int maxLength)
{
int dst = offset;
int end = offset + maxLength;
switch (getUTF8ByteCount(unicodeScalar)) {
case 1:
if (dst >= end) throw new ArrayIndexOutOfBoundsException();
... | java | public final static int convertToUTF8Bytes(int unicodeScalar, byte[] outputBytes, int offset, int maxLength)
{
int dst = offset;
int end = offset + maxLength;
switch (getUTF8ByteCount(unicodeScalar)) {
case 1:
if (dst >= end) throw new ArrayIndexOutOfBoundsException();
... | [
"public",
"final",
"static",
"int",
"convertToUTF8Bytes",
"(",
"int",
"unicodeScalar",
",",
"byte",
"[",
"]",
"outputBytes",
",",
"int",
"offset",
",",
"int",
"maxLength",
")",
"{",
"int",
"dst",
"=",
"offset",
";",
"int",
"end",
"=",
"offset",
"+",
"max... | this helper converts the unicodeScalar to a sequence of utf8 bytes
and copies those bytes into the supplied outputBytes array. If there
is insufficient room in the array to hold the generated bytes it will
throw an ArrayIndexOutOfBoundsException. It does not check for the
validity of the passed in unicodeScalar thoro... | [
"this",
"helper",
"converts",
"the",
"unicodeScalar",
"to",
"a",
"sequence",
"of",
"utf8",
"bytes",
"and",
"copies",
"those",
"bytes",
"into",
"the",
"supplied",
"outputBytes",
"array",
".",
"If",
"there",
"is",
"insufficient",
"room",
"in",
"the",
"array",
... | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonUTF8.java#L209-L239 |
57,580 | amzn/ion-java | src/com/amazon/ion/impl/SimpleByteBuffer.java | SimpleByteBuffer.getBytes | public byte[] getBytes()
{
int length = _eob - _start;
byte[] copy = new byte[length];
System.arraycopy(_bytes, _start, copy, 0, length);
return copy;
} | java | public byte[] getBytes()
{
int length = _eob - _start;
byte[] copy = new byte[length];
System.arraycopy(_bytes, _start, copy, 0, length);
return copy;
} | [
"public",
"byte",
"[",
"]",
"getBytes",
"(",
")",
"{",
"int",
"length",
"=",
"_eob",
"-",
"_start",
";",
"byte",
"[",
"]",
"copy",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"_bytes",
",",
"_start",
",",
"copy",
... | Makes a copy of the internal byte array. | [
"Makes",
"a",
"copy",
"of",
"the",
"internal",
"byte",
"array",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/SimpleByteBuffer.java#L90-L96 |
57,581 | amzn/ion-java | src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java | IonRawBinaryWriter.prepareValue | private void prepareValue()
{
if (isInStruct() && currentFieldSid == null)
{
throw new IllegalStateException("IonWriter.setFieldName() must be called before writing a value into a struct.");
}
if (currentFieldSid != null)
{
checkSid(currentFieldSid);
... | java | private void prepareValue()
{
if (isInStruct() && currentFieldSid == null)
{
throw new IllegalStateException("IonWriter.setFieldName() must be called before writing a value into a struct.");
}
if (currentFieldSid != null)
{
checkSid(currentFieldSid);
... | [
"private",
"void",
"prepareValue",
"(",
")",
"{",
"if",
"(",
"isInStruct",
"(",
")",
"&&",
"currentFieldSid",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"IonWriter.setFieldName() must be called before writing a value into a struct.\"",
")",
... | prepare to write values with field name and annotations. | [
"prepare",
"to",
"write",
"values",
"with",
"field",
"name",
"and",
"annotations",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java#L780-L825 |
57,582 | amzn/ion-java | src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java | IonRawBinaryWriter.finishValue | private void finishValue()
{
final ContainerInfo current = currentContainer();
if (current != null && current.type == ContainerType.ANNOTATION)
{
// close out and patch the length
popContainer();
}
hasWrittenValuesSinceFinished = true;
hasWritt... | java | private void finishValue()
{
final ContainerInfo current = currentContainer();
if (current != null && current.type == ContainerType.ANNOTATION)
{
// close out and patch the length
popContainer();
}
hasWrittenValuesSinceFinished = true;
hasWritt... | [
"private",
"void",
"finishValue",
"(",
")",
"{",
"final",
"ContainerInfo",
"current",
"=",
"currentContainer",
"(",
")",
";",
"if",
"(",
"current",
"!=",
"null",
"&&",
"current",
".",
"type",
"==",
"ContainerType",
".",
"ANNOTATION",
")",
"{",
"// close out ... | Closes out annotations. | [
"Closes",
"out",
"annotations",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java#L828-L838 |
57,583 | amzn/ion-java | src/com/amazon/ion/impl/bin/Symbols.java | Symbols.symbol | public static SymbolToken symbol(final String name, final int val)
{
if (name == null) { throw new NullPointerException(); }
if (val <= 0) { throw new IllegalArgumentException("Symbol value must be positive: " + val); }
return new SymbolToken()
{
public String getText()
... | java | public static SymbolToken symbol(final String name, final int val)
{
if (name == null) { throw new NullPointerException(); }
if (val <= 0) { throw new IllegalArgumentException("Symbol value must be positive: " + val); }
return new SymbolToken()
{
public String getText()
... | [
"public",
"static",
"SymbolToken",
"symbol",
"(",
"final",
"String",
"name",
",",
"final",
"int",
"val",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"if",
"(",
"val",
"<=",
"0",
")"... | Constructs a token with a non-null name and positive value. | [
"Constructs",
"a",
"token",
"with",
"a",
"non",
"-",
"null",
"name",
"and",
"positive",
"value",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/Symbols.java#L59-L87 |
57,584 | amzn/ion-java | src/com/amazon/ion/impl/bin/Symbols.java | Symbols.symbolNameIterator | public static Iterator<String> symbolNameIterator(final Iterator<SymbolToken> tokenIter)
{
return new Iterator<String>()
{
public boolean hasNext()
{
return tokenIter.hasNext();
}
public String next()
{
retu... | java | public static Iterator<String> symbolNameIterator(final Iterator<SymbolToken> tokenIter)
{
return new Iterator<String>()
{
public boolean hasNext()
{
return tokenIter.hasNext();
}
public String next()
{
retu... | [
"public",
"static",
"Iterator",
"<",
"String",
">",
"symbolNameIterator",
"(",
"final",
"Iterator",
"<",
"SymbolToken",
">",
"tokenIter",
")",
"{",
"return",
"new",
"Iterator",
"<",
"String",
">",
"(",
")",
"{",
"public",
"boolean",
"hasNext",
"(",
")",
"{... | Lazy iterator over the symbol names of an iterator of symbol tokens. | [
"Lazy",
"iterator",
"over",
"the",
"symbol",
"names",
"of",
"an",
"iterator",
"of",
"symbol",
"tokens",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/Symbols.java#L90-L109 |
57,585 | amzn/ion-java | src/com/amazon/ion/impl/bin/Symbols.java | Symbols.systemSymbol | public static SymbolToken systemSymbol(final int sid) {
if (sid < 1 || sid > ION_1_0_MAX_ID)
{
throw new IllegalArgumentException("No such system SID: " + sid);
}
return SYSTEM_TOKENS.get(sid - 1);
} | java | public static SymbolToken systemSymbol(final int sid) {
if (sid < 1 || sid > ION_1_0_MAX_ID)
{
throw new IllegalArgumentException("No such system SID: " + sid);
}
return SYSTEM_TOKENS.get(sid - 1);
} | [
"public",
"static",
"SymbolToken",
"systemSymbol",
"(",
"final",
"int",
"sid",
")",
"{",
"if",
"(",
"sid",
"<",
"1",
"||",
"sid",
">",
"ION_1_0_MAX_ID",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"No such system SID: \"",
"+",
"sid",
")",
"... | Returns a symbol token for a system SID. | [
"Returns",
"a",
"symbol",
"token",
"for",
"a",
"system",
"SID",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/Symbols.java#L126-L132 |
57,586 | amzn/ion-java | src/com/amazon/ion/impl/bin/Symbols.java | Symbols.unknownSharedSymbolTable | public static SymbolTable unknownSharedSymbolTable(final String name,
final int version,
final int maxId)
{
return new AbstractSymbolTable(name, version)
{
public Iterator<Strin... | java | public static SymbolTable unknownSharedSymbolTable(final String name,
final int version,
final int maxId)
{
return new AbstractSymbolTable(name, version)
{
public Iterator<Strin... | [
"public",
"static",
"SymbolTable",
"unknownSharedSymbolTable",
"(",
"final",
"String",
"name",
",",
"final",
"int",
"version",
",",
"final",
"int",
"maxId",
")",
"{",
"return",
"new",
"AbstractSymbolTable",
"(",
"name",
",",
"version",
")",
"{",
"public",
"Ite... | Returns a substitute shared symbol table where none of the symbols are known. | [
"Returns",
"a",
"substitute",
"shared",
"symbol",
"table",
"where",
"none",
"of",
"the",
"symbols",
"are",
"known",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/bin/Symbols.java#L239-L338 |
57,587 | amzn/ion-java | src/com/amazon/ion/impl/_Private_CommandLine.java | _Private_CommandLine.main | public static void main(String[] args) throws IOException
{
process_command_line(args);
info = new JarInfo();
if (printVersion) {
doPrintVersion();
}
if (printHelp) {
doPrintHelp();
}
} | java | public static void main(String[] args) throws IOException
{
process_command_line(args);
info = new JarInfo();
if (printVersion) {
doPrintVersion();
}
if (printHelp) {
doPrintHelp();
}
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"IOException",
"{",
"process_command_line",
"(",
"args",
")",
";",
"info",
"=",
"new",
"JarInfo",
"(",
")",
";",
"if",
"(",
"printVersion",
")",
"{",
"doPrintVersion",
"(... | This main simply prints the version information to
allow users to identify the build version of the Jar.
@param args user command line flags | [
"This",
"main",
"simply",
"prints",
"the",
"version",
"information",
"to",
"allow",
"users",
"to",
"identify",
"the",
"build",
"version",
"of",
"the",
"Jar",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_CommandLine.java#L45-L57 |
57,588 | amzn/ion-java | src/com/amazon/ion/system/SystemFactory.java | SystemFactory.newSystem | @Deprecated
public static IonSystem newSystem(IonCatalog catalog)
{
return IonSystemBuilder.standard().withCatalog(catalog).build();
} | java | @Deprecated
public static IonSystem newSystem(IonCatalog catalog)
{
return IonSystemBuilder.standard().withCatalog(catalog).build();
} | [
"@",
"Deprecated",
"public",
"static",
"IonSystem",
"newSystem",
"(",
"IonCatalog",
"catalog",
")",
"{",
"return",
"IonSystemBuilder",
".",
"standard",
"(",
")",
".",
"withCatalog",
"(",
"catalog",
")",
".",
"build",
"(",
")",
";",
"}"
] | Constructs a new system instance with the given catalog.
@param catalog the catalog to use in the new system.
If null, a new {@link SimpleCatalog} will be used.
@return a new {@link IonSystem} instance; not null.
@deprecated Use {@link IonSystemBuilder IonSystemBuilder.standard().withCatalog(catalog).build()} instead... | [
"Constructs",
"a",
"new",
"system",
"instance",
"with",
"the",
"given",
"catalog",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/system/SystemFactory.java#L61-L65 |
57,589 | amzn/ion-java | src/com/amazon/ion/impl/IonReaderTextRawX.java | IonReaderTextRawX.tokenValueIsFinished | protected void tokenValueIsFinished()
{
_scanner.tokenIsFinished();
if (IonType.BLOB.equals(_value_type) || IonType.CLOB.equals(_value_type))
{
int state_after_scalar = get_state_after_value();
set_state(state_after_scalar);
}
} | java | protected void tokenValueIsFinished()
{
_scanner.tokenIsFinished();
if (IonType.BLOB.equals(_value_type) || IonType.CLOB.equals(_value_type))
{
int state_after_scalar = get_state_after_value();
set_state(state_after_scalar);
}
} | [
"protected",
"void",
"tokenValueIsFinished",
"(",
")",
"{",
"_scanner",
".",
"tokenIsFinished",
"(",
")",
";",
"if",
"(",
"IonType",
".",
"BLOB",
".",
"equals",
"(",
"_value_type",
")",
"||",
"IonType",
".",
"CLOB",
".",
"equals",
"(",
"_value_type",
")",
... | called by super classes to tell us that the
current token has been consumed. | [
"called",
"by",
"super",
"classes",
"to",
"tell",
"us",
"that",
"the",
"current",
"token",
"has",
"been",
"consumed",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonReaderTextRawX.java#L1181-L1189 |
57,590 | amzn/ion-java | src/com/amazon/ion/impl/IonReaderTextRawX.java | IonReaderTextRawX.isInStruct | public boolean isInStruct()
{
boolean in_struct = false;
IonType container = getContainerType();
if (IonType.STRUCT.equals(container)) {
if (getDepth() > 0) {
in_struct = true;
}
else {
assert(IonType.STRUCT.equals(_nesting_... | java | public boolean isInStruct()
{
boolean in_struct = false;
IonType container = getContainerType();
if (IonType.STRUCT.equals(container)) {
if (getDepth() > 0) {
in_struct = true;
}
else {
assert(IonType.STRUCT.equals(_nesting_... | [
"public",
"boolean",
"isInStruct",
"(",
")",
"{",
"boolean",
"in_struct",
"=",
"false",
";",
"IonType",
"container",
"=",
"getContainerType",
"(",
")",
";",
"if",
"(",
"IonType",
".",
"STRUCT",
".",
"equals",
"(",
"container",
")",
")",
"{",
"if",
"(",
... | we're not really in a struct, we at the top level | [
"we",
"re",
"not",
"really",
"in",
"a",
"struct",
"we",
"at",
"the",
"top",
"level"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonReaderTextRawX.java#L1226-L1239 |
57,591 | amzn/ion-java | src/com/amazon/ion/impl/IonReaderTextRawX.java | IonReaderTextRawX.is_in_struct_internal | private boolean is_in_struct_internal()
{
boolean in_struct = false;
IonType container = getContainerType();
if (IonType.STRUCT.equals(container)) {
in_struct = true;
}
return in_struct;
} | java | private boolean is_in_struct_internal()
{
boolean in_struct = false;
IonType container = getContainerType();
if (IonType.STRUCT.equals(container)) {
in_struct = true;
}
return in_struct;
} | [
"private",
"boolean",
"is_in_struct_internal",
"(",
")",
"{",
"boolean",
"in_struct",
"=",
"false",
";",
"IonType",
"container",
"=",
"getContainerType",
"(",
")",
";",
"if",
"(",
"IonType",
".",
"STRUCT",
".",
"equals",
"(",
"container",
")",
")",
"{",
"i... | have to ignore | [
"have",
"to",
"ignore"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonReaderTextRawX.java#L1244-L1252 |
57,592 | amzn/ion-java | src/com/amazon/ion/impl/UnifiedInputStreamX.java | UnifiedInputStreamX.getPosition | public long getPosition() {
long file_pos = 0;
UnifiedDataPageX page = _buffer.getCurrentPage();
if (page != null) {
file_pos = page.getFilePosition(_pos);
}
return file_pos;
} | java | public long getPosition() {
long file_pos = 0;
UnifiedDataPageX page = _buffer.getCurrentPage();
if (page != null) {
file_pos = page.getFilePosition(_pos);
}
return file_pos;
} | [
"public",
"long",
"getPosition",
"(",
")",
"{",
"long",
"file_pos",
"=",
"0",
";",
"UnifiedDataPageX",
"page",
"=",
"_buffer",
".",
"getCurrentPage",
"(",
")",
";",
"if",
"(",
"page",
"!=",
"null",
")",
"{",
"file_pos",
"=",
"page",
".",
"getFilePosition... | used to find the current position of this stream in the
input source.
@return current "file" position | [
"used",
"to",
"find",
"the",
"current",
"position",
"of",
"this",
"stream",
"in",
"the",
"input",
"source",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/UnifiedInputStreamX.java#L148-L155 |
57,593 | amzn/ion-java | src/com/amazon/ion/impl/UnifiedInputStreamX.java | UnifiedInputStreamX.read | public final int read(byte[] dst, int offset, int length) throws IOException
{
if (!is_byte_data()) {
throw new IOException("byte read is not support over character sources");
}
int remaining = length;
while (remaining > 0 && !isEOF()) {
int ready = _limit - _... | java | public final int read(byte[] dst, int offset, int length) throws IOException
{
if (!is_byte_data()) {
throw new IOException("byte read is not support over character sources");
}
int remaining = length;
while (remaining > 0 && !isEOF()) {
int ready = _limit - _... | [
"public",
"final",
"int",
"read",
"(",
"byte",
"[",
"]",
"dst",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"is_byte_data",
"(",
")",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"byte read is not sup... | It is unclear what the implication to the rest of the system to make it 'conform' | [
"It",
"is",
"unclear",
"what",
"the",
"implication",
"to",
"the",
"rest",
"of",
"the",
"system",
"to",
"make",
"it",
"conform"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/UnifiedInputStreamX.java#L365-L385 |
57,594 | amzn/ion-java | src/com/amazon/ion/impl/UnifiedInputStreamX.java | UnifiedInputStreamX.refill | protected int refill() throws IOException
{
UnifiedDataPageX curr = _buffer.getCurrentPage();
SavePoint sp = _save_points.savePointActiveTop();
if (!can_fill_new_page()) {
// aka: there can be only one!
// (and it's used up)
return refill_is_eof();
... | java | protected int refill() throws IOException
{
UnifiedDataPageX curr = _buffer.getCurrentPage();
SavePoint sp = _save_points.savePointActiveTop();
if (!can_fill_new_page()) {
// aka: there can be only one!
// (and it's used up)
return refill_is_eof();
... | [
"protected",
"int",
"refill",
"(",
")",
"throws",
"IOException",
"{",
"UnifiedDataPageX",
"curr",
"=",
"_buffer",
".",
"getCurrentPage",
"(",
")",
";",
"SavePoint",
"sp",
"=",
"_save_points",
".",
"savePointActiveTop",
"(",
")",
";",
"if",
"(",
"!",
"can_fil... | the refill method is the key override that is filled in by
the various subclasses. It fills either the byte or char
array with a block of data from the input source. As this
is a virtual function the right version will get called for
each source type. Since it is only called once per block,
and from then on the fina... | [
"the",
"refill",
"method",
"is",
"the",
"key",
"override",
"that",
"is",
"filled",
"in",
"by",
"the",
"various",
"subclasses",
".",
"It",
"fills",
"either",
"the",
"byte",
"or",
"char",
"array",
"with",
"a",
"block",
"of",
"data",
"from",
"the",
"input",... | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/UnifiedInputStreamX.java#L412-L492 |
57,595 | amzn/ion-java | src/com/amazon/ion/impl/BlockedBuffer.java | BlockedBuffer.init | private bbBlock init(int initialSize, bbBlock initialBlock)
{
this._lastCapacity = BlockedBuffer._defaultBlockSizeMin;
this._blockSizeUpperLimit = BlockedBuffer._defaultBlockSizeUpperLimit;
while (this._lastCapacity < initialSize &&
this._lastCapacity < this._blockSizeUpperLim... | java | private bbBlock init(int initialSize, bbBlock initialBlock)
{
this._lastCapacity = BlockedBuffer._defaultBlockSizeMin;
this._blockSizeUpperLimit = BlockedBuffer._defaultBlockSizeUpperLimit;
while (this._lastCapacity < initialSize &&
this._lastCapacity < this._blockSizeUpperLim... | [
"private",
"bbBlock",
"init",
"(",
"int",
"initialSize",
",",
"bbBlock",
"initialBlock",
")",
"{",
"this",
".",
"_lastCapacity",
"=",
"BlockedBuffer",
".",
"_defaultBlockSizeMin",
";",
"this",
".",
"_blockSizeUpperLimit",
"=",
"BlockedBuffer",
".",
"_defaultBlockSiz... | Initializes the various members such as the block arraylist
the initial block and the various values like the block size upper limit.
@param initialSize or 0
@param initialBlock or null
@return bbBlock the initial current block | [
"Initializes",
"the",
"various",
"members",
"such",
"as",
"the",
"block",
"arraylist",
"the",
"initial",
"block",
"and",
"the",
"various",
"values",
"like",
"the",
"block",
"size",
"upper",
"limit",
"."
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/BlockedBuffer.java#L205-L233 |
57,596 | amzn/ion-java | src/com/amazon/ion/impl/BlockedBuffer.java | BlockedBuffer.clear | private void clear(Object caller, int version) {
assert mutation_in_progress(caller, version);
_buf_limit = 0;
for (int ii=0; ii<_blocks.size(); ii++) {
_blocks.get(ii).clearBlock();
// _blocks.get(ii)._idx = -1; this is done in clearBlock()
}
bbBlock firs... | java | private void clear(Object caller, int version) {
assert mutation_in_progress(caller, version);
_buf_limit = 0;
for (int ii=0; ii<_blocks.size(); ii++) {
_blocks.get(ii).clearBlock();
// _blocks.get(ii)._idx = -1; this is done in clearBlock()
}
bbBlock firs... | [
"private",
"void",
"clear",
"(",
"Object",
"caller",
",",
"int",
"version",
")",
"{",
"assert",
"mutation_in_progress",
"(",
"caller",
",",
"version",
")",
";",
"_buf_limit",
"=",
"0",
";",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"_blocks",
... | empties the entire contents of the buffer | [
"empties",
"the",
"entire",
"contents",
"of",
"the",
"buffer"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/BlockedBuffer.java#L244-L257 |
57,597 | amzn/ion-java | src/com/amazon/ion/impl/BlockedBuffer.java | BlockedBuffer.truncate | bbBlock truncate(Object caller, int version, int pos) {
assert mutation_in_progress(caller, version);
if (0 > pos || pos > this._buf_limit )
throw new IllegalArgumentException();
// clear out all the blocks in use from the last in use
// to the block where the eof will be loc... | java | bbBlock truncate(Object caller, int version, int pos) {
assert mutation_in_progress(caller, version);
if (0 > pos || pos > this._buf_limit )
throw new IllegalArgumentException();
// clear out all the blocks in use from the last in use
// to the block where the eof will be loc... | [
"bbBlock",
"truncate",
"(",
"Object",
"caller",
",",
"int",
"version",
",",
"int",
"pos",
")",
"{",
"assert",
"mutation_in_progress",
"(",
"caller",
",",
"version",
")",
";",
"if",
"(",
"0",
">",
"pos",
"||",
"pos",
">",
"this",
".",
"_buf_limit",
")",... | treat the limit as the end of file | [
"treat",
"the",
"limit",
"as",
"the",
"end",
"of",
"file"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/BlockedBuffer.java#L261-L284 |
57,598 | amzn/ion-java | src/com/amazon/ion/impl/BlockedBuffer.java | BlockedBuffer.insert | int insert(Object caller, int version, bbBlock curr, int pos, int len)
{
assert mutation_in_progress(caller, version);
// DEBUG: int amountMoved = 0;
// DEBUG: int before = this._buf_limit;
// DEBUG: assert _validate();
// if there's room in the current block - just
/... | java | int insert(Object caller, int version, bbBlock curr, int pos, int len)
{
assert mutation_in_progress(caller, version);
// DEBUG: int amountMoved = 0;
// DEBUG: int before = this._buf_limit;
// DEBUG: assert _validate();
// if there's room in the current block - just
/... | [
"int",
"insert",
"(",
"Object",
"caller",
",",
"int",
"version",
",",
"bbBlock",
"curr",
",",
"int",
"pos",
",",
"int",
"len",
")",
"{",
"assert",
"mutation_in_progress",
"(",
"caller",
",",
"version",
")",
";",
"// DEBUG: int amountMoved = 0;",
"// DEBUG: int... | dispatcher for the various forms of insert we encounter
calls one of the four helpers depending on the case
that is needed to inser here
@param len number of bytes to make space for
@return int number of bytes inserted | [
"dispatcher",
"for",
"the",
"various",
"forms",
"of",
"insert",
"we",
"encounter",
"calls",
"one",
"of",
"the",
"four",
"helpers",
"depending",
"on",
"the",
"case",
"that",
"is",
"needed",
"to",
"inser",
"here"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/BlockedBuffer.java#L486-L559 |
57,599 | amzn/ion-java | src/com/amazon/ion/impl/BlockedBuffer.java | BlockedBuffer.insertInCurrOnly | private int insertInCurrOnly(Object caller, int version, bbBlock curr, int pos, int len)
{
assert mutation_in_progress(caller, version);
// the space we need is available right in the block
assert curr.unusedBlockCapacity() >= len;
System.arraycopy(curr._buffer, curr.blockOffsetFromA... | java | private int insertInCurrOnly(Object caller, int version, bbBlock curr, int pos, int len)
{
assert mutation_in_progress(caller, version);
// the space we need is available right in the block
assert curr.unusedBlockCapacity() >= len;
System.arraycopy(curr._buffer, curr.blockOffsetFromA... | [
"private",
"int",
"insertInCurrOnly",
"(",
"Object",
"caller",
",",
"int",
"version",
",",
"bbBlock",
"curr",
",",
"int",
"pos",
",",
"int",
"len",
")",
"{",
"assert",
"mutation_in_progress",
"(",
"caller",
",",
"version",
")",
";",
"// the space we need is av... | this handles insert when there's enough room in the
current block | [
"this",
"handles",
"insert",
"when",
"there",
"s",
"enough",
"room",
"in",
"the",
"current",
"block"
] | 4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270 | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/BlockedBuffer.java#L564-L575 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.