concept object literal in category java

appears as: object literals, object literal, n object literal
JavaFX in Action

This is an excerpt from Manning's book JavaFX in Action.

Object what? Sorry, but this is one of those occasions when I have to skip ahead and introduce something we won’t cover fully until chapter 3. Object literals are JavaFX Script’s way of declaratively creating complex objects. You should still be able to follow the basics of what follows, in listing 2.38, although you may want to bookmark this section and revisit it once you’ve read chapter 3.

// Instantiate: anywhere
public class AccessTest {
// Class and script only
var sDefault:String;
// Class, script and package
package var sPackage:String;
// Class, script, package, and any subclass
protected var sProtected:String;
// Everywhere
public var sPublic:String;

// Write: class and script only / Read: anywhere
public-read var sPublicReadDefault:String;
// Write: class, script and package / Read: anywhere
public-read package var sPublicReadPackage:String;
// Write: class, script, package and subclass – plus anywhere
// when creating object literals / Read: anywhere
public-init protected var sPublicInitProtected:String;
}