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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,700 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.hasNoMajorSolarTerm | private boolean hasNoMajorSolarTerm(int newMoon) {
int mst = majorSolarTerm(newMoon);
int nmn = newMoonNear(newMoon + SYNODIC_GAP, true);
int mstt = majorSolarTerm(nmn);
return mst == mstt;
/*
return majorSolarTerm(newMoon) ==
majorSolarTerm(newMoonNe... | java | private boolean hasNoMajorSolarTerm(int newMoon) {
int mst = majorSolarTerm(newMoon);
int nmn = newMoonNear(newMoon + SYNODIC_GAP, true);
int mstt = majorSolarTerm(nmn);
return mst == mstt;
/*
return majorSolarTerm(newMoon) ==
majorSolarTerm(newMoonNe... | [
"private",
"boolean",
"hasNoMajorSolarTerm",
"(",
"int",
"newMoon",
")",
"{",
"int",
"mst",
"=",
"majorSolarTerm",
"(",
"newMoon",
")",
";",
"int",
"nmn",
"=",
"newMoonNear",
"(",
"newMoon",
"+",
"SYNODIC_GAP",
",",
"true",
")",
";",
"int",
"mstt",
"=",
... | Return true if the given month lacks a major solar term.
@param newMoon days after January 1, 1970 0:00 Asia/Shanghai of a new
moon | [
"Return",
"true",
"if",
"the",
"given",
"month",
"lacks",
"a",
"major",
"solar",
"term",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L754-L764 |
34,701 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.isLeapMonthBetween | private boolean isLeapMonthBetween(int newMoon1, int newMoon2) {
// This is only needed to debug the timeOfAngle divergence bug.
// Remove this later. Liu 11/9/00
// DEBUG
if (synodicMonthsBetween(newMoon1, newMoon2) >= 50) {
throw new IllegalArgumentException("isLeapMonthBe... | java | private boolean isLeapMonthBetween(int newMoon1, int newMoon2) {
// This is only needed to debug the timeOfAngle divergence bug.
// Remove this later. Liu 11/9/00
// DEBUG
if (synodicMonthsBetween(newMoon1, newMoon2) >= 50) {
throw new IllegalArgumentException("isLeapMonthBe... | [
"private",
"boolean",
"isLeapMonthBetween",
"(",
"int",
"newMoon1",
",",
"int",
"newMoon2",
")",
"{",
"// This is only needed to debug the timeOfAngle divergence bug.",
"// Remove this later. Liu 11/9/00",
"// DEBUG",
"if",
"(",
"synodicMonthsBetween",
"(",
"newMoon1",
",",
"... | Return true if there is a leap month on or after month newMoon1 and
at or before month newMoon2.
@param newMoon1 days after January 1, 1970 0:00 astronomical base zone of a
new moon
@param newMoon2 days after January 1, 1970 0:00 astronomical base zone of a
new moon | [
"Return",
"true",
"if",
"there",
"is",
"a",
"leap",
"month",
"on",
"or",
"after",
"month",
"newMoon1",
"and",
"at",
"or",
"before",
"month",
"newMoon2",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L778-L792 |
34,702 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.newYear | private int newYear(int gyear) {
long cacheValue = newYearCache.get(gyear);
if (cacheValue == CalendarCache.EMPTY) {
int solsticeBefore= winterSolstice(gyear - 1);
int solsticeAfter = winterSolstice(gyear);
int newMoon1 = newMoonNear(solsticeBefore + 1, true);
... | java | private int newYear(int gyear) {
long cacheValue = newYearCache.get(gyear);
if (cacheValue == CalendarCache.EMPTY) {
int solsticeBefore= winterSolstice(gyear - 1);
int solsticeAfter = winterSolstice(gyear);
int newMoon1 = newMoonNear(solsticeBefore + 1, true);
... | [
"private",
"int",
"newYear",
"(",
"int",
"gyear",
")",
"{",
"long",
"cacheValue",
"=",
"newYearCache",
".",
"get",
"(",
"gyear",
")",
";",
"if",
"(",
"cacheValue",
"==",
"CalendarCache",
".",
"EMPTY",
")",
"{",
"int",
"solsticeBefore",
"=",
"winterSolstice... | Return the Chinese new year of the given Gregorian year.
@param gyear a Gregorian year
@return days after January 1, 1970 0:00 astronomical base zone of the
Chinese new year of the given year (this will be a new moon) | [
"Return",
"the",
"Chinese",
"new",
"year",
"of",
"the",
"given",
"Gregorian",
"year",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L918-L940 |
34,703 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.handleComputeMonthStart | protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
// If the month is out of range, adjust it into range, and
// modify the extended year value accordingly.
if (month < 0 || month > 11) {
int[] rem = new int[1];
eyear += floorDivide(month, 12... | java | protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) {
// If the month is out of range, adjust it into range, and
// modify the extended year value accordingly.
if (month < 0 || month > 11) {
int[] rem = new int[1];
eyear += floorDivide(month, 12... | [
"protected",
"int",
"handleComputeMonthStart",
"(",
"int",
"eyear",
",",
"int",
"month",
",",
"boolean",
"useMonth",
")",
"{",
"// If the month is out of range, adjust it into range, and",
"// modify the extended year value accordingly.",
"if",
"(",
"month",
"<",
"0",
"||",... | Return the Julian day number of day before the first day of the
given month in the given extended year.
<p>Note: This method reads the IS_LEAP_MONTH field to determine
whether the given month is a leap month.
@param eyear the extended year
@param month the zero-based month. The month is also determined
by reading the... | [
"Return",
"the",
"Julian",
"day",
"number",
"of",
"day",
"before",
"the",
"first",
"day",
"of",
"the",
"given",
"month",
"in",
"the",
"given",
"extended",
"year",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L954-L993 |
34,704 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.readObject | private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
epochYear = CHINESE_EPOCH_YEAR;
zoneAstro = CHINA_ZONE;
stream.defaultReadObject();
/* set up the transient caches... */
astro = new CalendarAstronomer();
winterSo... | java | private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
epochYear = CHINESE_EPOCH_YEAR;
zoneAstro = CHINA_ZONE;
stream.defaultReadObject();
/* set up the transient caches... */
astro = new CalendarAstronomer();
winterSo... | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"stream",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"epochYear",
"=",
"CHINESE_EPOCH_YEAR",
";",
"zoneAstro",
"=",
"CHINA_ZONE",
";",
"stream",
".",
"defaultReadObject",
"(",
")",
";"... | Override readObject. | [
"Override",
"readObject",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L1016-L1028 |
34,705 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDUTF16CollationIterator.java | FCDUTF16CollationIterator.nextSegment | private void nextSegment() {
assert(checkDir > 0 && seq == rawSeq && pos != limit);
// The input text [segmentStart..pos[ passes the FCD check.
int p = pos;
int prevCC = 0;
for(;;) {
// Fetch the next character's fcd16 value.
int q = p;
int c =... | java | private void nextSegment() {
assert(checkDir > 0 && seq == rawSeq && pos != limit);
// The input text [segmentStart..pos[ passes the FCD check.
int p = pos;
int prevCC = 0;
for(;;) {
// Fetch the next character's fcd16 value.
int q = p;
int c =... | [
"private",
"void",
"nextSegment",
"(",
")",
"{",
"assert",
"(",
"checkDir",
">",
"0",
"&&",
"seq",
"==",
"rawSeq",
"&&",
"pos",
"!=",
"limit",
")",
";",
"// The input text [segmentStart..pos[ passes the FCD check.",
"int",
"p",
"=",
"pos",
";",
"int",
"prevCC"... | Extend the FCD text segment forward or normalize around pos.
To be called when checkDir > 0 && pos != limit.
Returns with checkDir == 0 and pos != limit. | [
"Extend",
"the",
"FCD",
"text",
"segment",
"forward",
"or",
"normalize",
"around",
"pos",
".",
"To",
"be",
"called",
"when",
"checkDir",
">",
"0",
"&&",
"pos",
"!",
"=",
"limit",
".",
"Returns",
"with",
"checkDir",
"==",
"0",
"and",
"pos",
"!",
"=",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDUTF16CollationIterator.java#L260-L298 |
34,706 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDUTF16CollationIterator.java | FCDUTF16CollationIterator.previousSegment | private void previousSegment() {
assert(checkDir < 0 && seq == rawSeq && pos != start);
// The input text [pos..segmentLimit[ passes the FCD check.
int p = pos;
int nextCC = 0;
for(;;) {
// Fetch the previous character's fcd16 value.
int q = p;
... | java | private void previousSegment() {
assert(checkDir < 0 && seq == rawSeq && pos != start);
// The input text [pos..segmentLimit[ passes the FCD check.
int p = pos;
int nextCC = 0;
for(;;) {
// Fetch the previous character's fcd16 value.
int q = p;
... | [
"private",
"void",
"previousSegment",
"(",
")",
"{",
"assert",
"(",
"checkDir",
"<",
"0",
"&&",
"seq",
"==",
"rawSeq",
"&&",
"pos",
"!=",
"start",
")",
";",
"// The input text [pos..segmentLimit[ passes the FCD check.",
"int",
"p",
"=",
"pos",
";",
"int",
"nex... | Extend the FCD text segment backward or normalize around pos.
To be called when checkDir < 0 && pos != start.
Returns with checkDir == 0 and pos != start. | [
"Extend",
"the",
"FCD",
"text",
"segment",
"backward",
"or",
"normalize",
"around",
"pos",
".",
"To",
"be",
"called",
"when",
"checkDir",
"<",
"0",
"&&",
"pos",
"!",
"=",
"start",
".",
"Returns",
"with",
"checkDir",
"==",
"0",
"and",
"pos",
"!",
"=",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDUTF16CollationIterator.java#L336-L375 |
34,707 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/LockSupport.java | LockSupport.setBlocker | private static void setBlocker(Thread t, Object arg) {
// Even though volatile, hotspot doesn't need a write barrier here.
U.putObject(t, PARKBLOCKER, arg);
} | java | private static void setBlocker(Thread t, Object arg) {
// Even though volatile, hotspot doesn't need a write barrier here.
U.putObject(t, PARKBLOCKER, arg);
} | [
"private",
"static",
"void",
"setBlocker",
"(",
"Thread",
"t",
",",
"Object",
"arg",
")",
"{",
"// Even though volatile, hotspot doesn't need a write barrier here.",
"U",
".",
"putObject",
"(",
"t",
",",
"PARKBLOCKER",
",",
"arg",
")",
";",
"}"
] | Cannot be instantiated. | [
"Cannot",
"be",
"instantiated",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/LockSupport.java#L141-L144 |
34,708 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/LockSupport.java | LockSupport.park | public static void park(Object blocker) {
Thread t = Thread.currentThread();
setBlocker(t, blocker);
U.park(false, 0L);
setBlocker(t, null);
} | java | public static void park(Object blocker) {
Thread t = Thread.currentThread();
setBlocker(t, blocker);
U.park(false, 0L);
setBlocker(t, null);
} | [
"public",
"static",
"void",
"park",
"(",
"Object",
"blocker",
")",
"{",
"Thread",
"t",
"=",
"Thread",
".",
"currentThread",
"(",
")",
";",
"setBlocker",
"(",
"t",
",",
"blocker",
")",
";",
"U",
".",
"park",
"(",
"false",
",",
"0L",
")",
";",
"setBl... | Disables the current thread for thread scheduling purposes unless the
permit is available.
<p>If the permit is available then it is consumed and the call returns
immediately; otherwise
the current thread becomes disabled for thread scheduling
purposes and lies dormant until one of three things happens:
<ul>
<li>Some ... | [
"Disables",
"the",
"current",
"thread",
"for",
"thread",
"scheduling",
"purposes",
"unless",
"the",
"permit",
"is",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/LockSupport.java#L190-L195 |
34,709 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/LockSupport.java | LockSupport.parkUntil | public static void parkUntil(Object blocker, long deadline) {
Thread t = Thread.currentThread();
setBlocker(t, blocker);
U.park(true, deadline);
setBlocker(t, null);
} | java | public static void parkUntil(Object blocker, long deadline) {
Thread t = Thread.currentThread();
setBlocker(t, blocker);
U.park(true, deadline);
setBlocker(t, null);
} | [
"public",
"static",
"void",
"parkUntil",
"(",
"Object",
"blocker",
",",
"long",
"deadline",
")",
"{",
"Thread",
"t",
"=",
"Thread",
".",
"currentThread",
"(",
")",
";",
"setBlocker",
"(",
"t",
",",
"blocker",
")",
";",
"U",
".",
"park",
"(",
"true",
... | Disables the current thread for thread scheduling purposes, until
the specified deadline, unless the permit is available.
<p>If the permit is available then it is consumed and the call
returns immediately; otherwise the current thread becomes disabled
for thread scheduling purposes and lies dormant until one of four
t... | [
"Disables",
"the",
"current",
"thread",
"for",
"thread",
"scheduling",
"purposes",
"until",
"the",
"specified",
"deadline",
"unless",
"the",
"permit",
"is",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/LockSupport.java#L271-L276 |
34,710 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.writeFullyImpl | private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb)
throws IOException
{
while (bb.remaining() > 0) {
int n = ch.write(bb);
if (n <= 0)
throw new RuntimeException("no bytes written");
}
} | java | private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb)
throws IOException
{
while (bb.remaining() > 0) {
int n = ch.write(bb);
if (n <= 0)
throw new RuntimeException("no bytes written");
}
} | [
"private",
"static",
"void",
"writeFullyImpl",
"(",
"WritableByteChannel",
"ch",
",",
"ByteBuffer",
"bb",
")",
"throws",
"IOException",
"{",
"while",
"(",
"bb",
".",
"remaining",
"(",
")",
">",
"0",
")",
"{",
"int",
"n",
"=",
"ch",
".",
"write",
"(",
"... | Write all remaining bytes in buffer to the given channel.
If the channel is selectable then it must be configured blocking. | [
"Write",
"all",
"remaining",
"bytes",
"in",
"buffer",
"to",
"the",
"given",
"channel",
".",
"If",
"the",
"channel",
"is",
"selectable",
"then",
"it",
"must",
"be",
"configured",
"blocking",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L75-L83 |
34,711 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.writeFully | private static void writeFully(WritableByteChannel ch, ByteBuffer bb)
throws IOException
{
if (ch instanceof SelectableChannel) {
SelectableChannel sc = (SelectableChannel)ch;
synchronized (sc.blockingLock()) {
if (!sc.isBlocking())
throw n... | java | private static void writeFully(WritableByteChannel ch, ByteBuffer bb)
throws IOException
{
if (ch instanceof SelectableChannel) {
SelectableChannel sc = (SelectableChannel)ch;
synchronized (sc.blockingLock()) {
if (!sc.isBlocking())
throw n... | [
"private",
"static",
"void",
"writeFully",
"(",
"WritableByteChannel",
"ch",
",",
"ByteBuffer",
"bb",
")",
"throws",
"IOException",
"{",
"if",
"(",
"ch",
"instanceof",
"SelectableChannel",
")",
"{",
"SelectableChannel",
"sc",
"=",
"(",
"SelectableChannel",
")",
... | Write all remaining bytes in buffer to the given channel.
@throws IllegalBlockingException
If the channel is selectable and configured non-blocking. | [
"Write",
"all",
"remaining",
"bytes",
"in",
"buffer",
"to",
"the",
"given",
"channel",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L91-L104 |
34,712 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newInputStream | public static InputStream newInputStream(ReadableByteChannel ch) {
checkNotNull(ch, "ch");
return new sun.nio.ch.ChannelInputStream(ch);
} | java | public static InputStream newInputStream(ReadableByteChannel ch) {
checkNotNull(ch, "ch");
return new sun.nio.ch.ChannelInputStream(ch);
} | [
"public",
"static",
"InputStream",
"newInputStream",
"(",
"ReadableByteChannel",
"ch",
")",
"{",
"checkNotNull",
"(",
"ch",
",",
"\"ch\"",
")",
";",
"return",
"new",
"sun",
".",
"nio",
".",
"ch",
".",
"ChannelInputStream",
"(",
"ch",
")",
";",
"}"
] | Constructs a stream that reads bytes from the given channel.
<p> The <tt>read</tt> methods of the resulting stream will throw an
{@link IllegalBlockingModeException} if invoked while the underlying
channel is in non-blocking mode. The stream will not be buffered, and
it will not support the {@link InputStream#mark ma... | [
"Constructs",
"a",
"stream",
"that",
"reads",
"bytes",
"from",
"the",
"given",
"channel",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L124-L127 |
34,713 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newOutputStream | public static OutputStream newOutputStream(final WritableByteChannel ch) {
checkNotNull(ch, "ch");
return new OutputStream() {
private ByteBuffer bb = null;
private byte[] bs = null; // Invoker's previous array
private byte[] b1 = null;
... | java | public static OutputStream newOutputStream(final WritableByteChannel ch) {
checkNotNull(ch, "ch");
return new OutputStream() {
private ByteBuffer bb = null;
private byte[] bs = null; // Invoker's previous array
private byte[] b1 = null;
... | [
"public",
"static",
"OutputStream",
"newOutputStream",
"(",
"final",
"WritableByteChannel",
"ch",
")",
"{",
"checkNotNull",
"(",
"ch",
",",
"\"ch\"",
")",
";",
"return",
"new",
"OutputStream",
"(",
")",
"{",
"private",
"ByteBuffer",
"bb",
"=",
"null",
";",
"... | Constructs a stream that writes bytes to the given channel.
<p> The <tt>write</tt> methods of the resulting stream will throw an
{@link IllegalBlockingModeException} if invoked while the underlying
channel is in non-blocking mode. The stream will not be buffered. The
stream will be safe for access by multiple concur... | [
"Constructs",
"a",
"stream",
"that",
"writes",
"bytes",
"to",
"the",
"given",
"channel",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L143-L183 |
34,714 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newChannel | public static ReadableByteChannel newChannel(final InputStream in) {
checkNotNull(in, "in");
if (in instanceof FileInputStream &&
FileInputStream.class.equals(in.getClass())) {
return ((FileInputStream)in).getChannel();
}
return new ReadableByteChannelImpl(in);
... | java | public static ReadableByteChannel newChannel(final InputStream in) {
checkNotNull(in, "in");
if (in instanceof FileInputStream &&
FileInputStream.class.equals(in.getClass())) {
return ((FileInputStream)in).getChannel();
}
return new ReadableByteChannelImpl(in);
... | [
"public",
"static",
"ReadableByteChannel",
"newChannel",
"(",
"final",
"InputStream",
"in",
")",
"{",
"checkNotNull",
"(",
"in",
",",
"\"in\"",
")",
";",
"if",
"(",
"in",
"instanceof",
"FileInputStream",
"&&",
"FileInputStream",
".",
"class",
".",
"equals",
"(... | Constructs a channel that reads bytes from the given stream.
<p> The resulting channel will not be buffered; it will simply redirect
its I/O operations to the given stream. Closing the channel will in
turn cause the stream to be closed. </p>
@param in
The stream from which bytes are to be read
@return A new read... | [
"Constructs",
"a",
"channel",
"that",
"reads",
"bytes",
"from",
"the",
"given",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L198-L207 |
34,715 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newReader | public static Reader newReader(ReadableByteChannel ch,
CharsetDecoder dec,
int minBufferCap)
{
checkNotNull(ch, "ch");
return StreamDecoder.forDecoder(ch, dec.reset(), minBufferCap);
} | java | public static Reader newReader(ReadableByteChannel ch,
CharsetDecoder dec,
int minBufferCap)
{
checkNotNull(ch, "ch");
return StreamDecoder.forDecoder(ch, dec.reset(), minBufferCap);
} | [
"public",
"static",
"Reader",
"newReader",
"(",
"ReadableByteChannel",
"ch",
",",
"CharsetDecoder",
"dec",
",",
"int",
"minBufferCap",
")",
"{",
"checkNotNull",
"(",
"ch",
",",
"\"ch\"",
")",
";",
"return",
"StreamDecoder",
".",
"forDecoder",
"(",
"ch",
",",
... | Constructs a reader that decodes bytes from the given channel using the
given decoder.
<p> The resulting stream will contain an internal input buffer of at
least <tt>minBufferCap</tt> bytes. The stream's <tt>read</tt> methods
will, as needed, fill the buffer by reading bytes from the underlying
channel; if the channe... | [
"Constructs",
"a",
"reader",
"that",
"decodes",
"bytes",
"from",
"the",
"given",
"channel",
"using",
"the",
"given",
"decoder",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L349-L355 |
34,716 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newReader | public static Reader newReader(ReadableByteChannel ch,
String csName)
{
checkNotNull(csName, "csName");
return newReader(ch, Charset.forName(csName).newDecoder(), -1);
} | java | public static Reader newReader(ReadableByteChannel ch,
String csName)
{
checkNotNull(csName, "csName");
return newReader(ch, Charset.forName(csName).newDecoder(), -1);
} | [
"public",
"static",
"Reader",
"newReader",
"(",
"ReadableByteChannel",
"ch",
",",
"String",
"csName",
")",
"{",
"checkNotNull",
"(",
"csName",
",",
"\"csName\"",
")",
";",
"return",
"newReader",
"(",
"ch",
",",
"Charset",
".",
"forName",
"(",
"csName",
")",
... | Constructs a reader that decodes bytes from the given channel according
to the named charset.
<p> An invocation of this method of the form
<blockquote><pre>
Channels.newReader(ch, csname)</pre></blockquote>
behaves in exactly the same way as the expression
<blockquote><pre>
Channels.newReader(ch,
Charset.forName(cs... | [
"Constructs",
"a",
"reader",
"that",
"decodes",
"bytes",
"from",
"the",
"given",
"channel",
"according",
"to",
"the",
"named",
"charset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L386-L391 |
34,717 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newWriter | public static Writer newWriter(final WritableByteChannel ch,
final CharsetEncoder enc,
final int minBufferCap)
{
checkNotNull(ch, "ch");
return StreamEncoder.forEncoder(ch, enc.reset(), minBufferCap);
} | java | public static Writer newWriter(final WritableByteChannel ch,
final CharsetEncoder enc,
final int minBufferCap)
{
checkNotNull(ch, "ch");
return StreamEncoder.forEncoder(ch, enc.reset(), minBufferCap);
} | [
"public",
"static",
"Writer",
"newWriter",
"(",
"final",
"WritableByteChannel",
"ch",
",",
"final",
"CharsetEncoder",
"enc",
",",
"final",
"int",
"minBufferCap",
")",
"{",
"checkNotNull",
"(",
"ch",
",",
"\"ch\"",
")",
";",
"return",
"StreamEncoder",
".",
"for... | Constructs a writer that encodes characters using the given encoder and
writes the resulting bytes to the given channel.
<p> The resulting stream will contain an internal output buffer of at
least <tt>minBufferCap</tt> bytes. The stream's <tt>write</tt> methods
will, as needed, flush the buffer by writing bytes to th... | [
"Constructs",
"a",
"writer",
"that",
"encodes",
"characters",
"using",
"the",
"given",
"encoder",
"and",
"writes",
"the",
"resulting",
"bytes",
"to",
"the",
"given",
"channel",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L418-L424 |
34,718 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java | Channels.newWriter | public static Writer newWriter(WritableByteChannel ch,
String csName)
{
checkNotNull(csName, "csName");
return newWriter(ch, Charset.forName(csName).newEncoder(), -1);
} | java | public static Writer newWriter(WritableByteChannel ch,
String csName)
{
checkNotNull(csName, "csName");
return newWriter(ch, Charset.forName(csName).newEncoder(), -1);
} | [
"public",
"static",
"Writer",
"newWriter",
"(",
"WritableByteChannel",
"ch",
",",
"String",
"csName",
")",
"{",
"checkNotNull",
"(",
"csName",
",",
"\"csName\"",
")",
";",
"return",
"newWriter",
"(",
"ch",
",",
"Charset",
".",
"forName",
"(",
"csName",
")",
... | Constructs a writer that encodes characters according to the named
charset and writes the resulting bytes to the given channel.
<p> An invocation of this method of the form
<blockquote><pre>
Channels.newWriter(ch, csname)</pre></blockquote>
behaves in exactly the same way as the expression
<blockquote><pre>
Channel... | [
"Constructs",
"a",
"writer",
"that",
"encodes",
"characters",
"according",
"to",
"the",
"named",
"charset",
"and",
"writes",
"the",
"resulting",
"bytes",
"to",
"the",
"given",
"channel",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L455-L460 |
34,719 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarFile.java | JarFile.entries | public Enumeration<JarEntry> entries() {
final Enumeration enum_ = super.entries();
return new Enumeration<JarEntry>() {
public boolean hasMoreElements() {
return enum_.hasMoreElements();
}
public JarFileEntry nextElement() {
ZipEntry z... | java | public Enumeration<JarEntry> entries() {
final Enumeration enum_ = super.entries();
return new Enumeration<JarEntry>() {
public boolean hasMoreElements() {
return enum_.hasMoreElements();
}
public JarFileEntry nextElement() {
ZipEntry z... | [
"public",
"Enumeration",
"<",
"JarEntry",
">",
"entries",
"(",
")",
"{",
"final",
"Enumeration",
"enum_",
"=",
"super",
".",
"entries",
"(",
")",
";",
"return",
"new",
"Enumeration",
"<",
"JarEntry",
">",
"(",
")",
"{",
"public",
"boolean",
"hasMoreElement... | Returns an enumeration of the zip file entries. | [
"Returns",
"an",
"enumeration",
"of",
"the",
"zip",
"file",
"entries",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarFile.java#L247-L258 |
34,720 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/Options.java | Options.checkMemoryManagementOption | private void checkMemoryManagementOption(MemoryManagementOption option) {
if (memoryManagementOption != null && memoryManagementOption != option) {
usage("Multiple memory management options cannot be set.");
}
setMemoryManagementOption(option);
} | java | private void checkMemoryManagementOption(MemoryManagementOption option) {
if (memoryManagementOption != null && memoryManagementOption != option) {
usage("Multiple memory management options cannot be set.");
}
setMemoryManagementOption(option);
} | [
"private",
"void",
"checkMemoryManagementOption",
"(",
"MemoryManagementOption",
"option",
")",
"{",
"if",
"(",
"memoryManagementOption",
"!=",
"null",
"&&",
"memoryManagementOption",
"!=",
"option",
")",
"{",
"usage",
"(",
"\"Multiple memory management options cannot be se... | Check that the memory management option wasn't previously set to a
different value. If okay, then set the option. | [
"Check",
"that",
"the",
"memory",
"management",
"option",
"wasn",
"t",
"previously",
"set",
"to",
"a",
"different",
"value",
".",
"If",
"okay",
"then",
"set",
"the",
"option",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/Options.java#L609-L614 |
34,721 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/CaptureInfo.java | CaptureInfo.getImplicitPrefixParams | public Iterable<VariableElement> getImplicitPrefixParams(TypeElement type) {
return Iterables.transform(getCaptures(type), Capture::getParam);
} | java | public Iterable<VariableElement> getImplicitPrefixParams(TypeElement type) {
return Iterables.transform(getCaptures(type), Capture::getParam);
} | [
"public",
"Iterable",
"<",
"VariableElement",
">",
"getImplicitPrefixParams",
"(",
"TypeElement",
"type",
")",
"{",
"return",
"Iterables",
".",
"transform",
"(",
"getCaptures",
"(",
"type",
")",
",",
"Capture",
"::",
"getParam",
")",
";",
"}"
] | Returns all the implicit params that come before explicit params in a constructor. | [
"Returns",
"all",
"the",
"implicit",
"params",
"that",
"come",
"before",
"explicit",
"params",
"in",
"a",
"constructor",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/CaptureInfo.java#L156-L158 |
34,722 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/CaptureInfo.java | CaptureInfo.getImplicitPostfixParams | public Iterable<VariableElement> getImplicitPostfixParams(TypeElement type) {
if (ElementUtil.isEnum(type)) {
return implicitEnumParams;
}
return Collections.emptyList();
} | java | public Iterable<VariableElement> getImplicitPostfixParams(TypeElement type) {
if (ElementUtil.isEnum(type)) {
return implicitEnumParams;
}
return Collections.emptyList();
} | [
"public",
"Iterable",
"<",
"VariableElement",
">",
"getImplicitPostfixParams",
"(",
"TypeElement",
"type",
")",
"{",
"if",
"(",
"ElementUtil",
".",
"isEnum",
"(",
"type",
")",
")",
"{",
"return",
"implicitEnumParams",
";",
"}",
"return",
"Collections",
".",
"e... | returns all the implicit params that come after explicit params in a constructor. | [
"returns",
"all",
"the",
"implicit",
"params",
"that",
"come",
"after",
"explicit",
"params",
"in",
"a",
"constructor",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/CaptureInfo.java#L163-L168 |
34,723 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/FactoryFinder.java | FactoryFinder.find | static Object find(String factoryId, String fallbackClassName) throws ConfigurationError {
ClassLoader classLoader = findClassLoader();
// Use the system property first
String systemProp = System.getProperty(factoryId);
if (systemProp != null && systemProp.length() > 0) {
i... | java | static Object find(String factoryId, String fallbackClassName) throws ConfigurationError {
ClassLoader classLoader = findClassLoader();
// Use the system property first
String systemProp = System.getProperty(factoryId);
if (systemProp != null && systemProp.length() > 0) {
i... | [
"static",
"Object",
"find",
"(",
"String",
"factoryId",
",",
"String",
"fallbackClassName",
")",
"throws",
"ConfigurationError",
"{",
"ClassLoader",
"classLoader",
"=",
"findClassLoader",
"(",
")",
";",
"// Use the system property first",
"String",
"systemProp",
"=",
... | Finds the implementation Class object in the specified order. Main
entry point.
Package private so this code can be shared.
@param factoryId Name of the factory to find, same as a property name
@param fallbackClassName Implementation class name, if nothing else is found. Use null to mean no fallback.
@return Class ... | [
"Finds",
"the",
"implementation",
"Class",
"object",
"in",
"the",
"specified",
"order",
".",
"Main",
"entry",
"point",
".",
"Package",
"private",
"so",
"this",
"code",
"can",
"be",
"shared",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/FactoryFinder.java#L186-L224 |
34,724 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/FactoryFinder.java | FactoryFinder.which | private static String which(Class clazz) {
try {
String classnameAsResource = clazz.getName().replace('.', '/') + ".class";
ClassLoader loader = clazz.getClassLoader();
URL it;
if (loader != null) {
it = loader.getResource(classnameAsResource);
... | java | private static String which(Class clazz) {
try {
String classnameAsResource = clazz.getName().replace('.', '/') + ".class";
ClassLoader loader = clazz.getClassLoader();
URL it;
if (loader != null) {
it = loader.getResource(classnameAsResource);
... | [
"private",
"static",
"String",
"which",
"(",
"Class",
"clazz",
")",
"{",
"try",
"{",
"String",
"classnameAsResource",
"=",
"clazz",
".",
"getName",
"(",
")",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
")",
"+",
"\".class\"",
";",
"ClassLoader",
"loa... | Returns the location where the given Class is loaded from. | [
"Returns",
"the",
"location",
"where",
"the",
"given",
"Class",
"is",
"loaded",
"from",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/FactoryFinder.java#L321-L354 |
34,725 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/StringTokenizer.java | StringTokenizer.getNextDelimiter | private int getNextDelimiter(int offset)
{
if (offset >= 0) {
int result = offset;
int c = 0;
if (delims == null) {
do {
c = UTF16.charAt(m_source_, result);
if (m_delimiters_.contains(c)) {
... | java | private int getNextDelimiter(int offset)
{
if (offset >= 0) {
int result = offset;
int c = 0;
if (delims == null) {
do {
c = UTF16.charAt(m_source_, result);
if (m_delimiters_.contains(c)) {
... | [
"private",
"int",
"getNextDelimiter",
"(",
"int",
"offset",
")",
"{",
"if",
"(",
"offset",
">=",
"0",
")",
"{",
"int",
"result",
"=",
"offset",
";",
"int",
"c",
"=",
"0",
";",
"if",
"(",
"delims",
"==",
"null",
")",
"{",
"do",
"{",
"c",
"=",
"U... | Gets the index of the next delimiter after offset
@param offset to the source string
@return offset of the immediate next delimiter, otherwise
(- source string length - 1) if there
are no more delimiters after m_nextOffset | [
"Gets",
"the",
"index",
"of",
"the",
"next",
"delimiter",
"after",
"offset"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/StringTokenizer.java#L596-L623 |
34,726 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.getSetterMethodName | public String getSetterMethodName()
{
if (null == m_setterString)
{
if (m_foreignAttr == this)
{
return S_FOREIGNATTR_SETTER;
}
else if (m_name.equals("*"))
{
m_setterString = "addLiteralResultAttribute";
return m_setterString;
}
StringBuffe... | java | public String getSetterMethodName()
{
if (null == m_setterString)
{
if (m_foreignAttr == this)
{
return S_FOREIGNATTR_SETTER;
}
else if (m_name.equals("*"))
{
m_setterString = "addLiteralResultAttribute";
return m_setterString;
}
StringBuffe... | [
"public",
"String",
"getSetterMethodName",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"m_setterString",
")",
"{",
"if",
"(",
"m_foreignAttr",
"==",
"this",
")",
"{",
"return",
"S_FOREIGNATTR_SETTER",
";",
"}",
"else",
"if",
"(",
"m_name",
".",
"equals",
"(",
... | Return a string that should represent the setter method.
The setter method name will be created algorithmically the
first time this method is accessed, and then cached for return
by subsequent invocations of this method.
@return String that should represent the setter method which which
may be used on objects to set a... | [
"Return",
"a",
"string",
"that",
"should",
"represent",
"the",
"setter",
"method",
".",
"The",
"setter",
"method",
"name",
"will",
"be",
"created",
"algorithmically",
"the",
"first",
"time",
"this",
"method",
"is",
"accessed",
"and",
"then",
"cached",
"for",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L443-L494 |
34,727 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processAVT | AVT processAVT(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
AVT avt = new AVT(handler, uri, name, rawName, value, owner);
return avt;
}
catch (Transfor... | java | AVT processAVT(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
AVT avt = new AVT(handler, uri, name, rawName, value, owner);
return avt;
}
catch (Transfor... | [
"AVT",
"processAVT",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"... | Process an attribute string of type T_AVT into
a AVT value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName The q... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_AVT",
"into",
"a",
"AVT",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L512-L528 |
34,728 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processCHAR | Object processCHAR(
StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
if (getSupportsAVT()) {
try
{
AVT avt = new AVT(handler, uri, name, rawName, value, owner);
// If an AVT wasn... | java | Object processCHAR(
StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
if (getSupportsAVT()) {
try
{
AVT avt = new AVT(handler, uri, name, rawName, value, owner);
// If an AVT wasn... | [
"Object",
"processCHAR",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",... | Process an attribute string of type T_CHAR into
a Character value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawNam... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_CHAR",
"into",
"a",
"Character",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L577-L606 |
34,729 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processENUM | Object processENUM(StylesheetHandler handler, String uri, String name,
String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
AVT avt = null;
if (getSupportsAVT()) {
try
{
avt = new AVT(handler, uri, name, rawName, value... | java | Object processENUM(StylesheetHandler handler, String uri, String name,
String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
AVT avt = null;
if (getSupportsAVT()) {
try
{
avt = new AVT(handler, uri, name, rawName, value... | [
"Object",
"processENUM",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",... | Process an attribute string of type T_ENUM into a int value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName The ... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_ENUM",
"into",
"a",
"int",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L622-L654 |
34,730 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processENUM_OR_PQNAME | Object processENUM_OR_PQNAME(StylesheetHandler handler, String uri, String name,
String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
Object objToReturn = null;
if (getSupportsAVT()) {
try
{
AVT avt = new AVT(handler... | java | Object processENUM_OR_PQNAME(StylesheetHandler handler, String uri, String name,
String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
Object objToReturn = null;
if (getSupportsAVT()) {
try
{
AVT avt = new AVT(handler... | [
"Object",
"processENUM_OR_PQNAME",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXE... | Process an attribute string of that is either an enumerated value or a qname-but-not-ncname.
Returns an AVT, if this attribute support AVT; otherwise returns int or qname.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string... | [
"Process",
"an",
"attribute",
"string",
"of",
"that",
"is",
"either",
"an",
"enumerated",
"value",
"or",
"a",
"qname",
"-",
"but",
"-",
"not",
"-",
"ncname",
".",
"Returns",
"an",
"AVT",
"if",
"this",
"attribute",
"support",
"AVT",
";",
"otherwise",
"ret... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L672-L737 |
34,731 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processEXPR | Object processEXPR(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
XPath expr = handler.createXPath(value, owner);
return expr;
}
catch (TransformerExcept... | java | Object processEXPR(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
XPath expr = handler.createXPath(value, owner);
return expr;
}
catch (TransformerExcept... | [
"Object",
"processEXPR",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",... | Process an attribute string of type T_EXPR into
an XPath value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName T... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_EXPR",
"into",
"an",
"XPath",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L755-L771 |
34,732 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processPATTERN | Object processPATTERN(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
XPath pattern = handler.createMatchPatternXPath(value, owner);
return pattern;
}
cat... | java | Object processPATTERN(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
XPath pattern = handler.createMatchPatternXPath(value, owner);
return pattern;
}
cat... | [
"Object",
"processPATTERN",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXExceptio... | Process an attribute string of type T_PATTERN into
an XPath match pattern value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_PATTERN",
"into",
"an",
"XPath",
"match",
"pattern",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L833-L849 |
34,733 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processNUMBER | Object processNUMBER(
StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
if (getSupportsAVT())
{
Double val;
AVT avt = null;
try
{
avt = new AVT(handler, uri, name, rawName, valu... | java | Object processNUMBER(
StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
if (getSupportsAVT())
{
Double val;
AVT avt = null;
try
{
avt = new AVT(handler, uri, name, rawName, valu... | [
"Object",
"processNUMBER",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException... | Process an attribute string of type T_NUMBER into
a double value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_NUMBER",
"into",
"a",
"double",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L868-L912 |
34,734 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processNCNAME | Object processNCNAME(
StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
if (getSupportsAVT())
{
AVT avt = null;
try
{
avt = new AVT(handler, uri, name, raw... | java | Object processNCNAME(
StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
if (getSupportsAVT())
{
AVT avt = null;
try
{
avt = new AVT(handler, uri, name, raw... | [
"Object",
"processNCNAME",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException... | Process an attribute string of type NCName into a String
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName The qual... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"NCName",
"into",
"a",
"String"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1030-L1064 |
34,735 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processSIMPLEPATTERNLIST | Vector processSIMPLEPATTERNLIST(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nPatterns ... | java | Vector processSIMPLEPATTERNLIST(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
try
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nPatterns ... | [
"Vector",
"processSIMPLEPATTERNLIST",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"S... | Process an attribute string of type T_SIMPLEPATTERNLIST into
a vector of XPath match patterns.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespa... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_SIMPLEPATTERNLIST",
"into",
"a",
"vector",
"of",
"XPath",
"match",
"patterns",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1158-L1184 |
34,736 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processSTRINGLIST | StringVector processSTRINGLIST(StylesheetHandler handler, String uri,
String name, String rawName, String value)
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nStrings = tokenizer.countTokens();
StringVector strings = new StringVector(nStrings... | java | StringVector processSTRINGLIST(StylesheetHandler handler, String uri,
String name, String rawName, String value)
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nStrings = tokenizer.countTokens();
StringVector strings = new StringVector(nStrings... | [
"StringVector",
"processSTRINGLIST",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
")",
"{",
"StringTokenizer",
"tokenizer",
"=",
"new",
"StringTokenizer",
"(",
"value",
",",
"... | Process an attribute string of type T_STRINGLIST into
a vector of XPath match patterns.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace proc... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_STRINGLIST",
"into",
"a",
"vector",
"of",
"XPath",
"match",
"patterns",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1198-L1212 |
34,737 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processPREFIX_URLLIST | StringVector processPREFIX_URLLIST(
StylesheetHandler handler, String uri, String name, String rawName, String value)
throws org.xml.sax.SAXException
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nStrings = tokenizer.countTokens();
StringVector strings =... | java | StringVector processPREFIX_URLLIST(
StylesheetHandler handler, String uri, String name, String rawName, String value)
throws org.xml.sax.SAXException
{
StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
int nStrings = tokenizer.countTokens();
StringVector strings =... | [
"StringVector",
"processPREFIX_URLLIST",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"StringTokenizer"... | Process an attribute string of type T_URLLIST into
a vector of prefixes that may be resolved to URLs.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not ... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_URLLIST",
"into",
"a",
"vector",
"of",
"prefixes",
"that",
"may",
"be",
"resolved",
"to",
"URLs",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1228-L1250 |
34,738 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processYESNO | private Boolean processYESNO(
StylesheetHandler handler, String uri, String name, String rawName, String value)
throws org.xml.sax.SAXException
{
// Is this already checked somewhere else? -sb
if (!(value.equals("yes") || value.equals("no")))
{
handleError(handler, XSLTErrorR... | java | private Boolean processYESNO(
StylesheetHandler handler, String uri, String name, String rawName, String value)
throws org.xml.sax.SAXException
{
// Is this already checked somewhere else? -sb
if (!(value.equals("yes") || value.equals("no")))
{
handleError(handler, XSLTErrorR... | [
"private",
"Boolean",
"processYESNO",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"// Is this alread... | Process an attribute string of type T_YESNO into
a Boolean value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName... | [
"Process",
"an",
"attribute",
"string",
"of",
"type",
"T_YESNO",
"into",
"a",
"Boolean",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1353-L1366 |
34,739 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.processValue | Object processValue(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
int type = getType();
Object processedValue = null;
switch (type)
{
case T_AVT :
processedValu... | java | Object processValue(
StylesheetHandler handler, String uri, String name, String rawName, String value,
ElemTemplateElement owner)
throws org.xml.sax.SAXException
{
int type = getType();
Object processedValue = null;
switch (type)
{
case T_AVT :
processedValu... | [
"Object",
"processValue",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"uri",
",",
"String",
"name",
",",
"String",
"rawName",
",",
"String",
"value",
",",
"ElemTemplateElement",
"owner",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException"... | Process an attribute value.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param uri The Namespace URI, or an empty string.
@param name The local name (without prefix), or empty string if not namespace processing.
@param rawName The qualified name (with prefix).
@pa... | [
"Process",
"an",
"attribute",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1381-L1460 |
34,740 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.setDefAttrValue | void setDefAttrValue(StylesheetHandler handler, ElemTemplateElement elem)
throws org.xml.sax.SAXException
{
setAttrValue(handler, this.getNamespace(), this.getName(),
this.getName(), this.getDefault(), elem);
} | java | void setDefAttrValue(StylesheetHandler handler, ElemTemplateElement elem)
throws org.xml.sax.SAXException
{
setAttrValue(handler, this.getNamespace(), this.getName(),
this.getName(), this.getDefault(), elem);
} | [
"void",
"setDefAttrValue",
"(",
"StylesheetHandler",
"handler",
",",
"ElemTemplateElement",
"elem",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"setAttrValue",
"(",
"handler",
",",
"this",
".",
"getNamespace",
"(",
")",
",",
"this",... | Set the default value of an attribute.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param elem The object on which the property will be set.
@throws org.xml.sax.SAXException wraps an invocation exception if the
setter method can not be invoked on the object. | [
"Set",
"the",
"default",
"value",
"of",
"an",
"attribute",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1471-L1476 |
34,741 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.getPrimativeClass | private Class getPrimativeClass(Object obj)
{
if (obj instanceof XPath)
return XPath.class;
Class cl = obj.getClass();
if (cl == Double.class)
{
cl = double.class;
}
if (cl == Float.class)
{
cl = float.class;
}
else if (cl == Boolean.class)
{
cl = bo... | java | private Class getPrimativeClass(Object obj)
{
if (obj instanceof XPath)
return XPath.class;
Class cl = obj.getClass();
if (cl == Double.class)
{
cl = double.class;
}
if (cl == Float.class)
{
cl = float.class;
}
else if (cl == Boolean.class)
{
cl = bo... | [
"private",
"Class",
"getPrimativeClass",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"XPath",
")",
"return",
"XPath",
".",
"class",
";",
"Class",
"cl",
"=",
"obj",
".",
"getClass",
"(",
")",
";",
"if",
"(",
"cl",
"==",
"Double",
"... | Get the primative type for the class, if there
is one. If the class is a Double, for instance,
this will return double.class. If the class is not one
of the 9 primative types, it will return the same
class that was passed in.
@param obj The object which will be resolved to a primative class object if possible.
@ret... | [
"Get",
"the",
"primative",
"type",
"for",
"the",
"class",
"if",
"there",
"is",
"one",
".",
"If",
"the",
"class",
"is",
"a",
"Double",
"for",
"instance",
"this",
"will",
"return",
"double",
".",
"class",
".",
"If",
"the",
"class",
"is",
"not",
"one",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1489-L1532 |
34,742 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.getListOfEnums | private StringBuffer getListOfEnums()
{
StringBuffer enumNamesList = new StringBuffer();
String [] enumValues = this.getEnumNames();
for (int i = 0; i < enumValues.length; i++)
{
if (i > 0)
{
enumNamesList.append(' ');
}
enumNamesList.append... | java | private StringBuffer getListOfEnums()
{
StringBuffer enumNamesList = new StringBuffer();
String [] enumValues = this.getEnumNames();
for (int i = 0; i < enumValues.length; i++)
{
if (i > 0)
{
enumNamesList.append(' ');
}
enumNamesList.append... | [
"private",
"StringBuffer",
"getListOfEnums",
"(",
")",
"{",
"StringBuffer",
"enumNamesList",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"String",
"[",
"]",
"enumValues",
"=",
"this",
".",
"getEnumNames",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
"... | StringBuffer containing comma delimited list of valid values for ENUM type.
Used to build error message. | [
"StringBuffer",
"containing",
"comma",
"delimited",
"list",
"of",
"valid",
"values",
"for",
"ENUM",
"type",
".",
"Used",
"to",
"build",
"error",
"message",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1538-L1552 |
34,743 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java | XSLTAttributeDef.setAttrValue | boolean setAttrValue(
StylesheetHandler handler, String attrUri, String attrLocalName,
String attrRawName, String attrValue, ElemTemplateElement elem)
throws org.xml.sax.SAXException
{
if(attrRawName.equals("xmlns") || attrRawName.startsWith("xmlns:"))
return true;
... | java | boolean setAttrValue(
StylesheetHandler handler, String attrUri, String attrLocalName,
String attrRawName, String attrValue, ElemTemplateElement elem)
throws org.xml.sax.SAXException
{
if(attrRawName.equals("xmlns") || attrRawName.startsWith("xmlns:"))
return true;
... | [
"boolean",
"setAttrValue",
"(",
"StylesheetHandler",
"handler",
",",
"String",
"attrUri",
",",
"String",
"attrLocalName",
",",
"String",
"attrRawName",
",",
"String",
"attrValue",
",",
"ElemTemplateElement",
"elem",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
... | Set a value on an attribute.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates.
@param attrUri The Namespace URI of the attribute, or an empty string.
@param attrLocalName The local name (without prefix), or empty string if not namespace processing.
@param attrRawName Th... | [
"Set",
"a",
"value",
"on",
"an",
"attribute",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1566-L1650 |
34,744 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/StylesheetPIHandler.java | StylesheetPIHandler.getAssociatedStylesheet | public Source getAssociatedStylesheet()
{
int sz = m_stylesheets.size();
if (sz > 0)
{
Source source = (Source) m_stylesheets.elementAt(sz-1);
return source;
}
else
return null;
} | java | public Source getAssociatedStylesheet()
{
int sz = m_stylesheets.size();
if (sz > 0)
{
Source source = (Source) m_stylesheets.elementAt(sz-1);
return source;
}
else
return null;
} | [
"public",
"Source",
"getAssociatedStylesheet",
"(",
")",
"{",
"int",
"sz",
"=",
"m_stylesheets",
".",
"size",
"(",
")",
";",
"if",
"(",
"sz",
">",
"0",
")",
"{",
"Source",
"source",
"=",
"(",
"Source",
")",
"m_stylesheets",
".",
"elementAt",
"(",
"sz",... | Return the last stylesheet found that match the constraints.
@return Source object that references the last stylesheet reference
that matches the constraints. | [
"Return",
"the",
"last",
"stylesheet",
"found",
"that",
"match",
"the",
"constraints",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/StylesheetPIHandler.java#L115-L127 |
34,745 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/StylesheetPIHandler.java | StylesheetPIHandler.startElement | public void startElement(
String namespaceURI, String localName, String qName, Attributes atts)
throws org.xml.sax.SAXException
{
throw new StopParseException();
} | java | public void startElement(
String namespaceURI, String localName, String qName, Attributes atts)
throws org.xml.sax.SAXException
{
throw new StopParseException();
} | [
"public",
"void",
"startElement",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
",",
"String",
"qName",
",",
"Attributes",
"atts",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"throw",
"new",
"StopParseException",
"(",
... | The spec notes that "The xml-stylesheet processing instruction is allowed only in the prolog of an XML document.",
so, at least for right now, I'm going to go ahead an throw a TransformerException
in order to stop the parse.
@param namespaceURI The Namespace URI, or an empty string.
@param localName The local name (wi... | [
"The",
"spec",
"notes",
"that",
"The",
"xml",
"-",
"stylesheet",
"processing",
"instruction",
"is",
"allowed",
"only",
"in",
"the",
"prolog",
"of",
"an",
"XML",
"document",
".",
"so",
"at",
"least",
"for",
"right",
"now",
"I",
"m",
"going",
"to",
"go",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/StylesheetPIHandler.java#L320-L325 |
34,746 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/locale/LocaleUtils.java | LocaleUtils.caseIgnoreMatch | public static boolean caseIgnoreMatch(String s1, String s2) {
if (s1 == s2) {
return true;
}
int len = s1.length();
if (len != s2.length()) {
return false;
}
for (int i = 0; i < len; i++) {
char c1 = s1.charAt(i);
char c2 ... | java | public static boolean caseIgnoreMatch(String s1, String s2) {
if (s1 == s2) {
return true;
}
int len = s1.length();
if (len != s2.length()) {
return false;
}
for (int i = 0; i < len; i++) {
char c1 = s1.charAt(i);
char c2 ... | [
"public",
"static",
"boolean",
"caseIgnoreMatch",
"(",
"String",
"s1",
",",
"String",
"s2",
")",
"{",
"if",
"(",
"s1",
"==",
"s2",
")",
"{",
"return",
"true",
";",
"}",
"int",
"len",
"=",
"s1",
".",
"length",
"(",
")",
";",
"if",
"(",
"len",
"!="... | Compares two ASCII Strings s1 and s2, ignoring case. | [
"Compares",
"two",
"ASCII",
"Strings",
"s1",
"and",
"s2",
"ignoring",
"case",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/locale/LocaleUtils.java#L50-L68 |
34,747 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/locale/LocaleUtils.java | LocaleUtils.toLowerString | public static String toLowerString(String s) {
int len = s.length();
int idx = 0;
for (; idx < len; idx++) {
if (isUpper(s.charAt(idx))) {
break;
}
}
if (idx == len) {
return s;
}
char[] buf = new char[len];
... | java | public static String toLowerString(String s) {
int len = s.length();
int idx = 0;
for (; idx < len; idx++) {
if (isUpper(s.charAt(idx))) {
break;
}
}
if (idx == len) {
return s;
}
char[] buf = new char[len];
... | [
"public",
"static",
"String",
"toLowerString",
"(",
"String",
"s",
")",
"{",
"int",
"len",
"=",
"s",
".",
"length",
"(",
")",
";",
"int",
"idx",
"=",
"0",
";",
"for",
"(",
";",
"idx",
"<",
"len",
";",
"idx",
"++",
")",
"{",
"if",
"(",
"isUpper"... | Converts the given ASCII String to lower-case. | [
"Converts",
"the",
"given",
"ASCII",
"String",
"to",
"lower",
"-",
"case",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/locale/LocaleUtils.java#L88-L106 |
34,748 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/FuncSystemProperty.java | FuncSystemProperty.loadPropertyFile | public void loadPropertyFile(String file, Properties target)
{
try
{
// Use SecuritySupport class to provide priveleged access to property file
SecuritySupport ss = SecuritySupport.getInstance();
InputStream is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
... | java | public void loadPropertyFile(String file, Properties target)
{
try
{
// Use SecuritySupport class to provide priveleged access to property file
SecuritySupport ss = SecuritySupport.getInstance();
InputStream is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
... | [
"public",
"void",
"loadPropertyFile",
"(",
"String",
"file",
",",
"Properties",
"target",
")",
"{",
"try",
"{",
"// Use SecuritySupport class to provide priveleged access to property file",
"SecuritySupport",
"ss",
"=",
"SecuritySupport",
".",
"getInstance",
"(",
")",
";"... | Retrieve a propery bundle from a specified file
@param file The string name of the property file. The name
should already be fully qualified as path/filename
@param target The target property bag the file will be placed into. | [
"Retrieve",
"a",
"propery",
"bundle",
"from",
"a",
"specified",
"file"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/FuncSystemProperty.java#L176-L197 |
34,749 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Operation.java | Operation.setLeftRight | public void setLeftRight(Expression l, Expression r)
{
m_left = l;
m_right = r;
l.exprSetParent(this);
r.exprSetParent(this);
} | java | public void setLeftRight(Expression l, Expression r)
{
m_left = l;
m_right = r;
l.exprSetParent(this);
r.exprSetParent(this);
} | [
"public",
"void",
"setLeftRight",
"(",
"Expression",
"l",
",",
"Expression",
"r",
")",
"{",
"m_left",
"=",
"l",
";",
"m_right",
"=",
"r",
";",
"l",
".",
"exprSetParent",
"(",
"this",
")",
";",
"r",
".",
"exprSetParent",
"(",
"this",
")",
";",
"}"
] | Set the left and right operand expressions for this operation.
@param l The left expression operand.
@param r The right expression operand. | [
"Set",
"the",
"left",
"and",
"right",
"operand",
"expressions",
"for",
"this",
"operation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Operation.java#L86-L92 |
34,750 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/Builder.java | Builder.distance | static int distance(GeneralNameInterface base,
GeneralNameInterface test, int incomparable)
{
switch (base.constrains(test)) {
case GeneralNameInterface.NAME_DIFF_TYPE:
if (debug != null) {
debug.println("Builder.distance(): Names are different typ... | java | static int distance(GeneralNameInterface base,
GeneralNameInterface test, int incomparable)
{
switch (base.constrains(test)) {
case GeneralNameInterface.NAME_DIFF_TYPE:
if (debug != null) {
debug.println("Builder.distance(): Names are different typ... | [
"static",
"int",
"distance",
"(",
"GeneralNameInterface",
"base",
",",
"GeneralNameInterface",
"test",
",",
"int",
"incomparable",
")",
"{",
"switch",
"(",
"base",
".",
"constrains",
"(",
"test",
")",
")",
"{",
"case",
"GeneralNameInterface",
".",
"NAME_DIFF_TYP... | get distance of one GeneralName from another
@param base GeneralName at base of subtree
@param test GeneralName to be tested against base
@param incomparable the value to return if the names are
incomparable
@return distance of test name from base, where 0
means exact match, 1 means test is an immediate
child of base,... | [
"get",
"distance",
"of",
"one",
"GeneralName",
"from",
"another"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/Builder.java#L143-L170 |
34,751 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/Builder.java | Builder.targetDistance | static int targetDistance(NameConstraintsExtension constraints,
X509Certificate cert, GeneralNameInterface target)
throws IOException
{
/* ensure that certificate satisfies existing name constraints */
if (constraints != null && !constraints.verify(cert)) {
... | java | static int targetDistance(NameConstraintsExtension constraints,
X509Certificate cert, GeneralNameInterface target)
throws IOException
{
/* ensure that certificate satisfies existing name constraints */
if (constraints != null && !constraints.verify(cert)) {
... | [
"static",
"int",
"targetDistance",
"(",
"NameConstraintsExtension",
"constraints",
",",
"X509Certificate",
"cert",
",",
"GeneralNameInterface",
"target",
")",
"throws",
"IOException",
"{",
"/* ensure that certificate satisfies existing name constraints */",
"if",
"(",
"constrai... | Determine how close a given certificate gets you toward
a given target.
@param constraints Current NameConstraints; if null,
then caller must verify NameConstraints
independently, realizing that this certificate
may not actually lead to the target at all.
@param cert Candidate certificate for chain
@param target Gener... | [
"Determine",
"how",
"close",
"a",
"given",
"certificate",
"gets",
"you",
"toward",
"a",
"given",
"target",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/Builder.java#L280-L373 |
34,752 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/Builder.java | Builder.addMatchingCerts | boolean addMatchingCerts(X509CertSelector selector,
Collection<CertStore> certStores,
Collection<X509Certificate> resultCerts,
boolean checkAll)
{
X509Certificate targetCert = selector.getCertificate();
if (target... | java | boolean addMatchingCerts(X509CertSelector selector,
Collection<CertStore> certStores,
Collection<X509Certificate> resultCerts,
boolean checkAll)
{
X509Certificate targetCert = selector.getCertificate();
if (target... | [
"boolean",
"addMatchingCerts",
"(",
"X509CertSelector",
"selector",
",",
"Collection",
"<",
"CertStore",
">",
"certStores",
",",
"Collection",
"<",
"X509Certificate",
">",
"resultCerts",
",",
"boolean",
"checkAll",
")",
"{",
"X509Certificate",
"targetCert",
"=",
"se... | Search the specified CertStores and add all certificates matching
selector to resultCerts. Self-signed certs are not useful here
and therefore ignored.
If the targetCert criterion of the selector is set, only that cert
is examined and the CertStores are not searched.
If checkAll is true, all CertStores are searched f... | [
"Search",
"the",
"specified",
"CertStores",
"and",
"add",
"all",
"certificates",
"matching",
"selector",
"to",
"resultCerts",
".",
"Self",
"-",
"signed",
"certs",
"are",
"not",
"useful",
"here",
"and",
"therefore",
"ignored",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/Builder.java#L427-L471 |
34,753 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedHashMap.java | LinkedHashMap.linkNodeLast | private void linkNodeLast(LinkedHashMapEntry<K,V> p) {
LinkedHashMapEntry<K,V> last = tail;
tail = p;
if (last == null)
head = p;
else {
p.before = last;
last.after = p;
}
} | java | private void linkNodeLast(LinkedHashMapEntry<K,V> p) {
LinkedHashMapEntry<K,V> last = tail;
tail = p;
if (last == null)
head = p;
else {
p.before = last;
last.after = p;
}
} | [
"private",
"void",
"linkNodeLast",
"(",
"LinkedHashMapEntry",
"<",
"K",
",",
"V",
">",
"p",
")",
"{",
"LinkedHashMapEntry",
"<",
"K",
",",
"V",
">",
"last",
"=",
"tail",
";",
"tail",
"=",
"p",
";",
"if",
"(",
"last",
"==",
"null",
")",
"head",
"=",... | link at the end of list | [
"link",
"at",
"the",
"end",
"of",
"list"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedHashMap.java#L249-L258 |
34,754 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedHashMap.java | LinkedHashMap.transferLinks | private void transferLinks(LinkedHashMapEntry<K,V> src,
LinkedHashMapEntry<K,V> dst) {
LinkedHashMapEntry<K,V> b = dst.before = src.before;
LinkedHashMapEntry<K,V> a = dst.after = src.after;
if (b == null)
head = dst;
else
b.after = ... | java | private void transferLinks(LinkedHashMapEntry<K,V> src,
LinkedHashMapEntry<K,V> dst) {
LinkedHashMapEntry<K,V> b = dst.before = src.before;
LinkedHashMapEntry<K,V> a = dst.after = src.after;
if (b == null)
head = dst;
else
b.after = ... | [
"private",
"void",
"transferLinks",
"(",
"LinkedHashMapEntry",
"<",
"K",
",",
"V",
">",
"src",
",",
"LinkedHashMapEntry",
"<",
"K",
",",
"V",
">",
"dst",
")",
"{",
"LinkedHashMapEntry",
"<",
"K",
",",
"V",
">",
"b",
"=",
"dst",
".",
"before",
"=",
"s... | apply src's links to dst | [
"apply",
"src",
"s",
"links",
"to",
"dst"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedHashMap.java#L261-L273 |
34,755 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Collator.java | Collator.getAvailableLocales | public static Locale[] getAvailableLocales() {
// TODO make this wrap getAvailableULocales later
if (shim == null) {
return ICUResourceBundle.getAvailableLocales(
ICUData.ICU_COLLATION_BASE_NAME, ICUResourceBundle.ICU_DATA_CLASS_LOADER);
}
return shim.getAvail... | java | public static Locale[] getAvailableLocales() {
// TODO make this wrap getAvailableULocales later
if (shim == null) {
return ICUResourceBundle.getAvailableLocales(
ICUData.ICU_COLLATION_BASE_NAME, ICUResourceBundle.ICU_DATA_CLASS_LOADER);
}
return shim.getAvail... | [
"public",
"static",
"Locale",
"[",
"]",
"getAvailableLocales",
"(",
")",
"{",
"// TODO make this wrap getAvailableULocales later",
"if",
"(",
"shim",
"==",
"null",
")",
"{",
"return",
"ICUResourceBundle",
".",
"getAvailableLocales",
"(",
"ICUData",
".",
"ICU_COLLATION... | Returns the set of locales, as Locale objects, for which collators
are installed. Note that Locale objects do not support RFC 3066.
@return the list of locales in which collators are installed.
This list includes any that have been registered, in addition to
those that are installed with ICU4J. | [
"Returns",
"the",
"set",
"of",
"locales",
"as",
"Locale",
"objects",
"for",
"which",
"collators",
"are",
"installed",
".",
"Note",
"that",
"Locale",
"objects",
"do",
"not",
"support",
"RFC",
"3066",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Collator.java#L883-L890 |
34,756 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Collator.java | Collator.compare | @Override
public int compare(Object source, Object target) {
return doCompare((CharSequence)source, (CharSequence)target);
} | java | @Override
public int compare(Object source, Object target) {
return doCompare((CharSequence)source, (CharSequence)target);
} | [
"@",
"Override",
"public",
"int",
"compare",
"(",
"Object",
"source",
",",
"Object",
"target",
")",
"{",
"return",
"doCompare",
"(",
"(",
"CharSequence",
")",
"source",
",",
"(",
"CharSequence",
")",
"target",
")",
";",
"}"
] | Compares the source Object to the target Object.
@param source the source Object.
@param target the target Object.
@return Returns an integer value. Value is less than zero if source is
less than target, value is zero if source and target are equal,
value is greater than zero if source is greater than target.
@throws ... | [
"Compares",
"the",
"source",
"Object",
"to",
"the",
"target",
"Object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Collator.java#L1197-L1200 |
34,757 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java | AlgorithmId.getName | public String getName() {
String algName = nameTable.get(algid);
if (algName != null) {
return algName;
}
if ((params != null) && algid.equals(specifiedWithECDSA_oid)) {
try {
AlgorithmId paramsId =
AlgorithmId.parse(new Der... | java | public String getName() {
String algName = nameTable.get(algid);
if (algName != null) {
return algName;
}
if ((params != null) && algid.equals(specifiedWithECDSA_oid)) {
try {
AlgorithmId paramsId =
AlgorithmId.parse(new Der... | [
"public",
"String",
"getName",
"(",
")",
"{",
"String",
"algName",
"=",
"nameTable",
".",
"get",
"(",
"algid",
")",
";",
"if",
"(",
"algName",
"!=",
"null",
")",
"{",
"return",
"algName",
";",
"}",
"if",
"(",
"(",
"params",
"!=",
"null",
")",
"&&",... | Returns a name for the algorithm which may be more intelligible
to humans than the algorithm's OID, but which won't necessarily
be comprehensible on other systems. For example, this might
return a name such as "MD5withRSA" for a signature algorithm on
some systems. It also returns names like "OID.1.2.3.4", when
no pa... | [
"Returns",
"a",
"name",
"for",
"the",
"algorithm",
"which",
"may",
"be",
"more",
"intelligible",
"to",
"humans",
"than",
"the",
"algorithm",
"s",
"OID",
"but",
"which",
"won",
"t",
"necessarily",
"be",
"comprehensible",
"on",
"other",
"systems",
".",
"For",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java#L236-L262 |
34,758 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java | AlgorithmId.get | public static AlgorithmId get(String algname)
throws NoSuchAlgorithmException {
ObjectIdentifier oid;
try {
oid = algOID(algname);
} catch (IOException ioe) {
throw new NoSuchAlgorithmException
("Invalid ObjectIdentifier " + algname);
}... | java | public static AlgorithmId get(String algname)
throws NoSuchAlgorithmException {
ObjectIdentifier oid;
try {
oid = algOID(algname);
} catch (IOException ioe) {
throw new NoSuchAlgorithmException
("Invalid ObjectIdentifier " + algname);
}... | [
"public",
"static",
"AlgorithmId",
"get",
"(",
"String",
"algname",
")",
"throws",
"NoSuchAlgorithmException",
"{",
"ObjectIdentifier",
"oid",
";",
"try",
"{",
"oid",
"=",
"algOID",
"(",
"algname",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioe",
")",
"{",... | Returns one of the algorithm IDs most commonly associated
with this algorithm name.
@param algname the name being used
@exception NoSuchAlgorithmException on error. | [
"Returns",
"one",
"of",
"the",
"algorithm",
"IDs",
"most",
"commonly",
"associated",
"with",
"this",
"algorithm",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java#L414-L429 |
34,759 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java | AlgorithmId.get | public static AlgorithmId get(AlgorithmParameters algparams)
throws NoSuchAlgorithmException {
ObjectIdentifier oid;
String algname = algparams.getAlgorithm();
try {
oid = algOID(algname);
} catch (IOException ioe) {
throw new NoSuchAlgorithmException
... | java | public static AlgorithmId get(AlgorithmParameters algparams)
throws NoSuchAlgorithmException {
ObjectIdentifier oid;
String algname = algparams.getAlgorithm();
try {
oid = algOID(algname);
} catch (IOException ioe) {
throw new NoSuchAlgorithmException
... | [
"public",
"static",
"AlgorithmId",
"get",
"(",
"AlgorithmParameters",
"algparams",
")",
"throws",
"NoSuchAlgorithmException",
"{",
"ObjectIdentifier",
"oid",
";",
"String",
"algname",
"=",
"algparams",
".",
"getAlgorithm",
"(",
")",
";",
"try",
"{",
"oid",
"=",
... | Returns one of the algorithm IDs most commonly associated
with this algorithm parameters.
@param algparams the associated algorithm parameters.
@exception NoSuchAlgorithmException on error. | [
"Returns",
"one",
"of",
"the",
"algorithm",
"IDs",
"most",
"commonly",
"associated",
"with",
"this",
"algorithm",
"parameters",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java#L438-L453 |
34,760 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java | AlgorithmId.makeSigAlg | public static String makeSigAlg(String digAlg, String encAlg) {
digAlg = digAlg.replace("-", "").toUpperCase(Locale.ENGLISH);
if (digAlg.equalsIgnoreCase("SHA")) digAlg = "SHA1";
encAlg = encAlg.toUpperCase(Locale.ENGLISH);
if (encAlg.equals("EC")) encAlg = "ECDSA";
return digA... | java | public static String makeSigAlg(String digAlg, String encAlg) {
digAlg = digAlg.replace("-", "").toUpperCase(Locale.ENGLISH);
if (digAlg.equalsIgnoreCase("SHA")) digAlg = "SHA1";
encAlg = encAlg.toUpperCase(Locale.ENGLISH);
if (encAlg.equals("EC")) encAlg = "ECDSA";
return digA... | [
"public",
"static",
"String",
"makeSigAlg",
"(",
"String",
"digAlg",
",",
"String",
"encAlg",
")",
"{",
"digAlg",
"=",
"digAlg",
".",
"replace",
"(",
"\"-\"",
",",
"\"\"",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"if",
"(",
"di... | Creates a signature algorithm name from a digest algorithm
name and a encryption algorithm name. | [
"Creates",
"a",
"signature",
"algorithm",
"name",
"from",
"a",
"digest",
"algorithm",
"name",
"and",
"a",
"encryption",
"algorithm",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java#L947-L955 |
34,761 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java | AlgorithmId.getEncAlgFromSigAlg | public static String getEncAlgFromSigAlg(String signatureAlgorithm) {
signatureAlgorithm = signatureAlgorithm.toUpperCase(Locale.ENGLISH);
int with = signatureAlgorithm.indexOf("WITH");
String keyAlgorithm = null;
if (with > 0) {
int and = signatureAlgorithm.indexOf("AND", wi... | java | public static String getEncAlgFromSigAlg(String signatureAlgorithm) {
signatureAlgorithm = signatureAlgorithm.toUpperCase(Locale.ENGLISH);
int with = signatureAlgorithm.indexOf("WITH");
String keyAlgorithm = null;
if (with > 0) {
int and = signatureAlgorithm.indexOf("AND", wi... | [
"public",
"static",
"String",
"getEncAlgFromSigAlg",
"(",
"String",
"signatureAlgorithm",
")",
"{",
"signatureAlgorithm",
"=",
"signatureAlgorithm",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"int",
"with",
"=",
"signatureAlgorithm",
".",
"indexOf"... | Extracts the encryption algorithm name from a signature
algorithm name. | [
"Extracts",
"the",
"encryption",
"algorithm",
"name",
"from",
"a",
"signature",
"algorithm",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java#L961-L977 |
34,762 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java | AlgorithmId.getDigAlgFromSigAlg | public static String getDigAlgFromSigAlg(String signatureAlgorithm) {
signatureAlgorithm = signatureAlgorithm.toUpperCase(Locale.ENGLISH);
int with = signatureAlgorithm.indexOf("WITH");
if (with > 0) {
return signatureAlgorithm.substring(0, with);
}
return null;
} | java | public static String getDigAlgFromSigAlg(String signatureAlgorithm) {
signatureAlgorithm = signatureAlgorithm.toUpperCase(Locale.ENGLISH);
int with = signatureAlgorithm.indexOf("WITH");
if (with > 0) {
return signatureAlgorithm.substring(0, with);
}
return null;
} | [
"public",
"static",
"String",
"getDigAlgFromSigAlg",
"(",
"String",
"signatureAlgorithm",
")",
"{",
"signatureAlgorithm",
"=",
"signatureAlgorithm",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"int",
"with",
"=",
"signatureAlgorithm",
".",
"indexOf"... | Extracts the digest algorithm name from a signature
algorithm name. | [
"Extracts",
"the",
"digest",
"algorithm",
"name",
"from",
"a",
"signature",
"algorithm",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/AlgorithmId.java#L983-L990 |
34,763 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java | SAX2RTFDTM._documentRoot | protected int _documentRoot(int nodeIdentifier)
{
if(nodeIdentifier==NULL) return NULL;
for (int parent=_parent(nodeIdentifier);
parent!=NULL;
nodeIdentifier=parent,parent=_parent(nodeIdentifier))
;
return nodeIdentifier;
} | java | protected int _documentRoot(int nodeIdentifier)
{
if(nodeIdentifier==NULL) return NULL;
for (int parent=_parent(nodeIdentifier);
parent!=NULL;
nodeIdentifier=parent,parent=_parent(nodeIdentifier))
;
return nodeIdentifier;
} | [
"protected",
"int",
"_documentRoot",
"(",
"int",
"nodeIdentifier",
")",
"{",
"if",
"(",
"nodeIdentifier",
"==",
"NULL",
")",
"return",
"NULL",
";",
"for",
"(",
"int",
"parent",
"=",
"_parent",
"(",
"nodeIdentifier",
")",
";",
"parent",
"!=",
"NULL",
";",
... | Given a node identifier, find the owning document node. Unlike the DOM,
this considers the owningDocument of a Document to be itself. Note that
in shared DTMs this may not be zero.
@param nodeIdentifier the id of the starting node.
@return int Node identifier of the root of this DTM tree | [
"Given",
"a",
"node",
"identifier",
"find",
"the",
"owning",
"document",
"node",
".",
"Unlike",
"the",
"DOM",
"this",
"considers",
"the",
"owningDocument",
"of",
"a",
"Document",
"to",
"be",
"itself",
".",
"Note",
"that",
"in",
"shared",
"DTMs",
"this",
"m... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java#L199-L209 |
34,764 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java | SAX2RTFDTM.startDocument | public void startDocument() throws SAXException
{
// Re-initialize the tree append process
m_endDocumentOccured = false;
m_prefixMappings = new java.util.Vector();
m_contextIndexes = new IntStack();
m_parents = new IntStack();
m_currentDocumentNode=m_size;
super.startDocument();
} | java | public void startDocument() throws SAXException
{
// Re-initialize the tree append process
m_endDocumentOccured = false;
m_prefixMappings = new java.util.Vector();
m_contextIndexes = new IntStack();
m_parents = new IntStack();
m_currentDocumentNode=m_size;
super.startDocument();
} | [
"public",
"void",
"startDocument",
"(",
")",
"throws",
"SAXException",
"{",
"// Re-initialize the tree append process",
"m_endDocumentOccured",
"=",
"false",
";",
"m_prefixMappings",
"=",
"new",
"java",
".",
"util",
".",
"Vector",
"(",
")",
";",
"m_contextIndexes",
... | Receive notification of the beginning of a new RTF document.
%REVIEW% Y'know, this isn't all that much of a deoptimization. We
might want to consider folding the start/endDocument changes back
into the main SAX2DTM so we don't have to expose so many fields
(even as Protected) and carry the additional code.
@throws SA... | [
"Receive",
"notification",
"of",
"the",
"beginning",
"of",
"a",
"new",
"RTF",
"document",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java#L223-L233 |
34,765 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.unaryNumericPromotion | public TypeMirror unaryNumericPromotion(TypeMirror type) {
TypeKind t = type.getKind();
if (t == TypeKind.DECLARED) {
type = javacTypes.unboxedType(type);
t = type.getKind();
}
if (t == TypeKind.BYTE || t == TypeKind.SHORT || t == TypeKind.CHAR) {
return getInt();
} else {
re... | java | public TypeMirror unaryNumericPromotion(TypeMirror type) {
TypeKind t = type.getKind();
if (t == TypeKind.DECLARED) {
type = javacTypes.unboxedType(type);
t = type.getKind();
}
if (t == TypeKind.BYTE || t == TypeKind.SHORT || t == TypeKind.CHAR) {
return getInt();
} else {
re... | [
"public",
"TypeMirror",
"unaryNumericPromotion",
"(",
"TypeMirror",
"type",
")",
"{",
"TypeKind",
"t",
"=",
"type",
".",
"getKind",
"(",
")",
";",
"if",
"(",
"t",
"==",
"TypeKind",
".",
"DECLARED",
")",
"{",
"type",
"=",
"javacTypes",
".",
"unboxedType",
... | If type is a byte TypeMirror, short TypeMirror, or char TypeMirror, an int TypeMirror is
returned. Otherwise, type is returned. See jls-5.6.1.
@param type a numeric type
@return the result of unary numeric promotion applied to type | [
"If",
"type",
"is",
"a",
"byte",
"TypeMirror",
"short",
"TypeMirror",
"or",
"char",
"TypeMirror",
"an",
"int",
"TypeMirror",
"is",
"returned",
".",
"Otherwise",
"type",
"is",
"returned",
".",
"See",
"jls",
"-",
"5",
".",
"6",
".",
"1",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L297-L308 |
34,766 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.binaryNumericPromotion | public TypeMirror binaryNumericPromotion(TypeMirror type1, TypeMirror type2) {
TypeKind t1 = type1.getKind();
TypeKind t2 = type2.getKind();
if (t1 == TypeKind.DECLARED) {
t1 = javacTypes.unboxedType(type1).getKind();
}
if (t2 == TypeKind.DECLARED) {
t2 = javacTypes.unboxedType(type2).ge... | java | public TypeMirror binaryNumericPromotion(TypeMirror type1, TypeMirror type2) {
TypeKind t1 = type1.getKind();
TypeKind t2 = type2.getKind();
if (t1 == TypeKind.DECLARED) {
t1 = javacTypes.unboxedType(type1).getKind();
}
if (t2 == TypeKind.DECLARED) {
t2 = javacTypes.unboxedType(type2).ge... | [
"public",
"TypeMirror",
"binaryNumericPromotion",
"(",
"TypeMirror",
"type1",
",",
"TypeMirror",
"type2",
")",
"{",
"TypeKind",
"t1",
"=",
"type1",
".",
"getKind",
"(",
")",
";",
"TypeKind",
"t2",
"=",
"type2",
".",
"getKind",
"(",
")",
";",
"if",
"(",
"... | If either type is a double TypeMirror, a double TypeMirror is returned.
Otherwise, if either type is a float TypeMirror, a float TypeMirror is returned.
Otherwise, if either type is a long TypeMirror, a long TypeMirror is returned.
Otherwise, an int TypeMirror is returned. See jls-5.6.2.
@param type1 a numeric type
@pa... | [
"If",
"either",
"type",
"is",
"a",
"double",
"TypeMirror",
"a",
"double",
"TypeMirror",
"is",
"returned",
".",
"Otherwise",
"if",
"either",
"type",
"is",
"a",
"float",
"TypeMirror",
"a",
"float",
"TypeMirror",
"is",
"returned",
".",
"Otherwise",
"if",
"eithe... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L319-L337 |
34,767 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.getObjcClass | public TypeElement getObjcClass(TypeMirror t) {
if (isArray(t)) {
return getIosArray(((ArrayType) t).getComponentType());
} else if (isDeclaredType(t)) {
return getObjcClass((TypeElement) ((DeclaredType) t).asElement());
}
return null;
} | java | public TypeElement getObjcClass(TypeMirror t) {
if (isArray(t)) {
return getIosArray(((ArrayType) t).getComponentType());
} else if (isDeclaredType(t)) {
return getObjcClass((TypeElement) ((DeclaredType) t).asElement());
}
return null;
} | [
"public",
"TypeElement",
"getObjcClass",
"(",
"TypeMirror",
"t",
")",
"{",
"if",
"(",
"isArray",
"(",
"t",
")",
")",
"{",
"return",
"getIosArray",
"(",
"(",
"(",
"ArrayType",
")",
"t",
")",
".",
"getComponentType",
"(",
")",
")",
";",
"}",
"else",
"i... | Maps the given type to it's Objective-C equivalent. Array types are mapped to their equivalent
IOSArray type and common Java classes like String and Object are mapped to NSString and
NSObject. | [
"Maps",
"the",
"given",
"type",
"to",
"it",
"s",
"Objective",
"-",
"C",
"equivalent",
".",
"Array",
"types",
"are",
"mapped",
"to",
"their",
"equivalent",
"IOSArray",
"type",
"and",
"common",
"Java",
"classes",
"like",
"String",
"and",
"Object",
"are",
"ma... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L444-L451 |
34,768 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.findSupertype | public DeclaredType findSupertype(TypeMirror type, String qualifiedName) {
TypeElement element = asTypeElement(type);
if (element != null && element.getQualifiedName().toString().equals(qualifiedName)) {
return (DeclaredType) type;
}
for (TypeMirror t : directSupertypes(type)) {
DeclaredType... | java | public DeclaredType findSupertype(TypeMirror type, String qualifiedName) {
TypeElement element = asTypeElement(type);
if (element != null && element.getQualifiedName().toString().equals(qualifiedName)) {
return (DeclaredType) type;
}
for (TypeMirror t : directSupertypes(type)) {
DeclaredType... | [
"public",
"DeclaredType",
"findSupertype",
"(",
"TypeMirror",
"type",
",",
"String",
"qualifiedName",
")",
"{",
"TypeElement",
"element",
"=",
"asTypeElement",
"(",
"type",
")",
";",
"if",
"(",
"element",
"!=",
"null",
"&&",
"element",
".",
"getQualifiedName",
... | Find a supertype matching the given qualified name. | [
"Find",
"a",
"supertype",
"matching",
"the",
"given",
"qualified",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L461-L473 |
34,769 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.visitTypeHierarchy | public boolean visitTypeHierarchy(TypeMirror type, TypeVisitor visitor) {
boolean result = true;
if (type == null) {
return result;
}
if (type.getKind() == TypeKind.DECLARED) {
result = visitor.accept((DeclaredType) type);
}
for (TypeMirror superType : directSupertypes(type)) {
... | java | public boolean visitTypeHierarchy(TypeMirror type, TypeVisitor visitor) {
boolean result = true;
if (type == null) {
return result;
}
if (type.getKind() == TypeKind.DECLARED) {
result = visitor.accept((DeclaredType) type);
}
for (TypeMirror superType : directSupertypes(type)) {
... | [
"public",
"boolean",
"visitTypeHierarchy",
"(",
"TypeMirror",
"type",
",",
"TypeVisitor",
"visitor",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"return",
"result",
";",
"}",
"if",
"(",
"type",
".",
"getKin... | Visit all declared types in the hierarchy using a depth-first traversal, visiting classes
before interfaces. | [
"Visit",
"all",
"declared",
"types",
"in",
"the",
"hierarchy",
"using",
"a",
"depth",
"-",
"first",
"traversal",
"visiting",
"classes",
"before",
"interfaces",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L505-L520 |
34,770 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.visitTypeHierarchyObjcOrder | public boolean visitTypeHierarchyObjcOrder(TypeMirror type, TypeVisitor visitor) {
boolean result = true;
if (type == null) {
return result;
}
if (type.getKind() == TypeKind.DECLARED) {
result = visitor.accept((DeclaredType) type);
}
// Visit the class type after interface types whic... | java | public boolean visitTypeHierarchyObjcOrder(TypeMirror type, TypeVisitor visitor) {
boolean result = true;
if (type == null) {
return result;
}
if (type.getKind() == TypeKind.DECLARED) {
result = visitor.accept((DeclaredType) type);
}
// Visit the class type after interface types whic... | [
"public",
"boolean",
"visitTypeHierarchyObjcOrder",
"(",
"TypeMirror",
"type",
",",
"TypeVisitor",
"visitor",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"return",
"result",
";",
"}",
"if",
"(",
"type",
".",
... | Visit all declared types in the order that Objective-C compilation will visit when resolving
the type signature of a method. Uses a depth-first traversal, visiting interfaces before
classes. | [
"Visit",
"all",
"declared",
"types",
"in",
"the",
"order",
"that",
"Objective",
"-",
"C",
"compilation",
"will",
"visit",
"when",
"resolving",
"the",
"type",
"signature",
"of",
"a",
"method",
".",
"Uses",
"a",
"depth",
"-",
"first",
"traversal",
"visiting",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L527-L552 |
34,771 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.getBinaryName | public static String getBinaryName(TypeMirror t) {
switch (t.getKind()) {
case BOOLEAN: return "Z";
case BYTE: return "B";
case CHAR: return "C";
case DOUBLE: return "D";
case FLOAT: return "F";
case INT: return "I";
case LONG: return "J";
case SHORT: return "S";
... | java | public static String getBinaryName(TypeMirror t) {
switch (t.getKind()) {
case BOOLEAN: return "Z";
case BYTE: return "B";
case CHAR: return "C";
case DOUBLE: return "D";
case FLOAT: return "F";
case INT: return "I";
case LONG: return "J";
case SHORT: return "S";
... | [
"public",
"static",
"String",
"getBinaryName",
"(",
"TypeMirror",
"t",
")",
"{",
"switch",
"(",
"t",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"BOOLEAN",
":",
"return",
"\"Z\"",
";",
"case",
"BYTE",
":",
"return",
"\"B\"",
";",
"case",
"CHAR",
":",
... | Returns the binary name for a primitive or void type. | [
"Returns",
"the",
"binary",
"name",
"for",
"a",
"primitive",
"or",
"void",
"type",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L804-L818 |
34,772 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java | TypeUtil.getReferenceSignature | public String getReferenceSignature(ExecutableElement element) {
StringBuilder sb = new StringBuilder("(");
// If the method is an inner class constructor, prepend the outer class type.
if (ElementUtil.isConstructor(element)) {
TypeElement declaringClass = ElementUtil.getDeclaringClass(element);
... | java | public String getReferenceSignature(ExecutableElement element) {
StringBuilder sb = new StringBuilder("(");
// If the method is an inner class constructor, prepend the outer class type.
if (ElementUtil.isConstructor(element)) {
TypeElement declaringClass = ElementUtil.getDeclaringClass(element);
... | [
"public",
"String",
"getReferenceSignature",
"(",
"ExecutableElement",
"element",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"\"(\"",
")",
";",
"// If the method is an inner class constructor, prepend the outer class type.",
"if",
"(",
"ElementUtil",
... | Get the "Reference" signature of a method. | [
"Get",
"the",
"Reference",
"signature",
"of",
"a",
"method",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TypeUtil.java#L883-L905 |
34,773 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java | RandomAccessFile.getFilePointer | public long getFilePointer() throws IOException {
try {
return Libcore.os.lseek(fd, 0L, SEEK_CUR);
} catch (ErrnoException errnoException) {
throw errnoException.rethrowAsIOException();
}
} | java | public long getFilePointer() throws IOException {
try {
return Libcore.os.lseek(fd, 0L, SEEK_CUR);
} catch (ErrnoException errnoException) {
throw errnoException.rethrowAsIOException();
}
} | [
"public",
"long",
"getFilePointer",
"(",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"Libcore",
".",
"os",
".",
"lseek",
"(",
"fd",
",",
"0L",
",",
"SEEK_CUR",
")",
";",
"}",
"catch",
"(",
"ErrnoException",
"errnoException",
")",
"{",
"throw... | Gets the current position within this file. All reads and
writes take place at the current file pointer position.
@return the current offset in bytes from the beginning of the file.
@throws IOException
if an error occurs while getting the file pointer of this
file. | [
"Gets",
"the",
"current",
"position",
"within",
"this",
"file",
".",
"All",
"reads",
"and",
"writes",
"take",
"place",
"at",
"the",
"current",
"file",
"pointer",
"position",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java#L231-L237 |
34,774 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java | RandomAccessFile.length | public long length() throws IOException {
try {
return Libcore.os.fstat(fd).st_size;
} catch (ErrnoException errnoException) {
throw errnoException.rethrowAsIOException();
}
} | java | public long length() throws IOException {
try {
return Libcore.os.fstat(fd).st_size;
} catch (ErrnoException errnoException) {
throw errnoException.rethrowAsIOException();
}
} | [
"public",
"long",
"length",
"(",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"Libcore",
".",
"os",
".",
"fstat",
"(",
"fd",
")",
".",
"st_size",
";",
"}",
"catch",
"(",
"ErrnoException",
"errnoException",
")",
"{",
"throw",
"errnoException",
... | Returns the length of this file in bytes.
@return the file's length in bytes.
@throws IOException
if this file is closed or some other I/O error occurs. | [
"Returns",
"the",
"length",
"of",
"this",
"file",
"in",
"bytes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java#L246-L252 |
34,775 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java | RandomAccessFile.readInt | public final int readInt() throws IOException {
readFully(scratch, 0, SizeOf.INT);
return Memory.peekInt(scratch, 0, ByteOrder.BIG_ENDIAN);
} | java | public final int readInt() throws IOException {
readFully(scratch, 0, SizeOf.INT);
return Memory.peekInt(scratch, 0, ByteOrder.BIG_ENDIAN);
} | [
"public",
"final",
"int",
"readInt",
"(",
")",
"throws",
"IOException",
"{",
"readFully",
"(",
"scratch",
",",
"0",
",",
"SizeOf",
".",
"INT",
")",
";",
"return",
"Memory",
".",
"peekInt",
"(",
"scratch",
",",
"0",
",",
"ByteOrder",
".",
"BIG_ENDIAN",
... | Reads a big-endian 32-bit integer from the current position in this file. Blocks
until four bytes have been read, the end of the file is reached or an
exception is thrown.
@return the next int value from this file.
@throws EOFException
if the end of this file is detected.
@throws IOException
if this file is closed or ... | [
"Reads",
"a",
"big",
"-",
"endian",
"32",
"-",
"bit",
"integer",
"from",
"the",
"current",
"position",
"in",
"this",
"file",
".",
"Blocks",
"until",
"four",
"bytes",
"have",
"been",
"read",
"the",
"end",
"of",
"the",
"file",
"is",
"reached",
"or",
"an"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java#L445-L448 |
34,776 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Timestamp.java | Timestamp.readObject | private void readObject(ObjectInputStream ois)
throws IOException, ClassNotFoundException {
ois.defaultReadObject();
myhash = -1;
timestamp = new Date(timestamp.getTime());
} | java | private void readObject(ObjectInputStream ois)
throws IOException, ClassNotFoundException {
ois.defaultReadObject();
myhash = -1;
timestamp = new Date(timestamp.getTime());
} | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"ois",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"ois",
".",
"defaultReadObject",
"(",
")",
";",
"myhash",
"=",
"-",
"1",
";",
"timestamp",
"=",
"new",
"Date",
"(",
"timestamp",... | Explicitly reset hash code value to -1 | [
"Explicitly",
"reset",
"hash",
"code",
"value",
"to",
"-",
"1"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Timestamp.java#L158-L163 |
34,777 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java | ReflectUtil.checkPackageAccess | public static void checkPackageAccess(Class<?> clazz) {
checkPackageAccess(clazz.getName());
if (isNonPublicProxyClass(clazz)) {
checkProxyPackageAccess(clazz);
}
} | java | public static void checkPackageAccess(Class<?> clazz) {
checkPackageAccess(clazz.getName());
if (isNonPublicProxyClass(clazz)) {
checkProxyPackageAccess(clazz);
}
} | [
"public",
"static",
"void",
"checkPackageAccess",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"checkPackageAccess",
"(",
"clazz",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"isNonPublicProxyClass",
"(",
"clazz",
")",
")",
"{",
"checkProxyPackageAcces... | Checks package access on the given class.
If it is a {@link Proxy#isProxyClass(java.lang.Class)} that implements
a non-public interface (i.e. may be in a non-restricted package),
also check the package access on the proxy interfaces. | [
"Checks",
"package",
"access",
"on",
"the",
"given",
"class",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java#L67-L72 |
34,778 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java | ReflectUtil.isAncestor | private static boolean isAncestor(ClassLoader p, ClassLoader cl) {
ClassLoader acl = cl;
do {
acl = acl.getParent();
if (p == acl) {
return true;
}
} while (acl != null);
return false;
} | java | private static boolean isAncestor(ClassLoader p, ClassLoader cl) {
ClassLoader acl = cl;
do {
acl = acl.getParent();
if (p == acl) {
return true;
}
} while (acl != null);
return false;
} | [
"private",
"static",
"boolean",
"isAncestor",
"(",
"ClassLoader",
"p",
",",
"ClassLoader",
"cl",
")",
"{",
"ClassLoader",
"acl",
"=",
"cl",
";",
"do",
"{",
"acl",
"=",
"acl",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"p",
"==",
"acl",
")",
"{",
"... | be found in the cl's delegation chain | [
"be",
"found",
"in",
"the",
"cl",
"s",
"delegation",
"chain"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java#L108-L117 |
34,779 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java | ReflectUtil.needsPackageAccessCheck | public static boolean needsPackageAccessCheck(ClassLoader from, ClassLoader to) {
if (from == null || from == to)
return false;
if (to == null)
return true;
return !isAncestor(from, to);
} | java | public static boolean needsPackageAccessCheck(ClassLoader from, ClassLoader to) {
if (from == null || from == to)
return false;
if (to == null)
return true;
return !isAncestor(from, to);
} | [
"public",
"static",
"boolean",
"needsPackageAccessCheck",
"(",
"ClassLoader",
"from",
",",
"ClassLoader",
"to",
")",
"{",
"if",
"(",
"from",
"==",
"null",
"||",
"from",
"==",
"to",
")",
"return",
"false",
";",
"if",
"(",
"to",
"==",
"null",
")",
"return"... | Returns true if package access check is needed for reflective
access from a class loader 'from' to classes or members in
a class defined by class loader 'to'. This method returns true
if 'from' is not the same as or an ancestor of 'to'. All code
in a system domain are granted with all permission and so this
method re... | [
"Returns",
"true",
"if",
"package",
"access",
"check",
"is",
"needed",
"for",
"reflective",
"access",
"from",
"a",
"class",
"loader",
"from",
"to",
"classes",
"or",
"members",
"in",
"a",
"class",
"defined",
"by",
"class",
"loader",
"to",
".",
"This",
"meth... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java#L130-L138 |
34,780 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java | ReflectUtil.checkProxyPackageAccess | public static void checkProxyPackageAccess(Class<?> clazz) {
SecurityManager s = System.getSecurityManager();
if (s != null) {
// check proxy interfaces if the given class is a proxy class
if (Proxy.isProxyClass(clazz)) {
for (Class<?> intf : clazz.getInterfaces()... | java | public static void checkProxyPackageAccess(Class<?> clazz) {
SecurityManager s = System.getSecurityManager();
if (s != null) {
// check proxy interfaces if the given class is a proxy class
if (Proxy.isProxyClass(clazz)) {
for (Class<?> intf : clazz.getInterfaces()... | [
"public",
"static",
"void",
"checkProxyPackageAccess",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"SecurityManager",
"s",
"=",
"System",
".",
"getSecurityManager",
"(",
")",
";",
"if",
"(",
"s",
"!=",
"null",
")",
"{",
"// check proxy interfaces if the gi... | Check package access on the proxy interfaces that the given proxy class
implements.
@param clazz Proxy class object | [
"Check",
"package",
"access",
"on",
"the",
"proxy",
"interfaces",
"that",
"the",
"given",
"proxy",
"class",
"implements",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java#L146-L156 |
34,781 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java | ReflectUtil.isNonPublicProxyClass | public static boolean isNonPublicProxyClass(Class<?> cls) {
String name = cls.getName();
int i = name.lastIndexOf('.');
String pkg = (i != -1) ? name.substring(0, i) : "";
// NOTE: Android creates proxies in the "default" package (and not com.sun.proxy), which
// makes this chec... | java | public static boolean isNonPublicProxyClass(Class<?> cls) {
String name = cls.getName();
int i = name.lastIndexOf('.');
String pkg = (i != -1) ? name.substring(0, i) : "";
// NOTE: Android creates proxies in the "default" package (and not com.sun.proxy), which
// makes this chec... | [
"public",
"static",
"boolean",
"isNonPublicProxyClass",
"(",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"String",
"name",
"=",
"cls",
".",
"getName",
"(",
")",
";",
"int",
"i",
"=",
"name",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"String",
"pkg",
... | Test if the given class is a proxy class that implements
non-public interface. Such proxy class may be in a non-restricted
package that bypasses checkPackageAccess. | [
"Test",
"if",
"the",
"given",
"class",
"is",
"a",
"proxy",
"class",
"that",
"implements",
"non",
"-",
"public",
"interface",
".",
"Such",
"proxy",
"class",
"may",
"be",
"in",
"a",
"non",
"-",
"restricted",
"package",
"that",
"bypasses",
"checkPackageAccess",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/reflect/misc/ReflectUtil.java#L185-L194 |
34,782 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TranslationUtil.java | TranslationUtil.retainResult | public static Expression retainResult(Expression node) {
switch (node.getKind()) {
case ARRAY_CREATION:
((ArrayCreation) node).setHasRetainedResult(true);
return TreeUtil.remove(node);
case CLASS_INSTANCE_CREATION:
((ClassInstanceCreation) node).setHasRetainedResult(true);
... | java | public static Expression retainResult(Expression node) {
switch (node.getKind()) {
case ARRAY_CREATION:
((ArrayCreation) node).setHasRetainedResult(true);
return TreeUtil.remove(node);
case CLASS_INSTANCE_CREATION:
((ClassInstanceCreation) node).setHasRetainedResult(true);
... | [
"public",
"static",
"Expression",
"retainResult",
"(",
"Expression",
"node",
")",
"{",
"switch",
"(",
"node",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"ARRAY_CREATION",
":",
"(",
"(",
"ArrayCreation",
")",
"node",
")",
".",
"setHasRetainedResult",
"(",
... | If possible give this expression an unbalanced extra retain. If a non-null
result is returned, then the returned expression has an unbalanced extra
retain and the passed in expression is removed from the tree and must be
discarded. If null is returned then the passed in expression is left
untouched. The caller must ens... | [
"If",
"possible",
"give",
"this",
"expression",
"an",
"unbalanced",
"extra",
"retain",
".",
"If",
"a",
"non",
"-",
"null",
"result",
"is",
"returned",
"then",
"the",
"returned",
"expression",
"has",
"an",
"unbalanced",
"extra",
"retain",
"and",
"the",
"passe... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TranslationUtil.java#L197-L216 |
34,783 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TranslationUtil.java | TranslationUtil.hasSideEffect | public static boolean hasSideEffect(Expression expr) {
VariableElement var = TreeUtil.getVariableElement(expr);
if (var != null && ElementUtil.isVolatile(var)) {
return true;
}
switch (expr.getKind()) {
case BOOLEAN_LITERAL:
case CHARACTER_LITERAL:
case NULL_LITERAL:
case N... | java | public static boolean hasSideEffect(Expression expr) {
VariableElement var = TreeUtil.getVariableElement(expr);
if (var != null && ElementUtil.isVolatile(var)) {
return true;
}
switch (expr.getKind()) {
case BOOLEAN_LITERAL:
case CHARACTER_LITERAL:
case NULL_LITERAL:
case N... | [
"public",
"static",
"boolean",
"hasSideEffect",
"(",
"Expression",
"expr",
")",
"{",
"VariableElement",
"var",
"=",
"TreeUtil",
".",
"getVariableElement",
"(",
"expr",
")",
";",
"if",
"(",
"var",
"!=",
"null",
"&&",
"ElementUtil",
".",
"isVolatile",
"(",
"va... | Reterns whether the expression might have any side effects. If true, it
would be unsafe to prune the given node from the tree. | [
"Reterns",
"whether",
"the",
"expression",
"might",
"have",
"any",
"side",
"effects",
".",
"If",
"true",
"it",
"would",
"be",
"unsafe",
"to",
"prune",
"the",
"given",
"node",
"from",
"the",
"tree",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TranslationUtil.java#L247-L294 |
34,784 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/TranslationUtil.java | TranslationUtil.getOperatorFunctionModifier | public String getOperatorFunctionModifier(Expression expr) {
VariableElement var = TreeUtil.getVariableElement(expr);
if (var == null) {
assert TreeUtil.trimParentheses(expr) instanceof ArrayAccess
: "Expression cannot be resolved to a variable or array access.";
return "Array";
}
... | java | public String getOperatorFunctionModifier(Expression expr) {
VariableElement var = TreeUtil.getVariableElement(expr);
if (var == null) {
assert TreeUtil.trimParentheses(expr) instanceof ArrayAccess
: "Expression cannot be resolved to a variable or array access.";
return "Array";
}
... | [
"public",
"String",
"getOperatorFunctionModifier",
"(",
"Expression",
"expr",
")",
"{",
"VariableElement",
"var",
"=",
"TreeUtil",
".",
"getVariableElement",
"(",
"expr",
")",
";",
"if",
"(",
"var",
"==",
"null",
")",
"{",
"assert",
"TreeUtil",
".",
"trimParen... | Returns the modifier for an assignment expression being converted to a
function. The result will be "Array" if the lhs is an array access,
"Strong" if the lhs is a field with a strong reference, and an empty string
for local variables and weak fields. | [
"Returns",
"the",
"modifier",
"for",
"an",
"assignment",
"expression",
"being",
"converted",
"to",
"a",
"function",
".",
"The",
"result",
"will",
"be",
"Array",
"if",
"the",
"lhs",
"is",
"an",
"array",
"access",
"Strong",
"if",
"the",
"lhs",
"is",
"a",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/TranslationUtil.java#L302-L317 |
34,785 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java | Period.at | public static Period at(float count, TimeUnit unit) {
checkCount(count);
return new Period(ETimeLimit.NOLIMIT, false, count, unit);
} | java | public static Period at(float count, TimeUnit unit) {
checkCount(count);
return new Period(ETimeLimit.NOLIMIT, false, count, unit);
} | [
"public",
"static",
"Period",
"at",
"(",
"float",
"count",
",",
"TimeUnit",
"unit",
")",
"{",
"checkCount",
"(",
"count",
")",
";",
"return",
"new",
"Period",
"(",
"ETimeLimit",
".",
"NOLIMIT",
",",
"false",
",",
"count",
",",
"unit",
")",
";",
"}"
] | Constructs a Period representing a duration of
count units extending into the past.
@param count the number of units, must be non-negative
@param unit the unit
@return the new Period | [
"Constructs",
"a",
"Period",
"representing",
"a",
"duration",
"of",
"count",
"units",
"extending",
"into",
"the",
"past",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java#L43-L46 |
34,786 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java | Period.moreThan | public static Period moreThan(float count, TimeUnit unit) {
checkCount(count);
return new Period(ETimeLimit.MT, false, count, unit);
} | java | public static Period moreThan(float count, TimeUnit unit) {
checkCount(count);
return new Period(ETimeLimit.MT, false, count, unit);
} | [
"public",
"static",
"Period",
"moreThan",
"(",
"float",
"count",
",",
"TimeUnit",
"unit",
")",
"{",
"checkCount",
"(",
"count",
")",
";",
"return",
"new",
"Period",
"(",
"ETimeLimit",
".",
"MT",
",",
"false",
",",
"count",
",",
"unit",
")",
";",
"}"
] | Constructs a Period representing a duration more than
count units extending into the past.
@param count the number of units. must be non-negative
@param unit the unit
@return the new Period | [
"Constructs",
"a",
"Period",
"representing",
"a",
"duration",
"more",
"than",
"count",
"units",
"extending",
"into",
"the",
"past",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java#L55-L58 |
34,787 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java | Period.lessThan | public static Period lessThan(float count, TimeUnit unit) {
checkCount(count);
return new Period(ETimeLimit.LT, false, count, unit);
} | java | public static Period lessThan(float count, TimeUnit unit) {
checkCount(count);
return new Period(ETimeLimit.LT, false, count, unit);
} | [
"public",
"static",
"Period",
"lessThan",
"(",
"float",
"count",
",",
"TimeUnit",
"unit",
")",
"{",
"checkCount",
"(",
"count",
")",
";",
"return",
"new",
"Period",
"(",
"ETimeLimit",
".",
"LT",
",",
"false",
",",
"count",
",",
"unit",
")",
";",
"}"
] | Constructs a Period representing a duration
less than count units extending into the past.
@param count the number of units. must be non-negative
@param unit the unit
@return the new Period | [
"Constructs",
"a",
"Period",
"representing",
"a",
"duration",
"less",
"than",
"count",
"units",
"extending",
"into",
"the",
"past",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java#L67-L70 |
34,788 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java | Period.isSet | public boolean isSet() {
for (int i = 0; i < counts.length; ++i) {
if (counts[i] != 0) {
return true;
}
}
return false;
} | java | public boolean isSet() {
for (int i = 0; i < counts.length; ++i) {
if (counts[i] != 0) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"isSet",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"counts",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"counts",
"[",
"i",
"]",
"!=",
"0",
")",
"{",
"return",
"true",
";",
"}",
"}",
"retu... | Returns true if any unit is set.
@return true if any unit is set | [
"Returns",
"true",
"if",
"any",
"unit",
"is",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java#L169-L176 |
34,789 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java | Period.getCount | public float getCount(TimeUnit unit) {
int ord = unit.ordinal;
if (counts[ord] == 0) {
return 0;
}
return (counts[ord] - 1)/1000f;
} | java | public float getCount(TimeUnit unit) {
int ord = unit.ordinal;
if (counts[ord] == 0) {
return 0;
}
return (counts[ord] - 1)/1000f;
} | [
"public",
"float",
"getCount",
"(",
"TimeUnit",
"unit",
")",
"{",
"int",
"ord",
"=",
"unit",
".",
"ordinal",
";",
"if",
"(",
"counts",
"[",
"ord",
"]",
"==",
"0",
")",
"{",
"return",
"0",
";",
"}",
"return",
"(",
"counts",
"[",
"ord",
"]",
"-",
... | Returns the count for the specified unit. If the
unit is not set, returns 0.
@param unit the unit to test
@return the count | [
"Returns",
"the",
"count",
"for",
"the",
"specified",
"unit",
".",
"If",
"the",
"unit",
"is",
"not",
"set",
"returns",
"0",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java#L193-L199 |
34,790 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java | Period.setTimeUnitValue | private Period setTimeUnitValue(TimeUnit unit, float value) {
if (value < 0) {
throw new IllegalArgumentException("value: " + value);
}
return setTimeUnitInternalValue(unit, (int)(value * 1000) + 1);
} | java | private Period setTimeUnitValue(TimeUnit unit, float value) {
if (value < 0) {
throw new IllegalArgumentException("value: " + value);
}
return setTimeUnitInternalValue(unit, (int)(value * 1000) + 1);
} | [
"private",
"Period",
"setTimeUnitValue",
"(",
"TimeUnit",
"unit",
",",
"float",
"value",
")",
"{",
"if",
"(",
"value",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"value: \"",
"+",
"value",
")",
";",
"}",
"return",
"setTimeUnitInte... | Set the unit's internal value, converting from float to int. | [
"Set",
"the",
"unit",
"s",
"internal",
"value",
"converting",
"from",
"float",
"to",
"int",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/Period.java#L316-L321 |
34,791 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/AlgorithmParameterGenerator.java | AlgorithmParameterGenerator.init | public final void init(AlgorithmParameterSpec genParamSpec,
SecureRandom random)
throws InvalidAlgorithmParameterException {
paramGenSpi.engineInit(genParamSpec, random);
} | java | public final void init(AlgorithmParameterSpec genParamSpec,
SecureRandom random)
throws InvalidAlgorithmParameterException {
paramGenSpi.engineInit(genParamSpec, random);
} | [
"public",
"final",
"void",
"init",
"(",
"AlgorithmParameterSpec",
"genParamSpec",
",",
"SecureRandom",
"random",
")",
"throws",
"InvalidAlgorithmParameterException",
"{",
"paramGenSpi",
".",
"engineInit",
"(",
"genParamSpec",
",",
"random",
")",
";",
"}"
] | Initializes this parameter generator with a set of algorithm-specific
parameter generation values.
@param genParamSpec the set of algorithm-specific parameter generation values.
@param random the source of randomness.
@exception InvalidAlgorithmParameterException if the given parameter
generation values are inappropr... | [
"Initializes",
"this",
"parameter",
"generator",
"with",
"a",
"set",
"of",
"algorithm",
"-",
"specific",
"parameter",
"generation",
"values",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/AlgorithmParameterGenerator.java#L352-L356 |
34,792 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/util/ArrayMap.java | ArrayMap.containsKey | @Override
public boolean containsKey(Object key) {
return key == null ? (indexOfNull() >= 0) : (indexOf(key, key.hashCode()) >= 0);
} | java | @Override
public boolean containsKey(Object key) {
return key == null ? (indexOfNull() >= 0) : (indexOf(key, key.hashCode()) >= 0);
} | [
"@",
"Override",
"public",
"boolean",
"containsKey",
"(",
"Object",
"key",
")",
"{",
"return",
"key",
"==",
"null",
"?",
"(",
"indexOfNull",
"(",
")",
">=",
"0",
")",
":",
"(",
"indexOf",
"(",
"key",
",",
"key",
".",
"hashCode",
"(",
")",
")",
">="... | Check whether a key exists in the array.
@param key The key to search for.
@return Returns true if the key exists, else false. | [
"Check",
"whether",
"a",
"key",
"exists",
"in",
"the",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/ArrayMap.java#L324-L327 |
34,793 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/util/ArrayMap.java | ArrayMap.setValueAt | public V setValueAt(int index, V value) {
index = (index << 1) + 1;
V old = (V)mArray[index];
mArray[index] = value;
return old;
} | java | public V setValueAt(int index, V value) {
index = (index << 1) + 1;
V old = (V)mArray[index];
mArray[index] = value;
return old;
} | [
"public",
"V",
"setValueAt",
"(",
"int",
"index",
",",
"V",
"value",
")",
"{",
"index",
"=",
"(",
"index",
"<<",
"1",
")",
"+",
"1",
";",
"V",
"old",
"=",
"(",
"V",
")",
"mArray",
"[",
"index",
"]",
";",
"mArray",
"[",
"index",
"]",
"=",
"val... | Set the value at a given index in the array.
@param index The desired index, must be between 0 and {@link #size()}-1.
@param value The new value to store at this index.
@return Returns the previous value at the given index. | [
"Set",
"the",
"value",
"at",
"a",
"given",
"index",
"in",
"the",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/ArrayMap.java#L396-L401 |
34,794 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/util/ArrayMap.java | ArrayMap.append | public void append(K key, V value) {
int index = mSize;
final int hash = key == null ? 0 : key.hashCode();
if (index >= mHashes.length) {
throw new IllegalStateException("Array is full");
}
if (index > 0 && mHashes[index-1] > hash) {
RuntimeException e = n... | java | public void append(K key, V value) {
int index = mSize;
final int hash = key == null ? 0 : key.hashCode();
if (index >= mHashes.length) {
throw new IllegalStateException("Array is full");
}
if (index > 0 && mHashes[index-1] > hash) {
RuntimeException e = n... | [
"public",
"void",
"append",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"int",
"index",
"=",
"mSize",
";",
"final",
"int",
"hash",
"=",
"key",
"==",
"null",
"?",
"0",
":",
"key",
".",
"hashCode",
"(",
")",
";",
"if",
"(",
"index",
">=",
"mHas... | Special fast path for appending items to the end of the array without validation.
The array must already be large enough to contain the item.
@hide | [
"Special",
"fast",
"path",
"for",
"appending",
"items",
"to",
"the",
"end",
"of",
"the",
"array",
"without",
"validation",
".",
"The",
"array",
"must",
"already",
"be",
"large",
"enough",
"to",
"contain",
"the",
"item",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/ArrayMap.java#L476-L496 |
34,795 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/X509CertSelector.java | X509CertSelector.setPathToNamesInternal | void setPathToNamesInternal(Set<GeneralNameInterface> names) {
// set names to non-null dummy value
// this breaks getPathToNames()
pathToNames = Collections.<List<?>>emptySet();
pathToGeneralNames = names;
} | java | void setPathToNamesInternal(Set<GeneralNameInterface> names) {
// set names to non-null dummy value
// this breaks getPathToNames()
pathToNames = Collections.<List<?>>emptySet();
pathToGeneralNames = names;
} | [
"void",
"setPathToNamesInternal",
"(",
"Set",
"<",
"GeneralNameInterface",
">",
"names",
")",
"{",
"// set names to non-null dummy value",
"// this breaks getPathToNames()",
"pathToNames",
"=",
"Collections",
".",
"<",
"List",
"<",
"?",
">",
">",
"emptySet",
"(",
")",... | called from CertPathHelper | [
"called",
"from",
"CertPathHelper"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/X509CertSelector.java#L1182-L1187 |
34,796 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/HandshakeCompletedEvent.java | HandshakeCompletedEvent.getPeerPrincipal | public Principal getPeerPrincipal()
throws SSLPeerUnverifiedException
{
Principal principal;
try {
principal = session.getPeerPrincipal();
} catch (AbstractMethodError e) {
// if the provider does not support it, fallback to peer certs.
// retu... | java | public Principal getPeerPrincipal()
throws SSLPeerUnverifiedException
{
Principal principal;
try {
principal = session.getPeerPrincipal();
} catch (AbstractMethodError e) {
// if the provider does not support it, fallback to peer certs.
// retu... | [
"public",
"Principal",
"getPeerPrincipal",
"(",
")",
"throws",
"SSLPeerUnverifiedException",
"{",
"Principal",
"principal",
";",
"try",
"{",
"principal",
"=",
"session",
".",
"getPeerPrincipal",
"(",
")",
";",
"}",
"catch",
"(",
"AbstractMethodError",
"e",
")",
... | Returns the identity of the peer which was established as part of
defining the session.
@return the peer's principal. Returns an X500Principal of the
end-entity certiticate for X509-based cipher suites, and
KerberosPrincipal for Kerberos cipher suites.
@throws SSLPeerUnverifiedException if the peer's identity has not... | [
"Returns",
"the",
"identity",
"of",
"the",
"peer",
"which",
"was",
"established",
"as",
"part",
"of",
"defining",
"the",
"session",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/HandshakeCompletedEvent.java#L178-L191 |
34,797 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/HandshakeCompletedEvent.java | HandshakeCompletedEvent.getLocalPrincipal | public Principal getLocalPrincipal()
{
Principal principal;
try {
principal = session.getLocalPrincipal();
} catch (AbstractMethodError e) {
principal = null;
// if the provider does not support it, fallback to local certs.
// return the X500Pr... | java | public Principal getLocalPrincipal()
{
Principal principal;
try {
principal = session.getLocalPrincipal();
} catch (AbstractMethodError e) {
principal = null;
// if the provider does not support it, fallback to local certs.
// return the X500Pr... | [
"public",
"Principal",
"getLocalPrincipal",
"(",
")",
"{",
"Principal",
"principal",
";",
"try",
"{",
"principal",
"=",
"session",
".",
"getLocalPrincipal",
"(",
")",
";",
"}",
"catch",
"(",
"AbstractMethodError",
"e",
")",
"{",
"principal",
"=",
"null",
";"... | Returns the principal that was sent to the peer during handshaking.
@return the principal sent to the peer. Returns an X500Principal
of the end-entity certificate for X509-based cipher suites, and
KerberosPrincipal for Kerberos cipher suites. If no principal was
sent, then null is returned.
@see #getLocalCertificates... | [
"Returns",
"the",
"principal",
"that",
"was",
"sent",
"to",
"the",
"peer",
"during",
"handshaking",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/HandshakeCompletedEvent.java#L206-L222 |
34,798 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java | PKIXRevocationChecker.setOcspExtensions | public void setOcspExtensions(List<Extension> extensions)
{
this.ocspExtensions = (extensions == null)
? Collections.<Extension>emptyList()
: new ArrayList<Extension>(extensions);
} | java | public void setOcspExtensions(List<Extension> extensions)
{
this.ocspExtensions = (extensions == null)
? Collections.<Extension>emptyList()
: new ArrayList<Extension>(extensions);
} | [
"public",
"void",
"setOcspExtensions",
"(",
"List",
"<",
"Extension",
">",
"extensions",
")",
"{",
"this",
".",
"ocspExtensions",
"=",
"(",
"extensions",
"==",
"null",
")",
"?",
"Collections",
".",
"<",
"Extension",
">",
"emptyList",
"(",
")",
":",
"new",
... | Sets the optional OCSP request extensions.
@param extensions a list of extensions. The list is copied to protect
against subsequent modification. | [
"Sets",
"the",
"optional",
"OCSP",
"request",
"extensions",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java#L168-L173 |
34,799 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java | PKIXRevocationChecker.setOcspResponses | public void setOcspResponses(Map<X509Certificate, byte[]> responses)
{
if (responses == null) {
this.ocspResponses = Collections.<X509Certificate, byte[]>emptyMap();
} else {
Map<X509Certificate, byte[]> copy = new HashMap<>(responses.size());
for (Map.Entry<X509C... | java | public void setOcspResponses(Map<X509Certificate, byte[]> responses)
{
if (responses == null) {
this.ocspResponses = Collections.<X509Certificate, byte[]>emptyMap();
} else {
Map<X509Certificate, byte[]> copy = new HashMap<>(responses.size());
for (Map.Entry<X509C... | [
"public",
"void",
"setOcspResponses",
"(",
"Map",
"<",
"X509Certificate",
",",
"byte",
"[",
"]",
">",
"responses",
")",
"{",
"if",
"(",
"responses",
"==",
"null",
")",
"{",
"this",
".",
"ocspResponses",
"=",
"Collections",
".",
"<",
"X509Certificate",
",",... | Sets the OCSP responses. These responses are used to determine
the revocation status of the specified certificates when OCSP is used.
@param responses a map of OCSP responses. Each key is an
{@code X509Certificate} that maps to the corresponding
DER-encoded OCSP response for that certificate. A deep copy of
the map is... | [
"Sets",
"the",
"OCSP",
"responses",
".",
"These",
"responses",
"are",
"used",
"to",
"determine",
"the",
"revocation",
"status",
"of",
"the",
"specified",
"certificates",
"when",
"OCSP",
"is",
"used",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java#L194-L205 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.