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:
Rhino JavaScript Java Library Source Code
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Java.
Rhino JavaScript Java Library Source Code files are provided in binary package (rhino-1.7.14.zip).
You can also browse the source code below:
✍: FYIcenter.com
⏎ org/mozilla/javascript/Slot.java
package org.mozilla.javascript; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; /** * A Slot is the base class for all properties stored in the ScriptableObject class. There are a * number of different types of slots. This base class represents an "ordinary" property such as a * primitive type or another object. Separate classes are used to represent properties that have * various types of getter and setter methods. */ public class Slot implements Serializable { private static final long serialVersionUID = -6090581677123995491L; Object name; // This can change due to caching int indexOrHash; private short attributes; Object value; transient Slot next; // next in hash table bucket transient Slot orderedNext; // next in linked list Slot(Object name, int indexOrHash, int attributes) { this.name = name; this.indexOrHash = indexOrHash; this.attributes = (short) attributes; } /** * Return true if this is a base-class "Slot". Sadly too much code breaks if we try to do this * any other way. */ boolean isValueSlot() { return true; } /** * Return true if this is a "setter slot" which, which we need to know for some legacy support. */ boolean isSetterSlot() { return false; } protected Slot(Slot oldSlot) { name = oldSlot.name; indexOrHash = oldSlot.indexOrHash; attributes = oldSlot.attributes; value = oldSlot.value; next = oldSlot.next; orderedNext = oldSlot.orderedNext; } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (name != null) { indexOrHash = name.hashCode(); } } public boolean setValue(Object value, Scriptable owner, Scriptable start) { if ((attributes & ScriptableObject.READONLY) != 0) { if (Context.isCurrentContextStrict()) { throw ScriptRuntime.typeErrorById("msg.modify.readonly", name); } return true; } if (owner == start) { this.value = value; return true; } return false; } public Object getValue(Scriptable start) { return value; } int getAttributes() { return attributes; } synchronized void setAttributes(int value) { ScriptableObject.checkValidAttributes(value); attributes = (short) value; } ScriptableObject getPropertyDescriptor(Context cx, Scriptable scope) { return ScriptableObject.buildDataDescriptor(scope, value, attributes); } protected void throwNoSetterException(Scriptable start, Object newValue) { Context cx = Context.getContext(); if (cx.isStrictMode() || // Based on TC39 ES3.1 Draft of 9-Feb-2009, 8.12.4, step 2, // we should throw a TypeError in this case. cx.hasFeature(Context.FEATURE_STRICT_MODE)) { String prop = ""; if (name != null) { prop = "[" + start.getClassName() + "]." + name; } throw ScriptRuntime.typeErrorById( "msg.set.prop.no.setter", prop, Context.toString(newValue)); } } /** * Return a JavaScript function that represents the "setter". This is used by some legacy * functionality. Return null if there is no setter. */ Function getSetterFunction(String name, Scriptable scope) { return null; } /** Same for the "getter." */ Function getGetterFunction(String name, Scriptable scope) { return null; } }
⏎ org/mozilla/javascript/Slot.java
Or download all of them as a single archive file:
File name: rhino-1.7.14-sources.jar File size: 1029165 bytes Release date: 2022-01-06 Download
⇒ Example code to Test rhino-runtime-1.7.14.jar
⇐ Download Rhino JavaScript Binary Package
2022-05-03, 35522👍, 1💬
Popular Posts:
JRE 5 sunjce_provider.jar is the JAR file for JRE 5 Sun JCE Provider, which provides implementations...
How to download and install JDK (Java Development Kit) 8? If you want to write Java applications, yo...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...
JDK 11 jdk.internal.le.jmod is the JMOD file for JDK 11 Internal Line Editing module. JDK 11 Interna...