Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 jdk.scripting.nashorn.jmod - Scripting Nashorn Module
JDK 11 jdk.scripting.nashorn.jmod is the JMOD file for JDK 11 Scripting Nashorn module.
JDK 11 Scripting Nashorn module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.scripting.nashorn.jmod.
JDK 11 Scripting Nashorn module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Scripting Nashorn module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.scripting.nashorn.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/nashorn/internal/parser/Token.java
/* * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.nashorn.internal.parser; import static jdk.nashorn.internal.parser.TokenKind.LITERAL; import jdk.nashorn.internal.runtime.Source; /** * A token is a 64 bit long value that represents a basic parse/lex unit. * This class provides static methods to manipulate lexer tokens. */ public class Token { /** * We use 28 bits for the position and 28 bits for the length of the token. * This limits the maximal length of code we can handle to 2 ^ 28 - 1 bytes. */ public final static int LENGTH_MASK = 0xfffffff; // The first 8 bits are used for the token type, followed by length and position private final static int LENGTH_SHIFT = 8; private final static int POSITION_SHIFT = 36; private Token() { } /** * Create a compact form of token information. * @param type Type of token. * @param position Start position of the token in the source. * @param length Length of the token. * @return Token descriptor. */ public static long toDesc(final TokenType type, final int position, final int length) { assert position <= LENGTH_MASK && length <= LENGTH_MASK; return (long)position << POSITION_SHIFT | (long)length << LENGTH_SHIFT | type.ordinal(); } /** * Extract token position from a token descriptor. * @param token Token descriptor. * @return Start position of the token in the source. */ public static int descPosition(final long token) { return (int)(token >>> POSITION_SHIFT); } /** * Normally returns the token itself, except in case of string tokens * which report their position past their opening delimiter and thus * need to have position and length adjusted. * * @param token Token descriptor. * @return same or adjusted token. */ public static long withDelimiter(final long token) { final TokenType tokenType = Token.descType(token); switch(tokenType) { case STRING: case ESCSTRING: case EXECSTRING: case TEMPLATE: case TEMPLATE_TAIL: { final int start = Token.descPosition(token) - 1; final int len = Token.descLength(token) + 2; return toDesc(tokenType, start, len); } case TEMPLATE_HEAD: case TEMPLATE_MIDDLE: { final int start = Token.descPosition(token) - 1; final int len = Token.descLength(token) + 3; return toDesc(tokenType, start, len); } default: { return token; } } } /** * Extract token length from a token descriptor. * @param token Token descriptor. * @return Length of the token. */ public static int descLength(final long token) { return (int)((token >>> LENGTH_SHIFT) & LENGTH_MASK); } /** * Extract token type from a token descriptor. * @param token Token descriptor. * @return Type of token. */ public static TokenType descType(final long token) { return TokenType.getValues()[(int)token & 0xff]; } /** * Change the token to use a new type. * * @param token The original token. * @param newType The new token type. * @return The recast token. */ public static long recast(final long token, final TokenType newType) { return token & ~0xFFL | newType.ordinal(); } /** * Return a string representation of a token. * @param source Token source. * @param token Token descriptor. * @param verbose True to include details. * @return String representation. */ public static String toString(final Source source, final long token, final boolean verbose) { final TokenType type = Token.descType(token); String result; if (source != null && type.getKind() == LITERAL) { result = source.getString(token); } else { result = type.getNameOrType(); } if (verbose) { final int position = Token.descPosition(token); final int length = Token.descLength(token); result += " (" + position + ", " + length + ")"; } return result; } /** * String conversion of token * * @param source the source * @param token the token * * @return token as string */ public static String toString(final Source source, final long token) { return Token.toString(source, token, false); } /** * String conversion of token - version without source given * * @param token the token * * @return token as string */ public static String toString(final long token) { return Token.toString(null, token, false); } /** * Static hash code computation function token * * @param token a token * * @return hash code for token */ public static int hashCode(final long token) { return (int)(token ^ token >>> 32); } }
⏎ jdk/nashorn/internal/parser/Token.java
Or download all of them as a single archive file:
File name: jdk.scripting.nashorn-11.0.1-src.zip File size: 1390965 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.scripting.nashorn.shell.jmod - Scripting Nashorn Shell Module
2020-04-25, 83618👍, 0💬
Popular Posts:
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...
JRE 8 deploy.jar is the JAR file for JRE 8 Java Control Panel and other deploy tools. JRE (Java Runt...
maven-core-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Core module. Apache Maven is a software ...
commons-net.jar is the bytecode of Apache Commons Net library, which implements the client side of m...
Apache Log4j provides the interface that applications should code to and provides the adapter compon...