Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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/ir/CatchNode.java
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.nashorn.internal.ir;
import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
/**
* IR representation of a catch clause.
*/
@Immutable
public final class CatchNode extends Statement {
private static final long serialVersionUID = 1L;
/** Exception binding identifier or binding pattern. */
private final Expression exception;
/** Exception condition. */
private final Expression exceptionCondition;
/** Catch body. */
private final Block body;
private final boolean isSyntheticRethrow;
/**
* Constructors
*
* @param lineNumber lineNumber
* @param token token
* @param finish finish
* @param exception variable name or pattern of exception
* @param exceptionCondition exception condition
* @param body catch body
* @param isSyntheticRethrow true if this node is a synthetically generated rethrow node.
*/
public CatchNode(final int lineNumber, final long token, final int finish, final Expression exception,
final Expression exceptionCondition, final Block body, final boolean isSyntheticRethrow) {
super(lineNumber, token, finish);
if (exception instanceof IdentNode) {
this.exception = ((IdentNode) exception).setIsInitializedHere();
} else if ((exception instanceof LiteralNode.ArrayLiteralNode) || (exception instanceof ObjectNode)) {
this.exception = exception;
} else {
throw new IllegalArgumentException("invalid catch parameter");
}
this.exceptionCondition = exceptionCondition;
this.body = body;
this.isSyntheticRethrow = isSyntheticRethrow;
}
private CatchNode(final CatchNode catchNode, final Expression exception, final Expression exceptionCondition,
final Block body, final boolean isSyntheticRethrow) {
super(catchNode);
this.exception = exception;
this.exceptionCondition = exceptionCondition;
this.body = body;
this.isSyntheticRethrow = isSyntheticRethrow;
}
/**
* Assist in IR navigation.
* @param visitor IR navigating visitor.
*/
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterCatchNode(this)) {
return visitor.leaveCatchNode(
setException((Expression) exception.accept(visitor)).
setExceptionCondition(exceptionCondition == null ? null : (Expression) exceptionCondition.accept(visitor)).
setBody((Block) body.accept(visitor)));
}
return this;
}
@Override
public boolean isTerminal() {
return body.isTerminal();
}
@Override
public void toString(final StringBuilder sb, final boolean printTypes) {
sb.append(" catch (");
exception.toString(sb, printTypes);
if (exceptionCondition != null) {
sb.append(" if ");
exceptionCondition.toString(sb, printTypes);
}
sb.append(')');
}
/**
* Get the binding pattern representing the exception thrown
*
* @return the exception binding pattern
*/
public Expression getException() {
return exception;
}
/**
* Get the identifier representing the exception thrown
*
* @return the exception identifier
* @throws ClassCastException if exception set is not binding identifier
*/
public IdentNode getExceptionIdentifier() {
return (IdentNode) exception;
}
/**
* Get the exception condition for this catch block
* @return the exception condition
*/
public Expression getExceptionCondition() {
return exceptionCondition;
}
/**
* Reset the exception condition for this catch block
* @param exceptionCondition the new exception condition
* @return new or same CatchNode
*/
public CatchNode setExceptionCondition(final Expression exceptionCondition) {
if (this.exceptionCondition == exceptionCondition) {
return this;
}
return new CatchNode(this, exception, exceptionCondition, body, isSyntheticRethrow);
}
/**
* Get the body for this catch block
* @return the catch block body
*/
public Block getBody() {
return body;
}
/**
* Resets the exception of a catch block
*
* @param exception new exception which can be binding identifier or binding
* pattern
* @return new catch node if changed, same otherwise
*/
public CatchNode setException(final Expression exception) {
if (this.exception == exception) {
return this;
}
/*check if exception is legitimate*/
if (!((exception instanceof IdentNode) || (exception instanceof LiteralNode.ArrayLiteralNode) || (exception instanceof ObjectNode))) {
throw new IllegalArgumentException("invalid catch parameter");
}
return new CatchNode(this, exception, exceptionCondition, body, isSyntheticRethrow);
}
private CatchNode setBody(final Block body) {
if (this.body == body) {
return this;
}
return new CatchNode(this, exception, exceptionCondition, body, isSyntheticRethrow);
}
/**
* Is this catch block a non-JavaScript constructor, for example created as
* part of the rethrow mechanism of a finally block in Lower? Then we just
* pass the exception on and need not unwrap whatever is in the ECMAException
* object catch symbol
* @return true if a finally synthetic rethrow
*/
public boolean isSyntheticRethrow() {
return isSyntheticRethrow;
}
}
⏎ jdk/nashorn/internal/ir/CatchNode.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, ≈191🔥, 0💬
Popular Posts:
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...
Commons Pool provides an Object-pooling API, with three major aspects: 1. A generic object pool inte...
Where to get the Java source code for Connector/J 8.0 Core API module? Java source code files for Co...