Scripting in Java : integrating with Groovy and JavaScript /
Scripting in Java teaches you how to use the Java Scripting API and JavaScript to execute scripts and take advantage of the features of a scripting language while developing Java applications. The book also covers topics that enable scripting languages to take advantage of Java features and the Java...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
[Berkeley, CA] :
Apress,
[2014]
|
Colección: | Expert's voice in Java.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- At a Glance; Introduction; Chapter 1: Getting Started; What Is Scripting in Java?; Executing Your First Script; Using the jjs Command-line Tool; Printing Text in Nashorn; Using Other Scripting Languages; Exploring the javax.script Package; The ScriptEngine and ScriptEngineFactory Interfaces; The AbstractScriptEngine Class; The ScriptEngineManager Class; The Compilable Interface and the CompiledScript Class; The Invocable Interface; The Bindings Interface and the SimpleBindings Class; The ScriptContext Interface and the SimpleScriptContext Class; The ScriptException Class.
- Discovering and Instantiating ScriptEnginesSummary; Chapter 2: Executing Scripts; Using the eval()) Method; Passing Parameters; Passing Parameters from Java Code to Scripts; Passing Parameters from Scripts to Java Code; Summary; Chapter 3: Passing Parameters to Scripts; Bindings, Scope, and Context; Bindings; Scope; Defining the Script Context; Putting Them Together; Using a Custom ScriptContext; Return Value of the eval()) Method; Reserved Keys for Engine Scope Bindings; Changing the Default ScriptContext; Sending Scripts Output to a File; Summary; Chapter 4: Writing Scripts in Nashorn.
- Strict and Nonstrict ModesIdentifiers; Comments; Declaring Variables; Data Types; The Undefined Type; The Null Type; The Number Type; The Boolean Type; The String Type; Operators; Type Conversion; To Boolean Conversion; To Number Conversion; To String Conversion; Statements; Block Statement; Variable Statement; Empty Statement; Expression Statement; The if Statement; Iteration Statements; The continue, break, and return Statements; The with Statement; The switch Statement; Labelled Statements; The throw Statement; The try Statement; The debugger Statement; Defining Functions.
- Function DeclarationWorking with Function Arguments; Function Expression; The Function()) Constructor; The Object Type; Using an Object Literal; Accessing Object's Properties; Defining Accessor Properties; Setting Property Attributes; Deleting Properties of an Object; Using a Constructor Function; Object Inheritance; Using Object.create()) Method; Binding Object Properties; Locking Objects; Accessing Missing Properties; Serializing Objects; Dynamically Evaluating Scripts; Variable Scoping and Hoisting; Using Strict Mode; Built-in Global Objects; The Object Object; The Function Object.
- The String ObjectThe Number Object; The Boolean Object; The Date Object; The Math Object; The RegExp Object; Knowing Script Location; Built-in Global Functions; The parseInt()) Function; The parseFloat() Function; The isNaN() Function; The isFinite()) Function; The decodeURI()) Function; The decodeURIComponent()) Function; The encodeURI()) Function; The encodeURIComponent() Function; The load()) and loadWithNewGlobal Functions; Summary; Chapter 5: Procedures and Compiled Scripts; Invoking Procedures in Scripts; Implementing Java Interfaces in Scripts; Using Compiled Scripts; Summary.