Class VariableType

java.lang.Object
net.mcreator.workspace.elements.VariableType

public class VariableType extends Object
  • Constructor Details

    • VariableType

      public VariableType()
  • Method Details

    • setName

      public void setName(String name)
    • getName

      public String getName()
    • getColor

      public String getColor()
    • getBlocklyColor

      public Color getBlocklyColor()
      Returns the color of the blocks associated with this variable type. If the field is a valid hex color code, it's returned as-is. If it's a valid integer, it's treated as a hue to get the color with the correct saturation and value.
      Returns:
      The color of the associated blocks, or black if it's badly formatted.
    • isIgnoredByCoverage

      public boolean isIgnoredByCoverage()
    • isNullable

      public boolean isNullable()
    • getBlocklyVariableType

      public String getBlocklyVariableType()
    • getJavaType

      public String getJavaType(Workspace workspace)
    • getDefaultValue

      public String getDefaultValue(Workspace Workspace)
    • getScopeDefinition

      public Map<?,?> getScopeDefinition(Workspace workspace, String scope)
    • canBeGlobal

      public boolean canBeGlobal(GeneratorConfiguration generatorConfiguration)
    • canBeLocal

      public boolean canBeLocal(GeneratorConfiguration generatorConfiguration)
    • getSupportedScopesWithoutLocal

      public VariableType.Scope[] getSupportedScopesWithoutLocal(GeneratorConfiguration generatorConfiguration)
    • toString

      public String toString()
      Overrides:
      toString in class Object