Using Properties Defined in Declarations as Variables
For each node under Declarations that corresponds to a data type (String, Boolean, and so on), corresponding variables are available for use in the Java code. With some exceptions, they behave like ordinary Java variables. As an example, suppose that there is a declaration of the string property myprop in a node under Declarations. The following code assigns it a value (for this example, it is method16):
package builder;
 
import com.comsol.api.*;
import com.comsol.model.*;
 
public class method16 extends ApplicationMethod {
 
  public void execute() {
    myprop = "bar";
  }
 
}