Physics Builder Tools > Building Blocks > Code Editor

Code Editor
The Code Editor node () provides the possibility to enter coded methods in Java to perform tasks that you cannot accomplish with the nodes in the Physics Builder tree. A Code Editor node works like a Component node, so you include it through a Component Link node. Use of the code editor requires knowledge of the Java programming language and the COMSOL Java API. Note that adding Java code usually makes it much harder to find and solve problems with your physics interface, so only use it when necessary.
The following Java interfaces are supported by the Code Editor node:
VariableDefinitionProvider. Defines expressions and selections for a set of declared variables.
UserInputProvider. Defines dynamic allowed values and default values for lists.