websIDE
  • webside
    • Overview
  • API
    • General
      • Dialect
      • Version
      • Colors
      • Logo
      • Stats
      • Themes
      • Icons
      • Save Image
    • Changes
      • Retrieve changes
      • Apply a change
    • Changesets
      • Convert chunks to JSON changes
      • Convert JSON changes to chunks
    • Code
      • Autocompletions
        • Retrieve autocompletions
      • Categories
        • Retrieve categories
        • Retrieve usual categories
      • Classes
        • Retrieve classes
        • Retrieve a class
        • Retrieve categories
        • Retrieve variables
        • Retrieve class variables
        • Retrieve instance variables
        • Retrieve selectors
        • Retrieve methods
        • Retrieve method
        • Retrieve method history
        • Retrieve subclasses
        • Retrieve superclasses
        • Retrieve used categories
      • Methods
        • Retrieve methods
      • Packages
        • Retrieve packages
        • Retrieve a package
        • Retrieve package classes
        • Retrieve package methods
      • Search
      • Selectors
        • Find selector in source code
      • Templates
        • Retrieve class template
        • Retrieve method template
    • Debuggers
      • Retrieve active debuggers
      • Create a debugger
      • Delete debugger
      • Retrieve debugger frames
      • Retrieve debugger frame
      • Retrieve frame bindings
      • Restart debugger
      • Resume debugger
      • Step into debugger
      • Step over debugger
      • Step through debugger
      • Terminate debugger
    • Evaluations
      • Retrieve evaluations
      • Evaluate an expression
      • Cancel evaluation
      • Retrieve evaluation
      • Pause evaluation
      • Resume evaluation
    • Extensions
      • Retrieve extensions
      • Changes extensions
      • Export extensions
      • Search extensions
    • Commands
      • Retrieve command definitions
      • Invoke commands
    • Objects
      • Retrieve pinned objects
      • Pin object
      • Retrieve pinned object
      • Retrieve pinned object slots
        • Custom views
      • Unpin an object
      • Unpin all objects
    • Processes
      • Retrieve active processes
    • Profilers
      • Retrieve active profilers
      • Create a new profiler
      • Delete a profiler
      • Retrieve a profiler
      • Retrieve profiler ranking results
      • Retrieve profiler tree results
    • Testing
      • Run tests
      • Retrieve test run status
      • Retrieve test run results
    • Workspaces
      • Retrieve active workspaces
      • Create a new workspace
      • Delete a workspace
      • Retrieve a workspace
      • Update a workspace
      • Retrieve workspace bindings
Powered by GitBook
On this page
  1. API
  2. Code
  3. Classes

Retrieve classes

Retrieve all subclasses of a given root class (if no root is provided, the uppermost class in the system is used). It is also possible get a tree-like structure as well as to limit the depth in the classes hierarchy.

URL: /classes

Method: GET

Query Options

Option
Type
Description

root

string

the name of the root class

names

boolean

true to get only class names

tree

boolean

true to get a tree-like structure

depth

number

to limit the hierarchy depth (only when tree=true)

category

strign

to get classes under a given category

Success Responses

Code : 200 OK

Content: [class] where class is defined as:

{
	"name": "string",
	"definition": "string",
	"superclass": "string",
	"comment": "string",
	"category": "string",
	"variable": "boolean",
	"package": "string"
}

Example 1:: Integer subclasses GET /classes?root=Integer.

[
	{
		"name": "LargeInteger",
		"definition": "Integer variableByteSubclass: #LargeInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
		"superclass": "Integer",
		"comment": "I represent integers of more than 30 bits.  These values are beyond the range of SmallInteger, and are encoded here as an array of 8-bit digits. ",
		"category": "Numbers",
		"variable": true,
		"package": "Kernel"
	},
	{
		"name": "SmallInteger",
		"definition": "Integer immediateSubclass: #SmallInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
		"superclass": "Integer",
		"comment": "My instances are 31-bit numbers or 63-bit numbers depending on the image architecture, stored in twos complement form. The allowable range is approximately +- 1 billion (31 bits), 1 quintillion (63 bits)  (see SmallInteger minVal, maxVal).\r\rHandy guide to the kinds of Integer division:\r- /  exact division, returns a fraction if result is not a whole integer.\r- //  returns an Integer, rounded towards negative infinity.\r- \\\\ is modulo rounded towards negative infinity.\r- quo:  truncated division, rounded towards zero.",
		"category": "Numbers",
		"variable": false,
		"package": "Kernel"
	},
	{
		"name": "LargeNegativeInteger",
		"definition": "LargeInteger variableByteSubclass: #LargeNegativeInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
		"superclass": "LargeInteger",
		"comment": "Just like LargePositiveInteger, but represents a negative number.",
		"category": "Numbers",
		"variable": true,
		"package": "Kernel"
	},
	{
		"name": "LargePositiveInteger",
		"definition": "LargeInteger variableByteSubclass: #LargePositiveInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
		"superclass": "LargeInteger",
		"comment": "I represent positive integers of more than 30 bits (ie, >= 1073741824).  These values are beyond the range of SmallInteger, and are encoded here as an array of 8-bit digits.  Care must be taken, when new values are computed, that any result that COULD BE a SmallInteger IS a SmallInteger (see normalize).\r\rNote that the bit manipulation primitives, bitAnd:, bitShift:, etc., = and ~= run without failure (and therefore fast) if the value fits in 32 bits.  This is a great help to the simulator.",
		"category": "Numbers",
		"variable": true,
		"package": "Kernel"
	},
	{
		"name": "Integer",
		"definition": "Number subclass: #Integer\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
		"superclass": "Number",
		"comment": "I am a common abstract superclass for all Integer implementations. My implementation subclasses are SmallInteger, LargePositiveInteger, and LargeNegativeInteger.\r\t\rInteger division consists of:\r\t/\texact division, answers a fraction if result is not a whole integer\r\t//\tanswers an Integer, rounded towards negative infinity\r\t\\\\\tis modulo rounded towards negative infinity\r\tquo: truncated division, rounded towards zero",
		"category": "Numbers",
		"variable": false,
		"package": "Kernel"
	}
]

Example 2:: Integer hierarchy in the form of tree GET /classes?root=Integer&tree=true.

[
	{
		"name": "Integer",
		"definition": "Number subclass: #Integer\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
		"superclass": "Number",
		"comment": "I am a common abstract superclass for all Integer implementations. My implementation subclasses are SmallInteger, LargePositiveInteger, and LargeNegativeInteger.\r\t\rInteger division consists of:\r\t/\texact division, answers a fraction if result is not a whole integer\r\t//\tanswers an Integer, rounded towards negative infinity\r\t\\\\\tis modulo rounded towards negative infinity\r\tquo: truncated division, rounded towards zero",
		"category": "Numbers",
		"variable": false,
		"package": "Kernel",
		"subclasses": [
			{
				"name": "LargeInteger",
				"definition": "Integer variableByteSubclass: #LargeInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
				"superclass": "Integer",
				"comment": "I represent integers of more than 30 bits.  These values are beyond the range of SmallInteger, and are encoded here as an array of 8-bit digits. ",
				"category": "Numbers",
				"variable": true,
				"package": "Kernel",
				"subclasses": [
					{
						"name": "LargeNegativeInteger",
						"definition": "LargeInteger variableByteSubclass: #LargeNegativeInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
						"superclass": "LargeInteger",
						"comment": "Just like LargePositiveInteger, but represents a negative number.",
						"category": "Numbers",
						"variable": true,
						"package": "Kernel",
						"subclasses": []
					},
					{
						"name": "LargePositiveInteger",
						"definition": "LargeInteger variableByteSubclass: #LargePositiveInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
						"superclass": "LargeInteger",
						"comment": "I represent positive integers of more than 30 bits (ie, >= 1073741824).  These values are beyond the range of SmallInteger, and are encoded here as an array of 8-bit digits.  Care must be taken, when new values are computed, that any result that COULD BE a SmallInteger IS a SmallInteger (see normalize).\r\rNote that the bit manipulation primitives, bitAnd:, bitShift:, etc., = and ~= run without failure (and therefore fast) if the value fits in 32 bits.  This is a great help to the simulator.",
						"category": "Numbers",
						"variable": true,
						"package": "Kernel",
						"subclasses": []
					}
				]
			},
			{
				"name": "SmallInteger",
				"definition": "Integer immediateSubclass: #SmallInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'",
				"superclass": "Integer",
				"comment": "My instances are 31-bit numbers or 63-bit numbers depending on the image architecture, stored in twos complement form. The allowable range is approximately +- 1 billion (31 bits), 1 quintillion (63 bits)  (see SmallInteger minVal, maxVal).\r\rHandy guide to the kinds of Integer division:\r- /  exact division, returns a fraction if result is not a whole integer.\r- //  returns an Integer, rounded towards negative infinity.\r- \\\\ is modulo rounded towards negative infinity.\r- quo:  truncated division, rounded towards zero.",
				"category": "Numbers",
				"variable": false,
				"package": "Kernel",
				"subclasses": []
			}
		]
	}
]
PreviousClassesNextRetrieve a class

Last updated 12 months ago