Validator.java 967 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package jme3tools.shadercheck;
  2. import com.jme3.shader.Shader;
  3. /**
  4. * Interface for shader validator tools.
  5. */
  6. public interface Validator {
  7. /**
  8. * Returns the name of the validation tool
  9. */
  10. public String getName();
  11. /**
  12. * Returns true if the tool is installed on the system, false otherwise.
  13. */
  14. public boolean isInstalled();
  15. /**
  16. * Returns the tool version as a string, must return null if the tool
  17. * is not installed.
  18. */
  19. public String getInstalledVersion();
  20. /**
  21. * Validates the given shader to make sure it follows all requirements
  22. * of the shader language specified as {@link Shader#getLanguage() }.
  23. * The results of the validation will be written into the
  24. * results argument.
  25. *
  26. * @param shader The shader to validate
  27. * @param results The storage for the validation results
  28. */
  29. public void validate(Shader shader, StringBuilder results);
  30. }