Class SleighLanguageValidator
- java.lang.Object
-
- ghidra.app.plugin.processors.sleigh.SleighLanguageValidator
-
public class SleighLanguageValidator extends java.lang.ObjectValidate SLEIGH related XML configuration files: .cspec .pspec and .ldefs A ResourceFile containing an XML document can be verified with one of the static methods: - validateCspecFile - validateLdefsFile - validatePspecFile Alternately the class can be instantiated, which will allocate a single verifier that can be run on multiple files.
-
-
Field Summary
Fields Change Modifier and Type Field Description NEW static intCSPEC_TYPENEW static intCSPECTAG_TYPENEW static intLDEFS_TYPENEW static intPSPEC_TYPE
-
Constructor Summary
Constructors Change Constructor Description SleighLanguageValidator(int type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Change Modifier and Type Method Description static voidvalidateCspecFile(ResourceFile cspecFile)static voidvalidateLdefsFile(ResourceFile ldefsFile)static voidvalidatePspecFile(ResourceFile pspecFile)NEW voidverify(ResourceFile specFile)Verify the given file against this validator.NEW voidverify(java.lang.String title, java.lang.String document)Verify an XML document as a string against this validator.
-
-
-
Field Detail
-
CSPEC_TYPE NEW
public static final int CSPEC_TYPE
- See Also:
- Constant Field Values
-
PSPEC_TYPE NEW
public static final int PSPEC_TYPE
- See Also:
- Constant Field Values
-
LDEFS_TYPE NEW
public static final int LDEFS_TYPE
- See Also:
- Constant Field Values
Constructor Detail
-
SleighLanguageValidator
public SleighLanguageValidator(int type)
-
-
Method Detail
-
verify NEW
public void verify(ResourceFile specFile) throws SleighException
Verify the given file against this validator.- Parameters:
specFile- is the file- Throws:
SleighException- with an explanation if the file does not validate
-
verify NEW
public void verify(java.lang.String title, java.lang.String document) throws SleighExceptionVerify an XML document as a string against this validator. Currently this only supports verifierType == CSPECTAG_TYPE.- Parameters:
title- is a description of the documentdocument- is the XML document body- Throws:
SleighException- with an explanation if the document does not validate
-
validateLdefsFile
public static void validateLdefsFile(ResourceFile ldefsFile) throws SleighException
- Throws:
SleighException
-
validatePspecFile
public static void validatePspecFile(ResourceFile pspecFile) throws SleighException
- Throws:
SleighException
-
validateCspecFile
public static void validateCspecFile(ResourceFile cspecFile) throws SleighException
- Throws:
SleighException
-
-