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
32,800
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/CustomSkill.java
CustomSkill.invoke
protected ResponseEnvelope invoke(UnmarshalledRequest<RequestEnvelope> unmarshalledRequest, Object context) { RequestEnvelope requestEnvelope = unmarshalledRequest.getUnmarshalledRequest(); JsonNode requestEnvelopeJson = unmarshalledRequest.getRequestJson(); if (skillId != null && !requestEnvel...
java
protected ResponseEnvelope invoke(UnmarshalledRequest<RequestEnvelope> unmarshalledRequest, Object context) { RequestEnvelope requestEnvelope = unmarshalledRequest.getUnmarshalledRequest(); JsonNode requestEnvelopeJson = unmarshalledRequest.getRequestJson(); if (skillId != null && !requestEnvel...
[ "protected", "ResponseEnvelope", "invoke", "(", "UnmarshalledRequest", "<", "RequestEnvelope", ">", "unmarshalledRequest", ",", "Object", "context", ")", "{", "RequestEnvelope", "requestEnvelope", "=", "unmarshalledRequest", ".", "getUnmarshalledRequest", "(", ")", ";", ...
Invokes the dispatcher to handler the request envelope and construct the handler input @param unmarshalledRequest unmarshalled output from {@link JacksonJsonUnmarshaller}, containing a {@link RequestEnvelope} and a JSON representation of the request. @param context context @return optional request envelope
[ "Invokes", "the", "dispatcher", "to", "handler", "the", "request", "envelope", "and", "construct", "the", "handler", "input" ]
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/CustomSkill.java#L80-L109
32,801
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/SkillRequestSignatureVerifier.java
SkillRequestSignatureVerifier.retrieveAndVerifyCertificateChain
private X509Certificate retrieveAndVerifyCertificateChain( final String signingCertificateChainUrl) throws CertificateException { try (InputStream in = proxy != null ? getAndVerifySigningCertificateChainUrl(signingCertificateChainUrl).openConnection(proxy).getInputStream() ...
java
private X509Certificate retrieveAndVerifyCertificateChain( final String signingCertificateChainUrl) throws CertificateException { try (InputStream in = proxy != null ? getAndVerifySigningCertificateChainUrl(signingCertificateChainUrl).openConnection(proxy).getInputStream() ...
[ "private", "X509Certificate", "retrieveAndVerifyCertificateChain", "(", "final", "String", "signingCertificateChainUrl", ")", "throws", "CertificateException", "{", "try", "(", "InputStream", "in", "=", "proxy", "!=", "null", "?", "getAndVerifySigningCertificateChainUrl", "...
Retrieves the certificate from the specified URL and confirms that the certificate is valid. @param signingCertificateChainUrl the URL to retrieve the certificate chain from @return the certificate at the specified URL, if the certificate is valid @throws CertificateException if the certificate cannot be retrieve or i...
[ "Retrieves", "the", "certificate", "from", "the", "specified", "URL", "and", "confirms", "that", "the", "certificate", "is", "valid", "." ]
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/SkillRequestSignatureVerifier.java#L124-L177
32,802
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/request/Predicates.java
Predicates.requestType
public static <T extends Request> Predicate<HandlerInput> requestType(Class<T> requestType) { return i -> requestType.isInstance(i.getRequestEnvelope().getRequest()); }
java
public static <T extends Request> Predicate<HandlerInput> requestType(Class<T> requestType) { return i -> requestType.isInstance(i.getRequestEnvelope().getRequest()); }
[ "public", "static", "<", "T", "extends", "Request", ">", "Predicate", "<", "HandlerInput", ">", "requestType", "(", "Class", "<", "T", ">", "requestType", ")", "{", "return", "i", "->", "requestType", ".", "isInstance", "(", "i", ".", "getRequestEnvelope", ...
Returns a predicate that returns to true if the incoming request is an instance of the given request class. @param <T> class of the request to evaluate against @param requestType request type to evaluate against @return true if the incoming request is an instance of the given request class
[ "Returns", "a", "predicate", "that", "returns", "to", "true", "if", "the", "incoming", "request", "is", "an", "instance", "of", "the", "given", "request", "class", "." ]
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/request/Predicates.java#L41-L43
32,803
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/response/template/loader/impl/LocaleTemplateEnumerator.java
LocaleTemplateEnumerator.next
@Override public String next() { if (hasNext()) { if (enumerationSize == NULL_LOCALE_ENUMERATION_SIZE) { cursor++; return templateName; } final String language = matcher.group(1); final String country = matcher.group(2); ...
java
@Override public String next() { if (hasNext()) { if (enumerationSize == NULL_LOCALE_ENUMERATION_SIZE) { cursor++; return templateName; } final String language = matcher.group(1); final String country = matcher.group(2); ...
[ "@", "Override", "public", "String", "next", "(", ")", "{", "if", "(", "hasNext", "(", ")", ")", "{", "if", "(", "enumerationSize", "==", "NULL_LOCALE_ENUMERATION_SIZE", ")", "{", "cursor", "++", ";", "return", "templateName", ";", "}", "final", "String", ...
Generate the next combination of template name and return. @return the next combination of template name
[ "Generate", "the", "next", "combination", "of", "template", "name", "and", "return", "." ]
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/response/template/loader/impl/LocaleTemplateEnumerator.java#L79-L100
32,804
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/attributes/AttributesManager.java
AttributesManager.setSessionAttributes
public void setSessionAttributes(Map<String, Object> sessionAttributes) { if (requestEnvelope.getSession() == null) { throw new IllegalStateException("Attempting to set session attributes for out of session request"); } this.sessionAttributes = sessionAttributes; }
java
public void setSessionAttributes(Map<String, Object> sessionAttributes) { if (requestEnvelope.getSession() == null) { throw new IllegalStateException("Attempting to set session attributes for out of session request"); } this.sessionAttributes = sessionAttributes; }
[ "public", "void", "setSessionAttributes", "(", "Map", "<", "String", ",", "Object", ">", "sessionAttributes", ")", "{", "if", "(", "requestEnvelope", ".", "getSession", "(", ")", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Attempti...
Sets session attributes, replacing any existing attributes already present in the session. An exception is thrown if this method is called while processing an out of session request. Use this method when bulk replacing attributes is desired. @param sessionAttributes session attributes to set @throws IllegalStateExcept...
[ "Sets", "session", "attributes", "replacing", "any", "existing", "attributes", "already", "present", "in", "the", "session", ".", "An", "exception", "is", "thrown", "if", "this", "method", "is", "called", "while", "processing", "an", "out", "of", "session", "r...
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/attributes/AttributesManager.java#L105-L110
32,805
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-dynamodb-persistence-adapter/src/com/amazon/ask/attributes/persistence/impl/PartitionKeyGenerators.java
PartitionKeyGenerators.userId
public static Function<RequestEnvelope, String> userId() { return r -> Optional.ofNullable(r).map(RequestEnvelope::getContext) .map(Context::getSystem) .map(SystemState::getUser) .map(User::getUserId) .orElseThrow(() -> new PersistenceException("Co...
java
public static Function<RequestEnvelope, String> userId() { return r -> Optional.ofNullable(r).map(RequestEnvelope::getContext) .map(Context::getSystem) .map(SystemState::getUser) .map(User::getUserId) .orElseThrow(() -> new PersistenceException("Co...
[ "public", "static", "Function", "<", "RequestEnvelope", ",", "String", ">", "userId", "(", ")", "{", "return", "r", "->", "Optional", ".", "ofNullable", "(", "r", ")", ".", "map", "(", "RequestEnvelope", "::", "getContext", ")", ".", "map", "(", "Context...
Produces a partition key from the user ID contained in an incoming request. @return partition key derived from user ID @throws PersistenceException if user ID cannot be retrieved
[ "Produces", "a", "partition", "key", "from", "the", "user", "ID", "contained", "in", "an", "incoming", "request", "." ]
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-dynamodb-persistence-adapter/src/com/amazon/ask/attributes/persistence/impl/PartitionKeyGenerators.java#L36-L42
32,806
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-dynamodb-persistence-adapter/src/com/amazon/ask/attributes/persistence/impl/PartitionKeyGenerators.java
PartitionKeyGenerators.deviceId
public static Function<RequestEnvelope, String> deviceId() { return r -> Optional.ofNullable(r).map(RequestEnvelope::getContext) .map(Context::getSystem) .map(SystemState::getDevice) .map(Device::getDeviceId) .orElseThrow(() -> new PersistenceExcep...
java
public static Function<RequestEnvelope, String> deviceId() { return r -> Optional.ofNullable(r).map(RequestEnvelope::getContext) .map(Context::getSystem) .map(SystemState::getDevice) .map(Device::getDeviceId) .orElseThrow(() -> new PersistenceExcep...
[ "public", "static", "Function", "<", "RequestEnvelope", ",", "String", ">", "deviceId", "(", ")", "{", "return", "r", "->", "Optional", ".", "ofNullable", "(", "r", ")", ".", "map", "(", "RequestEnvelope", "::", "getContext", ")", ".", "map", "(", "Conte...
Produces a partition key from the device ID contained in an incoming request. @return partition key derived from device ID @throws PersistenceException if device ID cannot be retrieved
[ "Produces", "a", "partition", "key", "from", "the", "device", "ID", "contained", "in", "an", "incoming", "request", "." ]
c49194da0693898c70f3f2c4a372f5a12da04e3e
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-dynamodb-persistence-adapter/src/com/amazon/ask/attributes/persistence/impl/PartitionKeyGenerators.java#L49-L55
32,807
pf4j/pf4j
pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java
DefaultPluginFactory.create
@Override public Plugin create(final PluginWrapper pluginWrapper) { String pluginClassName = pluginWrapper.getDescriptor().getPluginClass(); log.debug("Create instance for plugin '{}'", pluginClassName); Class<?> pluginClass; try { pluginClass = pluginWrapper.getPluginCl...
java
@Override public Plugin create(final PluginWrapper pluginWrapper) { String pluginClassName = pluginWrapper.getDescriptor().getPluginClass(); log.debug("Create instance for plugin '{}'", pluginClassName); Class<?> pluginClass; try { pluginClass = pluginWrapper.getPluginCl...
[ "@", "Override", "public", "Plugin", "create", "(", "final", "PluginWrapper", "pluginWrapper", ")", "{", "String", "pluginClassName", "=", "pluginWrapper", ".", "getDescriptor", "(", ")", ".", "getPluginClass", "(", ")", ";", "log", ".", "debug", "(", "\"Creat...
Creates a plugin instance. If an error occurs than that error is logged and the method returns null. @param pluginWrapper @return
[ "Creates", "a", "plugin", "instance", ".", "If", "an", "error", "occurs", "than", "that", "error", "is", "logged", "and", "the", "method", "returns", "null", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java#L39-L70
32,808
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/DirectedGraph.java
DirectedGraph.addVertex
public void addVertex(V vertex) { if (containsVertex(vertex)) { return; } neighbors.put(vertex, new ArrayList<V>()); }
java
public void addVertex(V vertex) { if (containsVertex(vertex)) { return; } neighbors.put(vertex, new ArrayList<V>()); }
[ "public", "void", "addVertex", "(", "V", "vertex", ")", "{", "if", "(", "containsVertex", "(", "vertex", ")", ")", "{", "return", ";", "}", "neighbors", ".", "put", "(", "vertex", ",", "new", "ArrayList", "<", "V", ">", "(", ")", ")", ";", "}" ]
Add a vertex to the graph. Nothing happens if vertex is already in graph.
[ "Add", "a", "vertex", "to", "the", "graph", ".", "Nothing", "happens", "if", "vertex", "is", "already", "in", "graph", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/DirectedGraph.java#L42-L48
32,809
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/DirectedGraph.java
DirectedGraph.addEdge
public void addEdge(V from, V to) { addVertex(from); addVertex(to); neighbors.get(from).add(to); }
java
public void addEdge(V from, V to) { addVertex(from); addVertex(to); neighbors.get(from).add(to); }
[ "public", "void", "addEdge", "(", "V", "from", ",", "V", "to", ")", "{", "addVertex", "(", "from", ")", ";", "addVertex", "(", "to", ")", ";", "neighbors", ".", "get", "(", "from", ")", ".", "add", "(", "to", ")", ";", "}" ]
Add an edge to the graph; if either vertex does not exist, it's added. This implementation allows the creation of multi-edges and self-loops.
[ "Add", "an", "edge", "to", "the", "graph", ";", "if", "either", "vertex", "does", "not", "exist", "it", "s", "added", ".", "This", "implementation", "allows", "the", "creation", "of", "multi", "-", "edges", "and", "self", "-", "loops", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/DirectedGraph.java#L65-L69
32,810
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/DirectedGraph.java
DirectedGraph.removeEdge
public void removeEdge(V from, V to) { if (!containsVertex(from)) { throw new IllegalArgumentException("Nonexistent vertex " + from); } if (!containsVertex(to)) { throw new IllegalArgumentException("Nonexistent vertex " + to); } neighbors.get(from).remov...
java
public void removeEdge(V from, V to) { if (!containsVertex(from)) { throw new IllegalArgumentException("Nonexistent vertex " + from); } if (!containsVertex(to)) { throw new IllegalArgumentException("Nonexistent vertex " + to); } neighbors.get(from).remov...
[ "public", "void", "removeEdge", "(", "V", "from", ",", "V", "to", ")", "{", "if", "(", "!", "containsVertex", "(", "from", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Nonexistent vertex \"", "+", "from", ")", ";", "}", "if", "(", ...
Remove an edge from the graph. Nothing happens if no such edge. @throws {@link IllegalArgumentException} if either vertex doesn't exist.
[ "Remove", "an", "edge", "from", "the", "graph", ".", "Nothing", "happens", "if", "no", "such", "edge", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/DirectedGraph.java#L75-L85
32,811
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.getPlugins
@Override public List<PluginWrapper> getPlugins(PluginState pluginState) { List<PluginWrapper> plugins = new ArrayList<>(); for (PluginWrapper plugin : getPlugins()) { if (pluginState.equals(plugin.getPluginState())) { plugins.add(plugin); } } ...
java
@Override public List<PluginWrapper> getPlugins(PluginState pluginState) { List<PluginWrapper> plugins = new ArrayList<>(); for (PluginWrapper plugin : getPlugins()) { if (pluginState.equals(plugin.getPluginState())) { plugins.add(plugin); } } ...
[ "@", "Override", "public", "List", "<", "PluginWrapper", ">", "getPlugins", "(", "PluginState", "pluginState", ")", "{", "List", "<", "PluginWrapper", ">", "plugins", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "PluginWrapper", "plugin", ":", ...
Returns a copy of plugins with that state.
[ "Returns", "a", "copy", "of", "plugins", "with", "that", "state", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L143-L153
32,812
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.loadPlugins
@Override public void loadPlugins() { log.debug("Lookup plugins in '{}'", pluginsRoot); // check for plugins root if (Files.notExists(pluginsRoot) || !Files.isDirectory(pluginsRoot)) { log.warn("No '{}' root", pluginsRoot); return; } // get all plugin...
java
@Override public void loadPlugins() { log.debug("Lookup plugins in '{}'", pluginsRoot); // check for plugins root if (Files.notExists(pluginsRoot) || !Files.isDirectory(pluginsRoot)) { log.warn("No '{}' root", pluginsRoot); return; } // get all plugin...
[ "@", "Override", "public", "void", "loadPlugins", "(", ")", "{", "log", ".", "debug", "(", "\"Lookup plugins in '{}'\"", ",", "pluginsRoot", ")", ";", "// check for plugins root", "if", "(", "Files", ".", "notExists", "(", "pluginsRoot", ")", "||", "!", "Files...
Load plugins.
[ "Load", "plugins", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L200-L235
32,813
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.startPlugins
@Override public void startPlugins() { for (PluginWrapper pluginWrapper : resolvedPlugins) { PluginState pluginState = pluginWrapper.getPluginState(); if ((PluginState.DISABLED != pluginState) && (PluginState.STARTED != pluginState)) { try { log.in...
java
@Override public void startPlugins() { for (PluginWrapper pluginWrapper : resolvedPlugins) { PluginState pluginState = pluginWrapper.getPluginState(); if ((PluginState.DISABLED != pluginState) && (PluginState.STARTED != pluginState)) { try { log.in...
[ "@", "Override", "public", "void", "startPlugins", "(", ")", "{", "for", "(", "PluginWrapper", "pluginWrapper", ":", "resolvedPlugins", ")", "{", "PluginState", "pluginState", "=", "pluginWrapper", ".", "getPluginState", "(", ")", ";", "if", "(", "(", "PluginS...
Start all active plugins.
[ "Start", "all", "active", "plugins", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L322-L339
32,814
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.startPlugin
@Override public PluginState startPlugin(String pluginId) { checkPluginId(pluginId); PluginWrapper pluginWrapper = getPlugin(pluginId); PluginDescriptor pluginDescriptor = pluginWrapper.getDescriptor(); PluginState pluginState = pluginWrapper.getPluginState(); if (PluginStat...
java
@Override public PluginState startPlugin(String pluginId) { checkPluginId(pluginId); PluginWrapper pluginWrapper = getPlugin(pluginId); PluginDescriptor pluginDescriptor = pluginWrapper.getDescriptor(); PluginState pluginState = pluginWrapper.getPluginState(); if (PluginStat...
[ "@", "Override", "public", "PluginState", "startPlugin", "(", "String", "pluginId", ")", "{", "checkPluginId", "(", "pluginId", ")", ";", "PluginWrapper", "pluginWrapper", "=", "getPlugin", "(", "pluginId", ")", ";", "PluginDescriptor", "pluginDescriptor", "=", "p...
Start the specified plugin and its dependencies.
[ "Start", "the", "specified", "plugin", "and", "its", "dependencies", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L344-L384
32,815
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.stopPlugins
@Override public void stopPlugins() { // stop started plugins in reverse order Collections.reverse(startedPlugins); Iterator<PluginWrapper> itr = startedPlugins.iterator(); while (itr.hasNext()) { PluginWrapper pluginWrapper = itr.next(); PluginState pluginSta...
java
@Override public void stopPlugins() { // stop started plugins in reverse order Collections.reverse(startedPlugins); Iterator<PluginWrapper> itr = startedPlugins.iterator(); while (itr.hasNext()) { PluginWrapper pluginWrapper = itr.next(); PluginState pluginSta...
[ "@", "Override", "public", "void", "stopPlugins", "(", ")", "{", "// stop started plugins in reverse order", "Collections", ".", "reverse", "(", "startedPlugins", ")", ";", "Iterator", "<", "PluginWrapper", ">", "itr", "=", "startedPlugins", ".", "iterator", "(", ...
Stop all active plugins.
[ "Stop", "all", "active", "plugins", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L389-L410
32,816
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.idForPath
protected String idForPath(Path pluginPath) { for (PluginWrapper plugin : plugins.values()) { if (plugin.getPluginPath().equals(pluginPath)) { return plugin.getPluginId(); } } return null; }
java
protected String idForPath(Path pluginPath) { for (PluginWrapper plugin : plugins.values()) { if (plugin.getPluginPath().equals(pluginPath)) { return plugin.getPluginId(); } } return null; }
[ "protected", "String", "idForPath", "(", "Path", "pluginPath", ")", "{", "for", "(", "PluginWrapper", "plugin", ":", "plugins", ".", "values", "(", ")", ")", "{", "if", "(", "plugin", ".", "getPluginPath", "(", ")", ".", "equals", "(", "pluginPath", ")",...
Tests for already loaded plugins on given path. @param pluginPath the path to investigate @return id of plugin or null if not loaded
[ "Tests", "for", "already", "loaded", "plugins", "on", "given", "path", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L896-L904
32,817
pf4j/pf4j
pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
AbstractPluginManager.validatePluginDescriptor
protected void validatePluginDescriptor(PluginDescriptor descriptor) throws PluginException { if (StringUtils.isNullOrEmpty(descriptor.getPluginId())) { throw new PluginException("Field 'id' cannot be empty"); } if (descriptor.getVersion() == null) { throw new PluginExce...
java
protected void validatePluginDescriptor(PluginDescriptor descriptor) throws PluginException { if (StringUtils.isNullOrEmpty(descriptor.getPluginId())) { throw new PluginException("Field 'id' cannot be empty"); } if (descriptor.getVersion() == null) { throw new PluginExce...
[ "protected", "void", "validatePluginDescriptor", "(", "PluginDescriptor", "descriptor", ")", "throws", "PluginException", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "descriptor", ".", "getPluginId", "(", ")", ")", ")", "{", "throw", "new", "PluginEx...
Override this to change the validation criteria. @param descriptor the plugin descriptor to validate @throws PluginException if validation fails
[ "Override", "this", "to", "change", "the", "validation", "criteria", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java#L912-L920
32,818
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/FileUtils.java
FileUtils.findWithEnding
public static Path findWithEnding(Path basePath, String... endings) { for (String ending : endings) { Path newPath = basePath.resolveSibling(basePath.getFileName() + ending); if (Files.exists(newPath)) { return newPath; } } return null; }
java
public static Path findWithEnding(Path basePath, String... endings) { for (String ending : endings) { Path newPath = basePath.resolveSibling(basePath.getFileName() + ending); if (Files.exists(newPath)) { return newPath; } } return null; }
[ "public", "static", "Path", "findWithEnding", "(", "Path", "basePath", ",", "String", "...", "endings", ")", "{", "for", "(", "String", "ending", ":", "endings", ")", "{", "Path", "newPath", "=", "basePath", ".", "resolveSibling", "(", "basePath", ".", "ge...
Finds a path with various endings or null if not found. @param basePath the base name @param endings a list of endings to search for @return new path or null if not found
[ "Finds", "a", "path", "with", "various", "endings", "or", "null", "if", "not", "found", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/FileUtils.java#L133-L142
32,819
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/FileUtils.java
FileUtils.isZipFile
public static boolean isZipFile(Path path) { return Files.isRegularFile(path) && path.toString().toLowerCase().endsWith(".zip"); }
java
public static boolean isZipFile(Path path) { return Files.isRegularFile(path) && path.toString().toLowerCase().endsWith(".zip"); }
[ "public", "static", "boolean", "isZipFile", "(", "Path", "path", ")", "{", "return", "Files", ".", "isRegularFile", "(", "path", ")", "&&", "path", ".", "toString", "(", ")", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "\".zip\"", ")", ";", "}"...
Return true only if path is a zip file. @param path to a file/dir @return true if file with {@code .zip} ending
[ "Return", "true", "only", "if", "path", "is", "a", "zip", "file", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/FileUtils.java#L203-L205
32,820
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/FileUtils.java
FileUtils.isJarFile
public static boolean isJarFile(Path path) { return Files.isRegularFile(path) && path.toString().toLowerCase().endsWith(".jar"); }
java
public static boolean isJarFile(Path path) { return Files.isRegularFile(path) && path.toString().toLowerCase().endsWith(".jar"); }
[ "public", "static", "boolean", "isJarFile", "(", "Path", "path", ")", "{", "return", "Files", ".", "isRegularFile", "(", "path", ")", "&&", "path", ".", "toString", "(", ")", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "\".jar\"", ")", ";", "}"...
Return true only if path is a jar file. @param path to a file/dir @return true if file with {@code .jar} ending
[ "Return", "true", "only", "if", "path", "is", "a", "jar", "file", "." ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/FileUtils.java#L213-L215
32,821
pf4j/pf4j
pf4j/src/main/java/org/pf4j/DefaultPluginManager.java
DefaultPluginManager.loadPluginFromPath
@Override protected PluginWrapper loadPluginFromPath(Path pluginPath) throws PluginException { // First unzip any ZIP files try { pluginPath = FileUtils.expandIfZip(pluginPath); } catch (Exception e) { log.warn("Failed to unzip " + pluginPath, e); return n...
java
@Override protected PluginWrapper loadPluginFromPath(Path pluginPath) throws PluginException { // First unzip any ZIP files try { pluginPath = FileUtils.expandIfZip(pluginPath); } catch (Exception e) { log.warn("Failed to unzip " + pluginPath, e); return n...
[ "@", "Override", "protected", "PluginWrapper", "loadPluginFromPath", "(", "Path", "pluginPath", ")", "throws", "PluginException", "{", "// First unzip any ZIP files", "try", "{", "pluginPath", "=", "FileUtils", ".", "expandIfZip", "(", "pluginPath", ")", ";", "}", "...
Load a plugin from disk. If the path is a zip file, first unpack @param pluginPath plugin location on disk @return PluginWrapper for the loaded plugin or null if not loaded @throws PluginException if problems during load
[ "Load", "a", "plugin", "from", "disk", ".", "If", "the", "path", "is", "a", "zip", "file", "first", "unpack" ]
6dd7a6069f0e2fbd842c81e2c8c388918b88ea81
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/DefaultPluginManager.java#L136-L147
32,822
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLContextSpi.java
SSLContextSpi.engineGetSupportedSSLParameters
protected SSLParameters engineGetSupportedSSLParameters() { SSLSocket socket = getDefaultSocket(); SSLParameters params = new SSLParameters(); params.setCipherSuites(socket.getSupportedCipherSuites()); params.setProtocols(socket.getSupportedProtocols()); return params; }
java
protected SSLParameters engineGetSupportedSSLParameters() { SSLSocket socket = getDefaultSocket(); SSLParameters params = new SSLParameters(); params.setCipherSuites(socket.getSupportedCipherSuites()); params.setProtocols(socket.getSupportedProtocols()); return params; }
[ "protected", "SSLParameters", "engineGetSupportedSSLParameters", "(", ")", "{", "SSLSocket", "socket", "=", "getDefaultSocket", "(", ")", ";", "SSLParameters", "params", "=", "new", "SSLParameters", "(", ")", ";", "params", ".", "setCipherSuites", "(", "socket", "...
Returns a copy of the SSLParameters indicating the maximum supported settings for this SSL context. <p>The parameters will always have the ciphersuite and protocols arrays set to non-null values. <p>The default implementation obtains the parameters from an SSLSocket created by calling the {@linkplain javax.net.Socket...
[ "Returns", "a", "copy", "of", "the", "SSLParameters", "indicating", "the", "maximum", "supported", "settings", "for", "this", "SSL", "context", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLContextSpi.java#L191-L197
32,823
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeTextProvider.java
DateTimeTextProvider.createEntry
private static <A, B> Entry<A, B> createEntry(A text, B field) { return new SimpleImmutableEntry<>(text, field); }
java
private static <A, B> Entry<A, B> createEntry(A text, B field) { return new SimpleImmutableEntry<>(text, field); }
[ "private", "static", "<", "A", ",", "B", ">", "Entry", "<", "A", ",", "B", ">", "createEntry", "(", "A", "text", ",", "B", "field", ")", "{", "return", "new", "SimpleImmutableEntry", "<>", "(", "text", ",", "field", ")", ";", "}" ]
Helper method to create an immutable entry. @param text the text, not null @param field the field, not null @return the entry, not null
[ "Helper", "method", "to", "create", "an", "immutable", "entry", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeTextProvider.java#L471-L473
32,824
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateVersion.java
CertificateVersion.construct
private void construct(DerValue derVal) throws IOException { if (derVal.isConstructed() && derVal.isContextSpecific()) { derVal = derVal.data.getDerValue(); version = derVal.getInteger(); if (derVal.data.available() != 0) { throw new IOException("X.509 version...
java
private void construct(DerValue derVal) throws IOException { if (derVal.isConstructed() && derVal.isContextSpecific()) { derVal = derVal.data.getDerValue(); version = derVal.getInteger(); if (derVal.data.available() != 0) { throw new IOException("X.509 version...
[ "private", "void", "construct", "(", "DerValue", "derVal", ")", "throws", "IOException", "{", "if", "(", "derVal", ".", "isConstructed", "(", ")", "&&", "derVal", ".", "isContextSpecific", "(", ")", ")", "{", "derVal", "=", "derVal", ".", "data", ".", "g...
Construct the class from the passed DerValue
[ "Construct", "the", "class", "from", "the", "passed", "DerValue" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateVersion.java#L75-L83
32,825
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateVersion.java
CertificateVersion.encode
public void encode(OutputStream out) throws IOException { // Nothing for default if (version == V1) { return; } DerOutputStream tmp = new DerOutputStream(); tmp.putInteger(version); DerOutputStream seq = new DerOutputStream(); seq.write(DerValue.creat...
java
public void encode(OutputStream out) throws IOException { // Nothing for default if (version == V1) { return; } DerOutputStream tmp = new DerOutputStream(); tmp.putInteger(version); DerOutputStream seq = new DerOutputStream(); seq.write(DerValue.creat...
[ "public", "void", "encode", "(", "OutputStream", "out", ")", "throws", "IOException", "{", "// Nothing for default", "if", "(", "version", "==", "V1", ")", "{", "return", ";", "}", "DerOutputStream", "tmp", "=", "new", "DerOutputStream", "(", ")", ";", "tmp"...
Encode the CertificateVersion period in DER form to the stream. @param out the OutputStream to marshal the contents to. @exception IOException on errors.
[ "Encode", "the", "CertificateVersion", "period", "in", "DER", "form", "to", "the", "stream", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateVersion.java#L161-L174
32,826
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.getIndex
public int getIndex (String uri, String localName) { int max = length * 5; for (int i = 0; i < max; i += 5) { if (data[i].equals(uri) && data[i+1].equals(localName)) { return i / 5; } } return -1; }
java
public int getIndex (String uri, String localName) { int max = length * 5; for (int i = 0; i < max; i += 5) { if (data[i].equals(uri) && data[i+1].equals(localName)) { return i / 5; } } return -1; }
[ "public", "int", "getIndex", "(", "String", "uri", ",", "String", "localName", ")", "{", "int", "max", "=", "length", "*", "5", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "max", ";", "i", "+=", "5", ")", "{", "if", "(", "data", "["...
Look up an attribute's index by Namespace name. <p>In many cases, it will be more efficient to look up the name once and use the index query methods rather than using the name query methods repeatedly.</p> @param uri The attribute's Namespace URI, or the empty string if none is available. @param localName The attribu...
[ "Look", "up", "an", "attribute", "s", "index", "by", "Namespace", "name", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L199-L208
32,827
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.getType
public String getType (String uri, String localName) { int max = length * 5; for (int i = 0; i < max; i += 5) { if (data[i].equals(uri) && data[i+1].equals(localName)) { return data[i+3]; } } return null; }
java
public String getType (String uri, String localName) { int max = length * 5; for (int i = 0; i < max; i += 5) { if (data[i].equals(uri) && data[i+1].equals(localName)) { return data[i+3]; } } return null; }
[ "public", "String", "getType", "(", "String", "uri", ",", "String", "localName", ")", "{", "int", "max", "=", "length", "*", "5", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "max", ";", "i", "+=", "5", ")", "{", "if", "(", "data", "...
Look up an attribute's type by Namespace-qualified name. @param uri The Namespace URI, or the empty string for a name with no explicit Namespace URI. @param localName The local name. @return The attribute's type, or null if there is no matching attribute. @see org.xml.sax.Attributes#getType(java.lang.String,java.lang....
[ "Look", "up", "an", "attribute", "s", "type", "by", "Namespace", "-", "qualified", "name", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L240-L249
32,828
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.clear
public void clear () { if (data != null) { for (int i = 0; i < (length * 5); i++) data [i] = null; } length = 0; }
java
public void clear () { if (data != null) { for (int i = 0; i < (length * 5); i++) data [i] = null; } length = 0; }
[ "public", "void", "clear", "(", ")", "{", "if", "(", "data", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "(", "length", "*", "5", ")", ";", "i", "++", ")", "data", "[", "i", "]", "=", "null", ";", "}", "length...
Clear the attribute list for reuse. <p>Note that little memory is freed by this call: the current array is kept so it can be reused.</p>
[ "Clear", "the", "attribute", "list", "for", "reuse", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L327-L334
32,829
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setAttributes
public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); ...
java
public void setAttributes (Attributes atts) { clear(); length = atts.getLength(); if (length > 0) { data = new String[length*5]; for (int i = 0; i < length; i++) { data[i*5] = atts.getURI(i); data[i*5+1] = atts.getLocalName(i); ...
[ "public", "void", "setAttributes", "(", "Attributes", "atts", ")", "{", "clear", "(", ")", ";", "length", "=", "atts", ".", "getLength", "(", ")", ";", "if", "(", "length", ">", "0", ")", "{", "data", "=", "new", "String", "[", "length", "*", "5", ...
Copy an entire Attributes object. <p>It may be more efficient to reuse an existing object rather than constantly allocating new ones.</p> @param atts The attributes to copy.
[ "Copy", "an", "entire", "Attributes", "object", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L345-L359
32,830
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.addAttribute
public void addAttribute (String uri, String localName, String qName, String type, String value) { ensureCapacity(length+1); data[length*5] = uri; data[length*5+1] = localName; data[length*5+2] = qName; data[length*5+3] = type; data[length*5+4] = value; length++; }
java
public void addAttribute (String uri, String localName, String qName, String type, String value) { ensureCapacity(length+1); data[length*5] = uri; data[length*5+1] = localName; data[length*5+2] = qName; data[length*5+3] = type; data[length*5+4] = value; length++; }
[ "public", "void", "addAttribute", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "String", "type", ",", "String", "value", ")", "{", "ensureCapacity", "(", "length", "+", "1", ")", ";", "data", "[", "length", "*", "5", "...
Add an attribute to the end of the list. <p>For the sake of speed, this method does no checking to see if the attribute is already in the list: that is the responsibility of the application.</p> @param uri The Namespace URI, or the empty string if none is available or Namespace processing is not being performed. @par...
[ "Add", "an", "attribute", "to", "the", "end", "of", "the", "list", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L379-L389
32,831
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setAttribute
public void setAttribute (int index, String uri, String localName, String qName, String type, String value) { if (index >= 0 && index < length) { data[index*5] = uri; data[index*5+1] = localName; data[index*5+2] = qName; data[index*5+3] = type; data[inde...
java
public void setAttribute (int index, String uri, String localName, String qName, String type, String value) { if (index >= 0 && index < length) { data[index*5] = uri; data[index*5+1] = localName; data[index*5+2] = qName; data[index*5+3] = type; data[inde...
[ "public", "void", "setAttribute", "(", "int", "index", ",", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "String", "type", ",", "String", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", ...
Set an attribute in the list. <p>For the sake of speed, this method does no checking for name conflicts or well-formedness: such checks are the responsibility of the application.</p> @param index The index of the attribute (zero-based). @param uri The Namespace URI, or the empty string if none is available or Namespa...
[ "Set", "an", "attribute", "in", "the", "list", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L413-L425
32,832
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setURI
public void setURI (int index, String uri) { if (index >= 0 && index < length) { data[index*5] = uri; } else { badIndex(index); } }
java
public void setURI (int index, String uri) { if (index >= 0 && index < length) { data[index*5] = uri; } else { badIndex(index); } }
[ "public", "void", "setURI", "(", "int", "index", ",", "String", "uri", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "]", "=", "uri", ";", "}", "else", "{", "badIndex", "(", "in...
Set the Namespace URI of a specific attribute. @param index The index of the attribute (zero-based). @param uri The attribute's Namespace URI, or the empty string for none. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "Namespace", "URI", "of", "a", "specific", "attribute", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L466-L473
32,833
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setLocalName
public void setLocalName (int index, String localName) { if (index >= 0 && index < length) { data[index*5+1] = localName; } else { badIndex(index); } }
java
public void setLocalName (int index, String localName) { if (index >= 0 && index < length) { data[index*5+1] = localName; } else { badIndex(index); } }
[ "public", "void", "setLocalName", "(", "int", "index", ",", "String", "localName", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "+", "1", "]", "=", "localName", ";", "}", "else", ...
Set the local name of a specific attribute. @param index The index of the attribute (zero-based). @param localName The attribute's local name, or the empty string for none. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "local", "name", "of", "a", "specific", "attribute", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L486-L493
32,834
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setQName
public void setQName (int index, String qName) { if (index >= 0 && index < length) { data[index*5+2] = qName; } else { badIndex(index); } }
java
public void setQName (int index, String qName) { if (index >= 0 && index < length) { data[index*5+2] = qName; } else { badIndex(index); } }
[ "public", "void", "setQName", "(", "int", "index", ",", "String", "qName", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "+", "2", "]", "=", "qName", ";", "}", "else", "{", "bad...
Set the qualified name of a specific attribute. @param index The index of the attribute (zero-based). @param qName The attribute's qualified name, or the empty string for none. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "qualified", "name", "of", "a", "specific", "attribute", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L506-L513
32,835
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setType
public void setType (int index, String type) { if (index >= 0 && index < length) { data[index*5+3] = type; } else { badIndex(index); } }
java
public void setType (int index, String type) { if (index >= 0 && index < length) { data[index*5+3] = type; } else { badIndex(index); } }
[ "public", "void", "setType", "(", "int", "index", ",", "String", "type", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "+", "3", "]", "=", "type", ";", "}", "else", "{", "badInd...
Set the type of a specific attribute. @param index The index of the attribute (zero-based). @param type The attribute's type. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "type", "of", "a", "specific", "attribute", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L525-L532
32,836
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setValue
public void setValue (int index, String value) { if (index >= 0 && index < length) { data[index*5+4] = value; } else { badIndex(index); } }
java
public void setValue (int index, String value) { if (index >= 0 && index < length) { data[index*5+4] = value; } else { badIndex(index); } }
[ "public", "void", "setValue", "(", "int", "index", ",", "String", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "+", "4", "]", "=", "value", ";", "}", "else", "{", "bad...
Set the value of a specific attribute. @param index The index of the attribute (zero-based). @param value The attribute's value. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "value", "of", "a", "specific", "attribute", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L544-L551
32,837
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.ensureCapacity
private void ensureCapacity (int n) { if (n <= 0) { return; } int max; if (data == null || data.length == 0) { max = 25; } else if (data.length >= n * 5) { return; } else { max = data.length; } ...
java
private void ensureCapacity (int n) { if (n <= 0) { return; } int max; if (data == null || data.length == 0) { max = 25; } else if (data.length >= n * 5) { return; } else { max = data.length; } ...
[ "private", "void", "ensureCapacity", "(", "int", "n", ")", "{", "if", "(", "n", "<=", "0", ")", "{", "return", ";", "}", "int", "max", ";", "if", "(", "data", "==", "null", "||", "data", ".", "length", "==", "0", ")", "{", "max", "=", "25", "...
Ensure the internal array's capacity. @param n The minimum number of attributes that the array must be able to hold.
[ "Ensure", "the", "internal", "array", "s", "capacity", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L566-L589
32,838
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterNameReader.java
UCharacterNameReader.read
protected void read(UCharacterName data) throws IOException { // reading index m_tokenstringindex_ = m_byteBuffer_.getInt(); m_groupindex_ = m_byteBuffer_.getInt(); m_groupstringindex_ = m_byteBuffer_.getInt(); m_algnamesindex_ = m_byteBuffer_.getInt(); // r...
java
protected void read(UCharacterName data) throws IOException { // reading index m_tokenstringindex_ = m_byteBuffer_.getInt(); m_groupindex_ = m_byteBuffer_.getInt(); m_groupstringindex_ = m_byteBuffer_.getInt(); m_algnamesindex_ = m_byteBuffer_.getInt(); // r...
[ "protected", "void", "read", "(", "UCharacterName", "data", ")", "throws", "IOException", "{", "// reading index", "m_tokenstringindex_", "=", "m_byteBuffer_", ".", "getInt", "(", ")", ";", "m_groupindex_", "=", "m_byteBuffer_", ".", "getInt", "(", ")", ";", "m_...
Read and break up the stream of data passed in as arguments and fills up UCharacterName. If unsuccessful false will be returned. @param data instance of datablock @exception IOException thrown when there's a data error.
[ "Read", "and", "break", "up", "the", "stream", "of", "data", "passed", "in", "as", "arguments", "and", "fills", "up", "UCharacterName", ".", "If", "unsuccessful", "false", "will", "be", "returned", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterNameReader.java#L61-L102
32,839
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterNameReader.java
UCharacterNameReader.readAlg
private UCharacterName.AlgorithmName readAlg() throws IOException { UCharacterName.AlgorithmName result = new UCharacterName.AlgorithmName(); int rangestart = m_byteBuffer_.getInt(); int rangeend = m_byteBuffer_.getInt(); byte type = m_by...
java
private UCharacterName.AlgorithmName readAlg() throws IOException { UCharacterName.AlgorithmName result = new UCharacterName.AlgorithmName(); int rangestart = m_byteBuffer_.getInt(); int rangeend = m_byteBuffer_.getInt(); byte type = m_by...
[ "private", "UCharacterName", ".", "AlgorithmName", "readAlg", "(", ")", "throws", "IOException", "{", "UCharacterName", ".", "AlgorithmName", "result", "=", "new", "UCharacterName", ".", "AlgorithmName", "(", ")", ";", "int", "rangestart", "=", "m_byteBuffer_", "....
Reads an individual record of AlgorithmNames @return an instance of AlgorithNames if read is successful otherwise null @exception IOException thrown when file read error occurs or data is corrupted
[ "Reads", "an", "individual", "record", "of", "AlgorithmNames" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterNameReader.java#L159-L199
32,840
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/gen/TypeGenerator.java
TypeGenerator.getMethodSignature
protected String getMethodSignature(MethodDeclaration m) { StringBuilder sb = new StringBuilder(); ExecutableElement element = m.getExecutableElement(); char prefix = Modifier.isStatic(m.getModifiers()) ? '+' : '-'; String returnType = nameTable.getObjCType(element.getReturnType()); String selector ...
java
protected String getMethodSignature(MethodDeclaration m) { StringBuilder sb = new StringBuilder(); ExecutableElement element = m.getExecutableElement(); char prefix = Modifier.isStatic(m.getModifiers()) ? '+' : '-'; String returnType = nameTable.getObjCType(element.getReturnType()); String selector ...
[ "protected", "String", "getMethodSignature", "(", "MethodDeclaration", "m", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "ExecutableElement", "element", "=", "m", ".", "getExecutableElement", "(", ")", ";", "char", "prefix", "=", ...
Create an Objective-C method signature string.
[ "Create", "an", "Objective", "-", "C", "method", "signature", "string", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/gen/TypeGenerator.java#L279-L317
32,841
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java
Cache.newSoftMemoryCache
public static <K,V> Cache<K,V> newSoftMemoryCache(int size) { return new MemoryCache<>(true, size); }
java
public static <K,V> Cache<K,V> newSoftMemoryCache(int size) { return new MemoryCache<>(true, size); }
[ "public", "static", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "newSoftMemoryCache", "(", "int", "size", ")", "{", "return", "new", "MemoryCache", "<>", "(", "true", ",", "size", ")", ";", "}" ]
Return a new memory cache with the specified maximum size, unlimited lifetime for entries, with the values held by SoftReferences.
[ "Return", "a", "new", "memory", "cache", "with", "the", "specified", "maximum", "size", "unlimited", "lifetime", "for", "entries", "with", "the", "values", "held", "by", "SoftReferences", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java#L122-L124
32,842
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java
Cache.newHardMemoryCache
public static <K,V> Cache<K,V> newHardMemoryCache(int size) { return new MemoryCache<>(false, size); }
java
public static <K,V> Cache<K,V> newHardMemoryCache(int size) { return new MemoryCache<>(false, size); }
[ "public", "static", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "newHardMemoryCache", "(", "int", "size", ")", "{", "return", "new", "MemoryCache", "<>", "(", "false", ",", "size", ")", ";", "}" ]
Return a new memory cache with the specified maximum size, unlimited lifetime for entries, with the values held by standard references.
[ "Return", "a", "new", "memory", "cache", "with", "the", "specified", "maximum", "size", "unlimited", "lifetime", "for", "entries", "with", "the", "values", "held", "by", "standard", "references", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java#L139-L141
32,843
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java
Cache.newNullCache
@SuppressWarnings("unchecked") public static <K,V> Cache<K,V> newNullCache() { return (Cache<K,V>) NullCache.INSTANCE; }
java
@SuppressWarnings("unchecked") public static <K,V> Cache<K,V> newNullCache() { return (Cache<K,V>) NullCache.INSTANCE; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "newNullCache", "(", ")", "{", "return", "(", "Cache", "<", "K", ",", "V", ">", ")", "NullCache", ".", "INSTANCE", ";...
Return a dummy cache that does nothing.
[ "Return", "a", "dummy", "cache", "that", "does", "nothing", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java#L146-L149
32,844
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java
MemoryCache.emptyQueue
private void emptyQueue() { if (queue == null) { return; } int startSize = cacheMap.size(); while (true) { @SuppressWarnings("unchecked") CacheEntry<K,V> entry = (CacheEntry<K,V>)queue.poll(); if (entry == null) { break; ...
java
private void emptyQueue() { if (queue == null) { return; } int startSize = cacheMap.size(); while (true) { @SuppressWarnings("unchecked") CacheEntry<K,V> entry = (CacheEntry<K,V>)queue.poll(); if (entry == null) { break; ...
[ "private", "void", "emptyQueue", "(", ")", "{", "if", "(", "queue", "==", "null", ")", "{", "return", ";", "}", "int", "startSize", "=", "cacheMap", ".", "size", "(", ")", ";", "while", "(", "true", ")", "{", "@", "SuppressWarnings", "(", "\"unchecke...
Empty the reference queue and remove all corresponding entries from the cache. This method should be called at the beginning of each public method.
[ "Empty", "the", "reference", "queue", "and", "remove", "all", "corresponding", "entries", "from", "the", "cache", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java#L283-L313
32,845
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java
MemoryCache.expungeExpiredEntries
private void expungeExpiredEntries() { emptyQueue(); if (lifetime == 0) { return; } int cnt = 0; long time = System.currentTimeMillis(); for (Iterator<CacheEntry<K,V>> t = cacheMap.values().iterator(); t.hasNext(); ) { CacheEntry<K,...
java
private void expungeExpiredEntries() { emptyQueue(); if (lifetime == 0) { return; } int cnt = 0; long time = System.currentTimeMillis(); for (Iterator<CacheEntry<K,V>> t = cacheMap.values().iterator(); t.hasNext(); ) { CacheEntry<K,...
[ "private", "void", "expungeExpiredEntries", "(", ")", "{", "emptyQueue", "(", ")", ";", "if", "(", "lifetime", "==", "0", ")", "{", "return", ";", "}", "int", "cnt", "=", "0", ";", "long", "time", "=", "System", ".", "currentTimeMillis", "(", ")", ";...
Scan all entries and remove all expired ones.
[ "Scan", "all", "entries", "and", "remove", "all", "expired", "ones", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java#L318-L339
32,846
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java
MemoryCache.accept
public synchronized void accept(CacheVisitor<K,V> visitor) { expungeExpiredEntries(); Map<K,V> cached = getCachedEntries(); visitor.visit(cached); }
java
public synchronized void accept(CacheVisitor<K,V> visitor) { expungeExpiredEntries(); Map<K,V> cached = getCachedEntries(); visitor.visit(cached); }
[ "public", "synchronized", "void", "accept", "(", "CacheVisitor", "<", "K", ",", "V", ">", "visitor", ")", "{", "expungeExpiredEntries", "(", ")", ";", "Map", "<", "K", ",", "V", ">", "cached", "=", "getCachedEntries", "(", ")", ";", "visitor", ".", "vi...
it is a heavyweight method.
[ "it", "is", "a", "heavyweight", "method", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Cache.java#L442-L447
32,847
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UCharacterIterator.java
UCharacterIterator.currentCodePoint
public int currentCodePoint() { int ch = current(); if (UTF16.isLeadSurrogate((char) ch)) { // advance the index to get the // next code point next(); // due to post increment semantics // current() after next() actually // returns ...
java
public int currentCodePoint() { int ch = current(); if (UTF16.isLeadSurrogate((char) ch)) { // advance the index to get the // next code point next(); // due to post increment semantics // current() after next() actually // returns ...
[ "public", "int", "currentCodePoint", "(", ")", "{", "int", "ch", "=", "current", "(", ")", ";", "if", "(", "UTF16", ".", "isLeadSurrogate", "(", "(", "char", ")", "ch", ")", ")", "{", "// advance the index to get the", "// next code point", "next", "(", ")...
Returns the codepoint at the current index. If the current index is invalid, DONE is returned. If the current index points to a lead surrogate, and there is a following trail surrogate, then the code point is returned. Otherwise, the code unit at index is returned. Index is not changed. @return current codepoint
[ "Returns", "the", "codepoint", "at", "the", "current", "index", ".", "If", "the", "current", "index", "is", "invalid", "DONE", "is", "returned", ".", "If", "the", "current", "index", "points", "to", "a", "lead", "surrogate", "and", "there", "is", "a", "f...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UCharacterIterator.java#L143-L164
32,848
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharTrie.java
CharTrie.getSurrogateOffset
@Override protected final int getSurrogateOffset(char lead, char trail) { if (m_dataManipulate_ == null) { throw new NullPointerException( "The field DataManipulate in this Trie is null"); } // get fold position for the next trail surrogate ...
java
@Override protected final int getSurrogateOffset(char lead, char trail) { if (m_dataManipulate_ == null) { throw new NullPointerException( "The field DataManipulate in this Trie is null"); } // get fold position for the next trail surrogate ...
[ "@", "Override", "protected", "final", "int", "getSurrogateOffset", "(", "char", "lead", ",", "char", "trail", ")", "{", "if", "(", "m_dataManipulate_", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"The field DataManipulate in this Trie is ...
Gets the offset to the data which the surrogate pair points to. @param lead lead surrogate @param trail trailing surrogate @return offset to data
[ "Gets", "the", "offset", "to", "the", "data", "which", "the", "surrogate", "pair", "points", "to", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharTrie.java#L257-L276
32,849
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/CheckedOutputStream.java
CheckedOutputStream.write
public void write(byte[] b, int off, int len) throws IOException { out.write(b, off, len); cksum.update(b, off, len); }
java
public void write(byte[] b, int off, int len) throws IOException { out.write(b, off, len); cksum.update(b, off, len); }
[ "public", "void", "write", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "out", ".", "write", "(", "b", ",", "off", ",", "len", ")", ";", "cksum", ".", "update", "(", "b", ",", "off", ",", ...
Writes an array of bytes. Will block until the bytes are actually written. @param b the data to be written @param off the start offset of the data @param len the number of bytes to be written @exception IOException if an I/O error has occurred
[ "Writes", "an", "array", "of", "bytes", ".", "Will", "block", "until", "the", "bytes", "are", "actually", "written", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/CheckedOutputStream.java#L72-L75
32,850
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/PollArrayWrapper.java
PollArrayWrapper.addEntry
void addEntry(SelChImpl sc) { putDescriptor(totalChannels, IOUtil.fdVal(sc.getFD())); putEventOps(totalChannels, 0); putReventOps(totalChannels, 0); totalChannels++; }
java
void addEntry(SelChImpl sc) { putDescriptor(totalChannels, IOUtil.fdVal(sc.getFD())); putEventOps(totalChannels, 0); putReventOps(totalChannels, 0); totalChannels++; }
[ "void", "addEntry", "(", "SelChImpl", "sc", ")", "{", "putDescriptor", "(", "totalChannels", ",", "IOUtil", ".", "fdVal", "(", "sc", ".", "getFD", "(", ")", ")", ")", ";", "putEventOps", "(", "totalChannels", ",", "0", ")", ";", "putReventOps", "(", "t...
Prepare another pollfd struct for use.
[ "Prepare", "another", "pollfd", "struct", "for", "use", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/PollArrayWrapper.java#L76-L81
32,851
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/PollArrayWrapper.java
PollArrayWrapper.replaceEntry
static void replaceEntry(PollArrayWrapper source, int sindex, PollArrayWrapper target, int tindex) { target.putDescriptor(tindex, source.getDescriptor(sindex)); target.putEventOps(tindex, source.getEventOps(sindex)); target.putReventOps(tindex, source.getReventOps(sindex));...
java
static void replaceEntry(PollArrayWrapper source, int sindex, PollArrayWrapper target, int tindex) { target.putDescriptor(tindex, source.getDescriptor(sindex)); target.putEventOps(tindex, source.getEventOps(sindex)); target.putReventOps(tindex, source.getReventOps(sindex));...
[ "static", "void", "replaceEntry", "(", "PollArrayWrapper", "source", ",", "int", "sindex", ",", "PollArrayWrapper", "target", ",", "int", "tindex", ")", "{", "target", ".", "putDescriptor", "(", "tindex", ",", "source", ".", "getDescriptor", "(", "sindex", ")"...
Writes the pollfd entry from the source wrapper at the source index over the entry in the target wrapper at the target index. The source array remains unchanged unless the source array and the target are the same array.
[ "Writes", "the", "pollfd", "entry", "from", "the", "source", "wrapper", "at", "the", "source", "index", "over", "the", "entry", "in", "the", "target", "wrapper", "at", "the", "target", "index", ".", "The", "source", "array", "remains", "unchanged", "unless",...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/PollArrayWrapper.java#L89-L94
32,852
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/SimpleFilteredSentenceBreakIterator.java
SimpleFilteredSentenceBreakIterator.breakExceptionAt
private final boolean breakExceptionAt(int n) { // Note: the C++ version of this function is SimpleFilteredSentenceBreakIterator::breakExceptionAt() int bestPosn = -1; int bestValue = -1; // loops while 'n' points to an exception text.setIndex(n); backwardsTrie.reset();...
java
private final boolean breakExceptionAt(int n) { // Note: the C++ version of this function is SimpleFilteredSentenceBreakIterator::breakExceptionAt() int bestPosn = -1; int bestValue = -1; // loops while 'n' points to an exception text.setIndex(n); backwardsTrie.reset();...
[ "private", "final", "boolean", "breakExceptionAt", "(", "int", "n", ")", "{", "// Note: the C++ version of this function is SimpleFilteredSentenceBreakIterator::breakExceptionAt()", "int", "bestPosn", "=", "-", "1", ";", "int", "bestValue", "=", "-", "1", ";", "// loops w...
Is there an exception at this point? @param n @return
[ "Is", "there", "an", "exception", "at", "this", "point?" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/SimpleFilteredSentenceBreakIterator.java#L65-L119
32,853
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/Log.java
Log.setWtfHandler
public static TerribleFailureHandler setWtfHandler(TerribleFailureHandler handler) { if (handler == null) { throw new NullPointerException("handler == null"); } TerribleFailureHandler oldHandler = sWtfHandler; sWtfHandler = handler; return oldHandler; }
java
public static TerribleFailureHandler setWtfHandler(TerribleFailureHandler handler) { if (handler == null) { throw new NullPointerException("handler == null"); } TerribleFailureHandler oldHandler = sWtfHandler; sWtfHandler = handler; return oldHandler; }
[ "public", "static", "TerribleFailureHandler", "setWtfHandler", "(", "TerribleFailureHandler", "handler", ")", "{", "if", "(", "handler", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"handler == null\"", ")", ";", "}", "TerribleFailureHandler"...
Sets the terrible failure handler, for testing. @return the old handler @hide
[ "Sets", "the", "terrible", "failure", "handler", "for", "testing", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/Log.java#L352-L359
32,854
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyGenerator.java
KeyGenerator.init
public final void init(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException { if (serviceIterator == null) { spi.engineInit(params, random); return; } Exception failure = null; KeyGeneratorSpi mySpi = spi; ...
java
public final void init(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException { if (serviceIterator == null) { spi.engineInit(params, random); return; } Exception failure = null; KeyGeneratorSpi mySpi = spi; ...
[ "public", "final", "void", "init", "(", "AlgorithmParameterSpec", "params", ",", "SecureRandom", "random", ")", "throws", "InvalidAlgorithmParameterException", "{", "if", "(", "serviceIterator", "==", "null", ")", "{", "spi", ".", "engineInit", "(", "params", ",",...
Initializes this key generator with the specified parameter set and a user-provided source of randomness. @param params the key generation parameters @param random the source of randomness for this key generator @exception InvalidAlgorithmParameterException if <code>params</code> is inappropriate for this key generat...
[ "Initializes", "this", "key", "generator", "with", "the", "specified", "parameter", "set", "and", "a", "user", "-", "provided", "source", "of", "randomness", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyGenerator.java#L507-L538
32,855
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyGenerator.java
KeyGenerator.init
public final void init(int keysize, SecureRandom random) { if (serviceIterator == null) { spi.engineInit(keysize, random); return; } RuntimeException failure = null; KeyGeneratorSpi mySpi = spi; do { try { mySpi.engineInit(keysi...
java
public final void init(int keysize, SecureRandom random) { if (serviceIterator == null) { spi.engineInit(keysize, random); return; } RuntimeException failure = null; KeyGeneratorSpi mySpi = spi; do { try { mySpi.engineInit(keysi...
[ "public", "final", "void", "init", "(", "int", "keysize", ",", "SecureRandom", "random", ")", "{", "if", "(", "serviceIterator", "==", "null", ")", "{", "spi", ".", "engineInit", "(", "keysize", ",", "random", ")", ";", "return", ";", "}", "RuntimeExcept...
Initializes this key generator for a certain keysize, using a user-provided source of randomness. @param keysize the keysize. This is an algorithm-specific metric, specified in number of bits. @param random the source of randomness for this key generator @exception InvalidParameterException if the keysize is wrong or...
[ "Initializes", "this", "key", "generator", "for", "a", "certain", "keysize", "using", "a", "user", "-", "provided", "source", "of", "randomness", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyGenerator.java#L572-L595
32,856
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
NamespaceSupport.reset
public void reset () { contexts = new Context[32]; namespaceDeclUris = false; contextPos = 0; contexts[contextPos] = currentContext = new Context(); currentContext.declarePrefix("xml", XMLNS); }
java
public void reset () { contexts = new Context[32]; namespaceDeclUris = false; contextPos = 0; contexts[contextPos] = currentContext = new Context(); currentContext.declarePrefix("xml", XMLNS); }
[ "public", "void", "reset", "(", ")", "{", "contexts", "=", "new", "Context", "[", "32", "]", ";", "namespaceDeclUris", "=", "false", ";", "contextPos", "=", "0", ";", "contexts", "[", "contextPos", "]", "=", "currentContext", "=", "new", "Context", "(", ...
Reset this Namespace support object for reuse. <p>It is necessary to invoke this method before reusing the Namespace support object for a new session. If namespace declaration URIs are to be supported, that flag must also be set to a non-default value. </p> @see #setNamespaceDeclUris
[ "Reset", "this", "Namespace", "support", "object", "for", "reuse", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java#L151-L158
32,857
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
NamespaceSupport.pushContext
public void pushContext () { int max = contexts.length; contexts [contextPos].declsOK = false; contextPos++; // Extend the array if necessary if (contextPos >= max) { Context newContexts[] = new Context[max*2]; System.arraycopy(contexts, 0, newContexts, 0, max); ...
java
public void pushContext () { int max = contexts.length; contexts [contextPos].declsOK = false; contextPos++; // Extend the array if necessary if (contextPos >= max) { Context newContexts[] = new Context[max*2]; System.arraycopy(contexts, 0, newContexts, 0, max); ...
[ "public", "void", "pushContext", "(", ")", "{", "int", "max", "=", "contexts", ".", "length", ";", "contexts", "[", "contextPos", "]", ".", "declsOK", "=", "false", ";", "contextPos", "++", ";", "// Extend the array if necessary", "if", "(", "contextPos", ">...
Start a new Namespace context. The new context will automatically inherit the declarations of its parent context, but it will also keep track of which declarations were made within this context. <p>Event callback code should start a new context once per element. This means being ready to call this in either of two pla...
[ "Start", "a", "new", "Namespace", "context", ".", "The", "new", "context", "will", "automatically", "inherit", "the", "declarations", "of", "its", "parent", "context", "but", "it", "will", "also", "keep", "track", "of", "which", "declarations", "were", "made",...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java#L197-L222
32,858
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
NamespaceSupport.getPrefixes
public Enumeration getPrefixes(String uri) { ArrayList<String> prefixes = new ArrayList<String>(); Enumeration allPrefixes = getPrefixes(); while (allPrefixes.hasMoreElements()) { String prefix = (String) allPrefixes.nextElement(); if (uri.equals(getURI(prefix))) { ...
java
public Enumeration getPrefixes(String uri) { ArrayList<String> prefixes = new ArrayList<String>(); Enumeration allPrefixes = getPrefixes(); while (allPrefixes.hasMoreElements()) { String prefix = (String) allPrefixes.nextElement(); if (uri.equals(getURI(prefix))) { ...
[ "public", "Enumeration", "getPrefixes", "(", "String", "uri", ")", "{", "ArrayList", "<", "String", ">", "prefixes", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "Enumeration", "allPrefixes", "=", "getPrefixes", "(", ")", ";", "while", "(", ...
Return an enumeration of all prefixes for a given URI whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden. <p>This method returns prefixes mapped to a specific Namespace URI. The xml: prefix will be included. If you want only one prefix ...
[ "Return", "an", "enumeration", "of", "all", "prefixes", "for", "a", "given", "URI", "whose", "declarations", "are", "active", "in", "the", "current", "context", ".", "This", "includes", "declarations", "from", "parent", "contexts", "that", "have", "not", "been...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java#L445-L455
32,859
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/MeasureUnit.java
MeasureUnit.getAvailable
public synchronized static Set<MeasureUnit> getAvailable(String type) { populateCache(); Map<String, MeasureUnit> units = cache.get(type); // Train users not to modify returned set from the start giving us more // flexibility for implementation. return units == null ? Collections...
java
public synchronized static Set<MeasureUnit> getAvailable(String type) { populateCache(); Map<String, MeasureUnit> units = cache.get(type); // Train users not to modify returned set from the start giving us more // flexibility for implementation. return units == null ? Collections...
[ "public", "synchronized", "static", "Set", "<", "MeasureUnit", ">", "getAvailable", "(", "String", "type", ")", "{", "populateCache", "(", ")", ";", "Map", "<", "String", ",", "MeasureUnit", ">", "units", "=", "cache", ".", "get", "(", "type", ")", ";", ...
For the given type, return the available units. @param type the type @return the available units for type. Returned set is unmodifiable.
[ "For", "the", "given", "type", "return", "the", "available", "units", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/MeasureUnit.java#L137-L144
32,860
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/MeasureUnit.java
MeasureUnit.getAvailable
public synchronized static Set<MeasureUnit> getAvailable() { Set<MeasureUnit> result = new HashSet<MeasureUnit>(); for (String type : new HashSet<String>(MeasureUnit.getAvailableTypes())) { for (MeasureUnit unit : MeasureUnit.getAvailable(type)) { result.add(unit); ...
java
public synchronized static Set<MeasureUnit> getAvailable() { Set<MeasureUnit> result = new HashSet<MeasureUnit>(); for (String type : new HashSet<String>(MeasureUnit.getAvailableTypes())) { for (MeasureUnit unit : MeasureUnit.getAvailable(type)) { result.add(unit); ...
[ "public", "synchronized", "static", "Set", "<", "MeasureUnit", ">", "getAvailable", "(", ")", "{", "Set", "<", "MeasureUnit", ">", "result", "=", "new", "HashSet", "<", "MeasureUnit", ">", "(", ")", ";", "for", "(", "String", "type", ":", "new", "HashSet...
Get all of the available units. Returned set is unmodifiable.
[ "Get", "all", "of", "the", "available", "units", ".", "Returned", "set", "is", "unmodifiable", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/MeasureUnit.java#L149-L159
32,861
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/MeasureUnit.java
MeasureUnit.resolveUnitPerUnit
@Deprecated public static MeasureUnit resolveUnitPerUnit(MeasureUnit unit, MeasureUnit perUnit) { return unitPerUnitToSingleUnit.get(Pair.of(unit, perUnit)); }
java
@Deprecated public static MeasureUnit resolveUnitPerUnit(MeasureUnit unit, MeasureUnit perUnit) { return unitPerUnitToSingleUnit.get(Pair.of(unit, perUnit)); }
[ "@", "Deprecated", "public", "static", "MeasureUnit", "resolveUnitPerUnit", "(", "MeasureUnit", "unit", ",", "MeasureUnit", "perUnit", ")", "{", "return", "unitPerUnitToSingleUnit", ".", "get", "(", "Pair", ".", "of", "(", "unit", ",", "perUnit", ")", ")", ";"...
For ICU use only. @deprecated This API is ICU internal only. @hide original deprecated declaration @hide draft / provisional / internal are hidden on Android
[ "For", "ICU", "use", "only", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/MeasureUnit.java#L199-L202
32,862
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/MatchOps.java
MatchOps.makeRef
public static <T> TerminalOp<T, Boolean> makeRef(Predicate<? super T> predicate, MatchKind matchKind) { Objects.requireNonNull(predicate); Objects.requireNonNull(matchKind); class MatchSink extends BooleanTerminalSink<T> { MatchSink() { super(matchKind); ...
java
public static <T> TerminalOp<T, Boolean> makeRef(Predicate<? super T> predicate, MatchKind matchKind) { Objects.requireNonNull(predicate); Objects.requireNonNull(matchKind); class MatchSink extends BooleanTerminalSink<T> { MatchSink() { super(matchKind); ...
[ "public", "static", "<", "T", ">", "TerminalOp", "<", "T", ",", "Boolean", ">", "makeRef", "(", "Predicate", "<", "?", "super", "T", ">", "predicate", ",", "MatchKind", "matchKind", ")", "{", "Objects", ".", "requireNonNull", "(", "predicate", ")", ";", ...
Constructs a quantified predicate matcher for a Stream. @param <T> the type of stream elements @param predicate the {@code Predicate} to apply to stream elements @param matchKind the kind of quantified match (all, any, none) @return a {@code TerminalOp} implementing the desired quantified match criteria
[ "Constructs", "a", "quantified", "predicate", "matcher", "for", "a", "Stream", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/MatchOps.java#L79-L98
32,863
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/StrictMath.java
StrictMath.floorOrCeil
private static double floorOrCeil(double a, double negativeBoundary, double positiveBoundary, double sign) { int exponent = Math.getExponent(a); if (exponent < 0) { /* ...
java
private static double floorOrCeil(double a, double negativeBoundary, double positiveBoundary, double sign) { int exponent = Math.getExponent(a); if (exponent < 0) { /* ...
[ "private", "static", "double", "floorOrCeil", "(", "double", "a", ",", "double", "negativeBoundary", ",", "double", "positiveBoundary", ",", "double", "sign", ")", "{", "int", "exponent", "=", "Math", ".", "getExponent", "(", "a", ")", ";", "if", "(", "exp...
Internal method to share logic between floor and ceil. @param a the value to be floored or ceiled @param negativeBoundary result for values in (-1, 0) @param positiveBoundary result for values in (0, 1) @param increment value to add when the argument is non-integral
[ "Internal", "method", "to", "share", "logic", "between", "floor", "and", "ceil", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/StrictMath.java#L370-L405
32,864
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.dumpAssociationTables
void dumpAssociationTables() { Enumeration associations = m_patternTable.elements(); while (associations.hasMoreElements()) { TemplateSubPatternAssociation head = (TemplateSubPatternAssociation) associations.nextElement(); while (null != head) { System.out.print("(" + ...
java
void dumpAssociationTables() { Enumeration associations = m_patternTable.elements(); while (associations.hasMoreElements()) { TemplateSubPatternAssociation head = (TemplateSubPatternAssociation) associations.nextElement(); while (null != head) { System.out.print("(" + ...
[ "void", "dumpAssociationTables", "(", ")", "{", "Enumeration", "associations", "=", "m_patternTable", ".", "elements", "(", ")", ";", "while", "(", "associations", ".", "hasMoreElements", "(", ")", ")", "{", "TemplateSubPatternAssociation", "head", "=", "(", "Te...
Dump all patterns and elements that match those patterns
[ "Dump", "all", "patterns", "and", "elements", "that", "match", "those", "patterns" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L133-L167
32,865
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.compose
public void compose(StylesheetRoot sroot) { if (DEBUG) { System.out.println("Before wildcard insert..."); dumpAssociationTables(); } if (null != m_wildCardPatterns) { Enumeration associations = m_patternTable.elements(); while (associations.hasMoreElements()) { ...
java
public void compose(StylesheetRoot sroot) { if (DEBUG) { System.out.println("Before wildcard insert..."); dumpAssociationTables(); } if (null != m_wildCardPatterns) { Enumeration associations = m_patternTable.elements(); while (associations.hasMoreElements()) { ...
[ "public", "void", "compose", "(", "StylesheetRoot", "sroot", ")", "{", "if", "(", "DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"Before wildcard insert...\"", ")", ";", "dumpAssociationTables", "(", ")", ";", "}", "if", "(", "null", "!=",...
After all templates have been added, this function should be called.
[ "After", "all", "templates", "have", "been", "added", "this", "function", "should", "be", "called", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L173-L211
32,866
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.insertAssociationIntoList
private TemplateSubPatternAssociation insertAssociationIntoList(TemplateSubPatternAssociation head, TemplateSubPatternAssociation item, boolean isWildCardInsert) { // Sort first by import level (higher level is at fro...
java
private TemplateSubPatternAssociation insertAssociationIntoList(TemplateSubPatternAssociation head, TemplateSubPatternAssociation item, boolean isWildCardInsert) { // Sort first by import level (higher level is at fro...
[ "private", "TemplateSubPatternAssociation", "insertAssociationIntoList", "(", "TemplateSubPatternAssociation", "head", ",", "TemplateSubPatternAssociation", "item", ",", "boolean", "isWildCardInsert", ")", "{", "// Sort first by import level (higher level is at front),", "// then by pr...
Insert the given TemplateSubPatternAssociation into the the linked list. Sort by import precedence, then priority, then by document order. @param head The first TemplateSubPatternAssociation in the linked list. @param item The item that we want to insert into the proper place. @param isWildCardInsert <code>true</code...
[ "Insert", "the", "given", "TemplateSubPatternAssociation", "into", "the", "the", "linked", "list", ".", "Sort", "by", "import", "precedence", "then", "priority", "then", "by", "document", "order", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L223-L335
32,867
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.insertPatternInTable
private void insertPatternInTable(StepPattern pattern, ElemTemplate template) { String target = pattern.getTargetString(); if (null != target) { String pstring = template.getMatch().getPatternString(); TemplateSubPatternAssociation association = new TemplateSubPatternAssociation(temp...
java
private void insertPatternInTable(StepPattern pattern, ElemTemplate template) { String target = pattern.getTargetString(); if (null != target) { String pstring = template.getMatch().getPatternString(); TemplateSubPatternAssociation association = new TemplateSubPatternAssociation(temp...
[ "private", "void", "insertPatternInTable", "(", "StepPattern", "pattern", ",", "ElemTemplate", "template", ")", "{", "String", "target", "=", "pattern", ".", "getTargetString", "(", ")", ";", "if", "(", "null", "!=", "target", ")", "{", "String", "pstring", ...
Add a template to the template list. @param pattern @param template
[ "Add", "a", "template", "to", "the", "template", "list", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L343-L372
32,868
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.getPriorityOrScore
private double getPriorityOrScore(TemplateSubPatternAssociation matchPat) { double priority = matchPat.getTemplate().getPriority(); if (priority == XPath.MATCH_SCORE_NONE) { Expression ex = matchPat.getStepPattern(); if (ex instanceof NodeTest) { return ((NodeTest) ex).getDefa...
java
private double getPriorityOrScore(TemplateSubPatternAssociation matchPat) { double priority = matchPat.getTemplate().getPriority(); if (priority == XPath.MATCH_SCORE_NONE) { Expression ex = matchPat.getStepPattern(); if (ex instanceof NodeTest) { return ((NodeTest) ex).getDefa...
[ "private", "double", "getPriorityOrScore", "(", "TemplateSubPatternAssociation", "matchPat", ")", "{", "double", "priority", "=", "matchPat", ".", "getTemplate", "(", ")", ".", "getPriority", "(", ")", ";", "if", "(", "priority", "==", "XPath", ".", "MATCH_SCORE...
Given a match pattern and template association, return the score of that match. This score or priority can always be statically calculated. @param matchPat The match pattern to template association. @return {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NON...
[ "Given", "a", "match", "pattern", "and", "template", "association", "return", "the", "score", "of", "that", "match", ".", "This", "score", "or", "priority", "can", "always", "be", "statically", "calculated", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L389-L405
32,869
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.getHead
public TemplateSubPatternAssociation getHead(XPathContext xctxt, int targetNode, DTM dtm) { short targetNodeType = dtm.getNodeType(targetNode); TemplateSubPatternAssociation head; switch (targetNodeType) { case DTM.ELEMENT_NODE : case DTM.ATTRIB...
java
public TemplateSubPatternAssociation getHead(XPathContext xctxt, int targetNode, DTM dtm) { short targetNodeType = dtm.getNodeType(targetNode); TemplateSubPatternAssociation head; switch (targetNodeType) { case DTM.ELEMENT_NODE : case DTM.ATTRIB...
[ "public", "TemplateSubPatternAssociation", "getHead", "(", "XPathContext", "xctxt", ",", "int", "targetNode", ",", "DTM", "dtm", ")", "{", "short", "targetNodeType", "=", "dtm", ".", "getNodeType", "(", "targetNode", ")", ";", "TemplateSubPatternAssociation", "head"...
Get the head of the most likely list of associations to check, based on the name and type of the targetNode argument. @param xctxt The XPath runtime context. @param targetNode The target node that will be checked for a match. @param dtm The dtm owner for the target node. @return The head of a linked list that contain...
[ "Get", "the", "head", "of", "the", "most", "likely", "list", "of", "associations", "to", "check", "based", "on", "the", "name", "and", "type", "of", "the", "targetNode", "argument", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L430-L470
32,870
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.getTemplateFast
public ElemTemplate getTemplateFast(XPathContext xctxt, int targetNode, int expTypeID, QName mode, int maxImportLevel, boolean quietConflictWarnings, ...
java
public ElemTemplate getTemplateFast(XPathContext xctxt, int targetNode, int expTypeID, QName mode, int maxImportLevel, boolean quietConflictWarnings, ...
[ "public", "ElemTemplate", "getTemplateFast", "(", "XPathContext", "xctxt", ",", "int", "targetNode", ",", "int", "expTypeID", ",", "QName", "mode", ",", "int", "maxImportLevel", ",", "boolean", "quietConflictWarnings", ",", "DTM", "dtm", ")", "throws", "Transforme...
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft. This variation of getTemplate assumes the current node and current expression node have already been pushed. @param xctxt @param targetNode @param mode A string indicating the disp...
[ "Given", "a", "target", "element", "find", "the", "template", "that", "best", "matches", "in", "the", "given", "XSL", "document", "according", "to", "the", "rules", "specified", "in", "the", "xsl", "draft", ".", "This", "variation", "of", "getTemplate", "ass...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L492-L576
32,871
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.getTemplate
public ElemTemplate getTemplate(XPathContext xctxt, int targetNode, QName mode, boolean quietConflictWarnings, DTM dtm) throws TransformerException { TemplateSubPatternAssoc...
java
public ElemTemplate getTemplate(XPathContext xctxt, int targetNode, QName mode, boolean quietConflictWarnings, DTM dtm) throws TransformerException { TemplateSubPatternAssoc...
[ "public", "ElemTemplate", "getTemplate", "(", "XPathContext", "xctxt", ",", "int", "targetNode", ",", "QName", "mode", ",", "boolean", "quietConflictWarnings", ",", "DTM", "dtm", ")", "throws", "TransformerException", "{", "TemplateSubPatternAssociation", "head", "=",...
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft. @param xctxt @param targetNode @param mode A string indicating the display mode. @param quietConflictWarnings @return Rule that best matches targetElem. @throws XSLProcessorExceptio...
[ "Given", "a", "target", "element", "find", "the", "template", "that", "best", "matches", "in", "the", "given", "XSL", "document", "according", "to", "the", "rules", "specified", "in", "the", "xsl", "draft", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L593-L636
32,872
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.addObjectIfNotFound
private void addObjectIfNotFound(Object obj, Vector v) { int n = v.size(); boolean addIt = true; for (int i = 0; i < n; i++) { if (v.elementAt(i) == obj) { addIt = false; break; } } if (addIt) { v.addElement(obj); } }
java
private void addObjectIfNotFound(Object obj, Vector v) { int n = v.size(); boolean addIt = true; for (int i = 0; i < n; i++) { if (v.elementAt(i) == obj) { addIt = false; break; } } if (addIt) { v.addElement(obj); } }
[ "private", "void", "addObjectIfNotFound", "(", "Object", "obj", ",", "Vector", "v", ")", "{", "int", "n", "=", "v", ".", "size", "(", ")", ";", "boolean", "addIt", "=", "true", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i"...
Add object to vector if not already there. @param obj @param v
[ "Add", "object", "to", "vector", "if", "not", "already", "there", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L739-L759
32,873
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java
TemplateList.putHead
private void putHead(String key, TemplateSubPatternAssociation assoc) { if (key.equals(PsuedoNames.PSEUDONAME_TEXT)) m_textPatterns = assoc; else if (key.equals(PsuedoNames.PSEUDONAME_ROOT)) m_docPatterns = assoc; else if (key.equals(PsuedoNames.PSEUDONAME_COMMENT)) m_commentPatterns = ...
java
private void putHead(String key, TemplateSubPatternAssociation assoc) { if (key.equals(PsuedoNames.PSEUDONAME_TEXT)) m_textPatterns = assoc; else if (key.equals(PsuedoNames.PSEUDONAME_ROOT)) m_docPatterns = assoc; else if (key.equals(PsuedoNames.PSEUDONAME_COMMENT)) m_commentPatterns = ...
[ "private", "void", "putHead", "(", "String", "key", ",", "TemplateSubPatternAssociation", "assoc", ")", "{", "if", "(", "key", ".", "equals", "(", "PsuedoNames", ".", "PSEUDONAME_TEXT", ")", ")", "m_textPatterns", "=", "assoc", ";", "else", "if", "(", "key",...
Get the head of the assocation list that is keyed by target. @param key @param assoc
[ "Get", "the", "head", "of", "the", "assocation", "list", "that", "is", "keyed", "by", "target", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateList.java#L842-L853
32,874
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Holiday.java
Holiday.firstBetween
@Override public Date firstBetween(Date start, Date end) { return rule.firstBetween(start, end); }
java
@Override public Date firstBetween(Date start, Date end) { return rule.firstBetween(start, end); }
[ "@", "Override", "public", "Date", "firstBetween", "(", "Date", "start", ",", "Date", "end", ")", "{", "return", "rule", ".", "firstBetween", "(", "start", ",", "end", ")", ";", "}" ]
Return the first occurrence of this holiday that is on or after the given start date and before the given end date. @param start Only occurrences on or after this date are returned. @param end Only occurrences before this date are returned. @return The date on which this event occurs, or null if it does not oc...
[ "Return", "the", "first", "occurrence", "of", "this", "holiday", "that", "is", "on", "or", "after", "the", "given", "start", "date", "and", "before", "the", "given", "end", "date", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Holiday.java#L92-L95
32,875
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Holiday.java
Holiday.isBetween
@Override public boolean isBetween(Date start, Date end) { return rule.isBetween(start, end); }
java
@Override public boolean isBetween(Date start, Date end) { return rule.isBetween(start, end); }
[ "@", "Override", "public", "boolean", "isBetween", "(", "Date", "start", ",", "Date", "end", ")", "{", "return", "rule", ".", "isBetween", "(", "start", ",", "end", ")", ";", "}" ]
Check whether this holiday occurs at least once between the two dates given. @hide draft / provisional / internal are hidden on Android
[ "Check", "whether", "this", "holiday", "occurs", "at", "least", "once", "between", "the", "two", "dates", "given", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Holiday.java#L117-L120
32,876
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
XMLReaderAdapter.setup
private void setup (XMLReader xmlReader) { if (xmlReader == null) { throw new NullPointerException("XMLReader must not be null"); } this.xmlReader = xmlReader; qAtts = new AttributesAdapter(); }
java
private void setup (XMLReader xmlReader) { if (xmlReader == null) { throw new NullPointerException("XMLReader must not be null"); } this.xmlReader = xmlReader; qAtts = new AttributesAdapter(); }
[ "private", "void", "setup", "(", "XMLReader", "xmlReader", ")", "{", "if", "(", "xmlReader", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"XMLReader must not be null\"", ")", ";", "}", "this", ".", "xmlReader", "=", "xmlReader", ";", ...
Internal setup. @param xmlReader The embedded XMLReader.
[ "Internal", "setup", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java#L98-L105
32,877
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
XMLReaderAdapter.setupXMLReader
private void setupXMLReader () throws SAXException { xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); try { xmlReader.setFeature("http://xml.org/sax/features/namespaces", false); } catch (SAXException e) { // NO OP: it's just ...
java
private void setupXMLReader () throws SAXException { xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); try { xmlReader.setFeature("http://xml.org/sax/features/namespaces", false); } catch (SAXException e) { // NO OP: it's just ...
[ "private", "void", "setupXMLReader", "(", ")", "throws", "SAXException", "{", "xmlReader", ".", "setFeature", "(", "\"http://xml.org/sax/features/namespace-prefixes\"", ",", "true", ")", ";", "try", "{", "xmlReader", ".", "setFeature", "(", "\"http://xml.org/sax/feature...
Set up the XML reader.
[ "Set", "up", "the", "XML", "reader", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java#L230-L241
32,878
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
XMLReaderAdapter.startElement
public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException { if (documentHandler != null) { qAtts.setAttributes(atts); documentHandler.startElement(qName, qAtts); } }
java
public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException { if (documentHandler != null) { qAtts.setAttributes(atts); documentHandler.startElement(qName, qAtts); } }
[ "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "atts", ")", "throws", "SAXException", "{", "if", "(", "documentHandler", "!=", "null", ")", "{", "qAtts", ".", "setAttributes", "(...
Adapt a SAX2 start element event. @param uri The Namespace URI. @param localName The Namespace local name. @param qName The qualified (prefixed) name. @param atts The SAX2 attributes. @exception org.xml.sax.SAXException The client may raise a processing exception. @see org.xml.sax.ContentHandler#endDocument
[ "Adapt", "a", "SAX2", "start", "element", "event", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java#L327-L335
32,879
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
XMLReaderAdapter.endElement
public void endElement (String uri, String localName, String qName) throws SAXException { if (documentHandler != null) documentHandler.endElement(qName); }
java
public void endElement (String uri, String localName, String qName) throws SAXException { if (documentHandler != null) documentHandler.endElement(qName); }
[ "public", "void", "endElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "if", "(", "documentHandler", "!=", "null", ")", "documentHandler", ".", "endElement", "(", "qName", ")", ";", "}" ]
Adapt a SAX2 end element event. @param uri The Namespace URI. @param localName The Namespace local name. @param qName The qualified (prefixed) name. @exception org.xml.sax.SAXException The client may raise a processing exception. @see org.xml.sax.ContentHandler#endElement
[ "Adapt", "a", "SAX2", "end", "element", "event", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java#L348-L354
32,880
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
XMLReaderAdapter.processingInstruction
public void processingInstruction (String target, String data) throws SAXException { if (documentHandler != null) documentHandler.processingInstruction(target, data); }
java
public void processingInstruction (String target, String data) throws SAXException { if (documentHandler != null) documentHandler.processingInstruction(target, data); }
[ "public", "void", "processingInstruction", "(", "String", "target", ",", "String", "data", ")", "throws", "SAXException", "{", "if", "(", "documentHandler", "!=", "null", ")", "documentHandler", ".", "processingInstruction", "(", "target", ",", "data", ")", ";",...
Adapt a SAX2 processing instruction event. @param target The processing instruction target. @param data The remainder of the processing instruction @exception org.xml.sax.SAXException The client may raise a processing exception. @see org.xml.sax.ContentHandler#processingInstruction
[ "Adapt", "a", "SAX2", "processing", "instruction", "event", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java#L402-L407
32,881
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Pair.java
Pair.of
public static <F, S> Pair<F, S> of(F first, S second) { if (first == null || second == null) { throw new IllegalArgumentException("Pair.of requires non null values."); } return new Pair<F, S>(first, second); }
java
public static <F, S> Pair<F, S> of(F first, S second) { if (first == null || second == null) { throw new IllegalArgumentException("Pair.of requires non null values."); } return new Pair<F, S>(first, second); }
[ "public", "static", "<", "F", ",", "S", ">", "Pair", "<", "F", ",", "S", ">", "of", "(", "F", "first", ",", "S", "second", ")", "{", "if", "(", "first", "==", "null", "||", "second", "==", "null", ")", "{", "throw", "new", "IllegalArgumentExcepti...
Creates a pair object @param first must be non-null @param second must be non-null @return The pair object.
[ "Creates", "a", "pair", "object" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Pair.java#L34-L39
32,882
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java
URLStreamHandler.sameFile
protected boolean sameFile(URL u1, URL u2) { // Compare the protocols. if (!((u1.getProtocol() == u2.getProtocol()) || (u1.getProtocol() != null && u1.getProtocol().equalsIgnoreCase(u2.getProtocol())))) return false; // Compare the files. if (!(u...
java
protected boolean sameFile(URL u1, URL u2) { // Compare the protocols. if (!((u1.getProtocol() == u2.getProtocol()) || (u1.getProtocol() != null && u1.getProtocol().equalsIgnoreCase(u2.getProtocol())))) return false; // Compare the files. if (!(u...
[ "protected", "boolean", "sameFile", "(", "URL", "u1", ",", "URL", "u2", ")", "{", "// Compare the protocols.", "if", "(", "!", "(", "(", "u1", ".", "getProtocol", "(", ")", "==", "u2", ".", "getProtocol", "(", ")", ")", "||", "(", "u1", ".", "getProt...
Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path. This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called indirectly by java.net.URL class. @param u1 a URL object @param u2 a URL object @return true i...
[ "Compare", "two", "urls", "to", "see", "whether", "they", "refer", "to", "the", "same", "file", "i", ".", "e", ".", "having", "the", "same", "protocol", "host", "port", "and", "path", ".", "This", "method", "requires", "that", "none", "of", "its", "arg...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java#L414-L444
32,883
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java
URLStreamHandler.getHostAddress
protected synchronized InetAddress getHostAddress(URL u) { if (u.hostAddress != null) return (InetAddress) u.hostAddress; String host = u.getHost(); if (host == null || host.equals("")) { return null; } else { try { u.hostAddress = Ine...
java
protected synchronized InetAddress getHostAddress(URL u) { if (u.hostAddress != null) return (InetAddress) u.hostAddress; String host = u.getHost(); if (host == null || host.equals("")) { return null; } else { try { u.hostAddress = Ine...
[ "protected", "synchronized", "InetAddress", "getHostAddress", "(", "URL", "u", ")", "{", "if", "(", "u", ".", "hostAddress", "!=", "null", ")", "return", "(", "InetAddress", ")", "u", ".", "hostAddress", ";", "String", "host", "=", "u", ".", "getHost", "...
Get the IP address of our host. An empty host field or a DNS failure will result in a null return. @param u a URL object @return an {@code InetAddress} representing the host IP address. @since 1.3
[ "Get", "the", "IP", "address", "of", "our", "host", ".", "An", "empty", "host", "field", "or", "a", "DNS", "failure", "will", "result", "in", "a", "null", "return", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java#L455-L472
32,884
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompoundTransliterator.java
CompoundTransliterator._smartAppend
private static void _smartAppend(StringBuilder buf, char c) { if (buf.length() != 0 && buf.charAt(buf.length() - 1) != c) { buf.append(c); } }
java
private static void _smartAppend(StringBuilder buf, char c) { if (buf.length() != 0 && buf.charAt(buf.length() - 1) != c) { buf.append(c); } }
[ "private", "static", "void", "_smartAppend", "(", "StringBuilder", "buf", ",", "char", "c", ")", "{", "if", "(", "buf", ".", "length", "(", ")", "!=", "0", "&&", "buf", ".", "charAt", "(", "buf", ".", "length", "(", ")", "-", "1", ")", "!=", "c",...
Append c to buf, unless buf is empty or buf already ends in c.
[ "Append", "c", "to", "buf", "unless", "buf", "is", "empty", "or", "buf", "already", "ends", "in", "c", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompoundTransliterator.java#L250-L255
32,885
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/CachedXPathAPI.java
CachedXPathAPI.selectSingleNode
public Node selectSingleNode( Node contextNode, String str, Node namespaceNode) throws TransformerException { // Have the XObject return its result as a NodeSetDTM. NodeIterator nl = selectNodeIterator(contextNode, str, namespaceNode); // Return the first node, or null return ...
java
public Node selectSingleNode( Node contextNode, String str, Node namespaceNode) throws TransformerException { // Have the XObject return its result as a NodeSetDTM. NodeIterator nl = selectNodeIterator(contextNode, str, namespaceNode); // Return the first node, or null return ...
[ "public", "Node", "selectSingleNode", "(", "Node", "contextNode", ",", "String", "str", ",", "Node", "namespaceNode", ")", "throws", "TransformerException", "{", "// Have the XObject return its result as a NodeSetDTM.", "NodeIterator", "nl", "=", "selectNodeIterator", "(", ...
Use an XPath string to select a single node. XPath namespace prefixes are resolved from the namespaceNode. @param contextNode The node to start searching from. @param str A valid XPath string. @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. @return The first node found th...
[ "Use", "an", "XPath", "string", "to", "select", "a", "single", "node", ".", "XPath", "namespace", "prefixes", "are", "resolved", "from", "the", "namespaceNode", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/CachedXPathAPI.java#L138-L148
32,886
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLServerSocket.java
SSLServerSocket.getSSLParameters
public SSLParameters getSSLParameters() { SSLParameters parameters = new SSLParameters(); parameters.setCipherSuites(getEnabledCipherSuites()); parameters.setProtocols(getEnabledProtocols()); if (getNeedClientAuth()) { parameters.setNeedClientAuth(true); } else if (g...
java
public SSLParameters getSSLParameters() { SSLParameters parameters = new SSLParameters(); parameters.setCipherSuites(getEnabledCipherSuites()); parameters.setProtocols(getEnabledProtocols()); if (getNeedClientAuth()) { parameters.setNeedClientAuth(true); } else if (g...
[ "public", "SSLParameters", "getSSLParameters", "(", ")", "{", "SSLParameters", "parameters", "=", "new", "SSLParameters", "(", ")", ";", "parameters", ".", "setCipherSuites", "(", "getEnabledCipherSuites", "(", ")", ")", ";", "parameters", ".", "setProtocols", "("...
Returns the SSLParameters in effect for newly accepted connections. The ciphersuites and protocols of the returned SSLParameters are always non-null. @return the SSLParameters in effect for newly accepted connections @see #setSSLParameters(SSLParameters) @since 1.7
[ "Returns", "the", "SSLParameters", "in", "effect", "for", "newly", "accepted", "connections", ".", "The", "ciphersuites", "and", "protocols", "of", "the", "returned", "SSLParameters", "are", "always", "non", "-", "null", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLServerSocket.java#L468-L480
32,887
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLServerSocket.java
SSLServerSocket.setSSLParameters
public void setSSLParameters(SSLParameters params) { String[] s; s = params.getCipherSuites(); if (s != null) { setEnabledCipherSuites(s); } s = params.getProtocols(); if (s != null) { setEnabledProtocols(s); } if (params.getNeedC...
java
public void setSSLParameters(SSLParameters params) { String[] s; s = params.getCipherSuites(); if (s != null) { setEnabledCipherSuites(s); } s = params.getProtocols(); if (s != null) { setEnabledProtocols(s); } if (params.getNeedC...
[ "public", "void", "setSSLParameters", "(", "SSLParameters", "params", ")", "{", "String", "[", "]", "s", ";", "s", "=", "params", ".", "getCipherSuites", "(", ")", ";", "if", "(", "s", "!=", "null", ")", "{", "setEnabledCipherSuites", "(", "s", ")", ";...
Applies SSLParameters to newly accepted connections. <p>This means: <ul> <li>If {@code params.getCipherSuites()} is non-null, {@code setEnabledCipherSuites()} is called with that value.</li> <li>If {@code params.getProtocols()} is non-null, {@code setEnabledProtocols()} is called with that value.</li> <li>If {@code pa...
[ "Applies", "SSLParameters", "to", "newly", "accepted", "connections", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLServerSocket.java#L510-L529
32,888
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/CertId.java
CertId.encode
public void encode(DerOutputStream out) throws IOException { DerOutputStream tmp = new DerOutputStream(); hashAlgId.encode(tmp); tmp.putOctetString(issuerNameHash); tmp.putOctetString(issuerKeyHash); certSerialNumber.encode(tmp); out.write(DerValue.tag_Sequence, tmp); ...
java
public void encode(DerOutputStream out) throws IOException { DerOutputStream tmp = new DerOutputStream(); hashAlgId.encode(tmp); tmp.putOctetString(issuerNameHash); tmp.putOctetString(issuerKeyHash); certSerialNumber.encode(tmp); out.write(DerValue.tag_Sequence, tmp); ...
[ "public", "void", "encode", "(", "DerOutputStream", "out", ")", "throws", "IOException", "{", "DerOutputStream", "tmp", "=", "new", "DerOutputStream", "(", ")", ";", "hashAlgId", ".", "encode", "(", "tmp", ")", ";", "tmp", ".", "putOctetString", "(", "issuer...
Encode the CertId using ASN.1 DER. The hash algorithm used is SHA-1.
[ "Encode", "the", "CertId", "using", "ASN", ".", "1", "DER", ".", "The", "hash", "algorithm", "used", "is", "SHA", "-", "1", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/CertId.java#L157-L171
32,889
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java
KeyAgreement.init
public final void init(Key key, SecureRandom random) throws InvalidKeyException { if (spi != null && (key == null || lock == null)) { spi.engineInit(key, random); } else { try { chooseProvider(I_NO_PARAMS, key, null, random); } catch (Inval...
java
public final void init(Key key, SecureRandom random) throws InvalidKeyException { if (spi != null && (key == null || lock == null)) { spi.engineInit(key, random); } else { try { chooseProvider(I_NO_PARAMS, key, null, random); } catch (Inval...
[ "public", "final", "void", "init", "(", "Key", "key", ",", "SecureRandom", "random", ")", "throws", "InvalidKeyException", "{", "if", "(", "spi", "!=", "null", "&&", "(", "key", "==", "null", "||", "lock", "==", "null", ")", ")", "{", "spi", ".", "en...
Initializes this key agreement with the given key and source of randomness. The given key is required to contain all the algorithm parameters required for this key agreement. <p> If the key agreement algorithm requires random bytes, it gets them from the given source of randomness, <code>random</code>. However, if the...
[ "Initializes", "this", "key", "agreement", "with", "the", "given", "key", "and", "source", "of", "randomness", ".", "The", "given", "key", "is", "required", "to", "contain", "all", "the", "algorithm", "parameters", "required", "for", "this", "key", "agreement"...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java#L453-L472
32,890
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java
KeyAgreement.init
public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { init(key, params, JceSecurity.RANDOM); }
java
public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { init(key, params, JceSecurity.RANDOM); }
[ "public", "final", "void", "init", "(", "Key", "key", ",", "AlgorithmParameterSpec", "params", ")", "throws", "InvalidKeyException", ",", "InvalidAlgorithmParameterException", "{", "init", "(", "key", ",", "params", ",", "JceSecurity", ".", "RANDOM", ")", ";", "...
Initializes this key agreement with the given key and set of algorithm parameters. <p> If this key agreement requires any random bytes, it will get them using the {@link java.security.SecureRandom} implementation of the highest-priority installed provider as the source of randomness. (If none of the installed provider...
[ "Initializes", "this", "key", "agreement", "with", "the", "given", "key", "and", "set", "of", "algorithm", "parameters", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java#L497-L501
32,891
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java
KeyAgreement.init
public final void init(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { if (spi != null) { spi.engineInit(key, params, random); } else { chooseProvider(I_PARAMS, ke...
java
public final void init(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { if (spi != null) { spi.engineInit(key, params, random); } else { chooseProvider(I_PARAMS, ke...
[ "public", "final", "void", "init", "(", "Key", "key", ",", "AlgorithmParameterSpec", "params", ",", "SecureRandom", "random", ")", "throws", "InvalidKeyException", ",", "InvalidAlgorithmParameterException", "{", "if", "(", "spi", "!=", "null", ")", "{", "spi", "...
Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness. @param key the party's private information. For example, in the case of the Diffie-Hellman key agreement, this would be the party's own Diffie-Hellman private key. @param params the key agreement parameters @param...
[ "Initializes", "this", "key", "agreement", "with", "the", "given", "key", "set", "of", "algorithm", "parameters", "and", "source", "of", "randomness", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java#L519-L535
32,892
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java
KeyAgreement.doPhase
public final Key doPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException { chooseFirstProvider(); return spi.engineDoPhase(key, lastPhase); }
java
public final Key doPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException { chooseFirstProvider(); return spi.engineDoPhase(key, lastPhase); }
[ "public", "final", "Key", "doPhase", "(", "Key", "key", ",", "boolean", "lastPhase", ")", "throws", "InvalidKeyException", ",", "IllegalStateException", "{", "chooseFirstProvider", "(", ")", ";", "return", "spi", ".", "engineDoPhase", "(", "key", ",", "lastPhase...
Executes the next phase of this key agreement with the given key that was received from one of the other parties involved in this key agreement. @param key the key for this phase. For example, in the case of Diffie-Hellman between 2 parties, this would be the other party's Diffie-Hellman public key. @param lastPhase f...
[ "Executes", "the", "next", "phase", "of", "this", "key", "agreement", "with", "the", "given", "key", "that", "was", "received", "from", "one", "of", "the", "other", "parties", "involved", "in", "this", "key", "agreement", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java#L556-L561
32,893
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java
WalkerFactory.newDTMIterator
public static DTMIterator newDTMIterator( Compiler compiler, int opPos, boolean isTopLevel) throws javax.xml.transform.TransformerException { int firstStepPos = OpMap.getFirstChildPos(opPos); int analysis = analyze(compiler, firstStepPos, 0); boolean isOneStep = isOneStep(...
java
public static DTMIterator newDTMIterator( Compiler compiler, int opPos, boolean isTopLevel) throws javax.xml.transform.TransformerException { int firstStepPos = OpMap.getFirstChildPos(opPos); int analysis = analyze(compiler, firstStepPos, 0); boolean isOneStep = isOneStep(...
[ "public", "static", "DTMIterator", "newDTMIterator", "(", "Compiler", "compiler", ",", "int", "opPos", ",", "boolean", "isTopLevel", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "int", "firstStepPos", "=", "OpMap", ".",...
Create a new LocPathIterator iterator. The exact type of iterator returned is based on an analysis of the XPath operations. @param compiler non-null reference to compiler object that has processed the XPath operations into an opcode map. @param opPos The position of the operation code for this itterator. @return non...
[ "Create", "a", "new", "LocPathIterator", "iterator", ".", "The", "exact", "type", "of", "iterator", "returned", "is", "based", "on", "an", "analysis", "of", "the", "XPath", "operations", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java#L158-L285
32,894
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java
WalkerFactory.getAnalysisBitFromAxes
static public int getAnalysisBitFromAxes(int axis) { switch (axis) // Generate new traverser { case Axis.ANCESTOR : return BIT_ANCESTOR; case Axis.ANCESTORORSELF : return BIT_ANCESTOR_OR_SELF; case Axis.ATTRIBUTE : return BIT_ATTRIBUTE; cas...
java
static public int getAnalysisBitFromAxes(int axis) { switch (axis) // Generate new traverser { case Axis.ANCESTOR : return BIT_ANCESTOR; case Axis.ANCESTORORSELF : return BIT_ANCESTOR_OR_SELF; case Axis.ATTRIBUTE : return BIT_ATTRIBUTE; cas...
[ "static", "public", "int", "getAnalysisBitFromAxes", "(", "int", "axis", ")", "{", "switch", "(", "axis", ")", "// Generate new traverser", "{", "case", "Axis", ".", "ANCESTOR", ":", "return", "BIT_ANCESTOR", ";", "case", "Axis", ".", "ANCESTORORSELF", ":", "r...
Get a corresponding BIT_XXX from an axis. @param axis One of Axis.ANCESTOR, etc. @return One of BIT_ANCESTOR, etc.
[ "Get", "a", "corresponding", "BIT_XXX", "from", "an", "axis", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java#L353-L398
32,895
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java
WalkerFactory.mightBeProximate
public static boolean mightBeProximate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException { boolean mightBeProximate = false; int argLen; switch (stepType) { case OpCodes.OP_VARIABLE : case OpCodes.OP_EXTFUNCTION : case OpCodes.OP_FUNCTI...
java
public static boolean mightBeProximate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException { boolean mightBeProximate = false; int argLen; switch (stepType) { case OpCodes.OP_VARIABLE : case OpCodes.OP_EXTFUNCTION : case OpCodes.OP_FUNCTI...
[ "public", "static", "boolean", "mightBeProximate", "(", "Compiler", "compiler", ",", "int", "opPos", ",", "int", "stepType", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "boolean", "mightBeProximate", "=", "false", ";",...
Tell if the predicates need to have proximity knowledge.
[ "Tell", "if", "the", "predicates", "need", "to", "have", "proximity", "knowledge", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java#L473-L540
32,896
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java
WalkerFactory.analyze
private static int analyze( Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException { int stepType; int stepCount = 0; int analysisResult = 0x00000000; // 32 bits of analysis while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOp...
java
private static int analyze( Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException { int stepType; int stepCount = 0; int analysisResult = 0x00000000; // 32 bits of analysis while (OpCodes.ENDOP != (stepType = compiler.getOp(stepOp...
[ "private", "static", "int", "analyze", "(", "Compiler", "compiler", ",", "int", "stepOpCodePos", ",", "int", "stepIndex", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "int", "stepType", ";", "int", "stepCount", "=", ...
Analyze the location path and return 32 bits that give information about the location path as a whole. See the BIT_XXX constants for meaning about each of the bits. @param compiler non-null reference to compiler object that has processed the XPath operations into an opcode map. @param stepOpCodePos The opcode positio...
[ "Analyze", "the", "location", "path", "and", "return", "32", "bits", "that", "give", "information", "about", "the", "location", "path", "as", "a", "whole", ".", "See", "the", "BIT_XXX", "constants", "for", "meaning", "about", "each", "of", "the", "bits", "...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java#L664-L773
32,897
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java
WalkerFactory.isDownwardAxisOfMany
public static boolean isDownwardAxisOfMany(int axis) { return ((Axis.DESCENDANTORSELF == axis) || (Axis.DESCENDANT == axis) || (Axis.FOLLOWING == axis) // || (Axis.FOLLOWINGSIBLING == axis) || (Axis.PRECEDING == axis) // || (Axis.PRECEDINGSIBLING == axis) ...
java
public static boolean isDownwardAxisOfMany(int axis) { return ((Axis.DESCENDANTORSELF == axis) || (Axis.DESCENDANT == axis) || (Axis.FOLLOWING == axis) // || (Axis.FOLLOWINGSIBLING == axis) || (Axis.PRECEDING == axis) // || (Axis.PRECEDINGSIBLING == axis) ...
[ "public", "static", "boolean", "isDownwardAxisOfMany", "(", "int", "axis", ")", "{", "return", "(", "(", "Axis", ".", "DESCENDANTORSELF", "==", "axis", ")", "||", "(", "Axis", ".", "DESCENDANT", "==", "axis", ")", "||", "(", "Axis", ".", "FOLLOWING", "==...
Tell if the given axis goes downword. Bogus name, if you can think of a better one, please do tell. This really has to do with inverting attribute axis. @param axis One of Axis.XXX. @return true if the axis is not a child axis and does not go up from the axis root.
[ "Tell", "if", "the", "given", "axis", "goes", "downword", ".", "Bogus", "name", "if", "you", "can", "think", "of", "a", "better", "one", "please", "do", "tell", ".", "This", "really", "has", "to", "do", "with", "inverting", "attribute", "axis", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java#L783-L792
32,898
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java
WalkerFactory.analyzePredicate
static boolean analyzePredicate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException { int argLen; switch (stepType) { case OpCodes.OP_VARIABLE : case OpCodes.OP_EXTFUNCTION : case OpCodes.OP_FUNCTION : case OpCodes.OP_GROUP : argLen...
java
static boolean analyzePredicate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException { int argLen; switch (stepType) { case OpCodes.OP_VARIABLE : case OpCodes.OP_EXTFUNCTION : case OpCodes.OP_FUNCTION : case OpCodes.OP_GROUP : argLen...
[ "static", "boolean", "analyzePredicate", "(", "Compiler", "compiler", ",", "int", "opPos", ",", "int", "stepType", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "int", "argLen", ";", "switch", "(", "stepType", ")", "...
Analyze a step and give information about it's predicates. Right now this just returns true or false if the step has a predicate. @param compiler non-null reference to compiler object that has processed the XPath operations into an opcode map. @param opPos The opcode position for the step. @param stepType The type of...
[ "Analyze", "a", "step", "and", "give", "information", "about", "it", "s", "predicates", ".", "Right", "now", "this", "just", "returns", "true", "or", "false", "if", "the", "step", "has", "a", "predicate", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkerFactory.java#L1127-L1149
32,899
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DecimalFormatSymbols.java
DecimalFormatSymbols.setCurrency
public void setCurrency(Currency currency) { if (currency == null) { throw new NullPointerException(); } this.currency = currency; intlCurrencySymbol = currency.getCurrencyCode(); currencySymbol = currency.getSymbol(locale); //cachedIcuDFS = null; }
java
public void setCurrency(Currency currency) { if (currency == null) { throw new NullPointerException(); } this.currency = currency; intlCurrencySymbol = currency.getCurrencyCode(); currencySymbol = currency.getSymbol(locale); //cachedIcuDFS = null; }
[ "public", "void", "setCurrency", "(", "Currency", "currency", ")", "{", "if", "(", "currency", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "this", ".", "currency", "=", "currency", ";", "intlCurrencySymbol", "=", "cu...
Sets the currency of these DecimalFormatSymbols. This also sets the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale, and the international currency symbol attribute to the currency's ISO 4217 currency code. @param currency the new currency to be used @exception NullPointerExcepti...
[ "Sets", "the", "currency", "of", "these", "DecimalFormatSymbols", ".", "This", "also", "sets", "the", "currency", "symbol", "attribute", "to", "the", "currency", "s", "symbol", "in", "the", "DecimalFormatSymbols", "locale", "and", "the", "international", "currency...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DecimalFormatSymbols.java#L474-L482