Template Classes
Named classes defined inline within scripts and templates without needing a separate file
class Person {
function getName() {
return "Brad";
}
}
result = new Person().getName();
// Result: "Brad"π Table of Contents
π₯ Defining Template Classes
π Instantiating
ποΈ Hoisting
π¦ Multiple Classes
π Properties and Constructors
Constructor with Arguments
π§ Static Members
Static Variables
Static Methods
π Inheritance
Extending Another Template Class
Multi-Level Inheritance
Using super()
super()π Final and Abstract
Final Classes
Abstract Classes
β Java Interoperability
Implementing a Java Interface
Extending a Java Class
Implementing Comparable
π₯ Imports
π Metadata
getMetadata() on Instance
getMetadata() on InstancegetClassMetadata() by Name
getClassMetadata() by Name$bx.meta
$bx.metaπΌοΈ Templates
Nested Classes in Templates
β οΈ Naming Restrictions
Duplicate Names
Import Conflicts
Cannot Define Inside a Function
Last updated
Was this helpful?
