Package org.yaml.snakeyaml.nodes
Class Tag
- java.lang.Object
-
- org.yaml.snakeyaml.nodes.Tag
-
public final class Tag extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static TagBINARYstatic TagBOOLstatic TagCOMMENTstatic TagFLOATstatic TagINTstatic TagMAPstatic TagMERGEstatic TagNULLstatic TagOMAPstatic TagPAIRSstatic StringPREFIXstatic TagSEQstatic TagSETstatic Set<Tag>standardTagsstatic TagSTRstatic TagTIMESTAMPstatic TagYAML
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetClassName()StringgetValue()inthashCode()booleanisCompatible(Class<?> clazz)Java has more than 1 class compatible with a language-independent tag (!!int, !!float, !!timestamp etc)booleanisCustomGlobal()Check if the that is global and not standard to provide it to TagInspector for verification.booleanisSecondary()booleanmatches(Class<? extends Object> clazz)Check whether this tag matches the global tag for the ClassbooleanstartsWith(String prefix)StringtoString()
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
YAML
public static final Tag YAML
-
MERGE
public static final Tag MERGE
-
SET
public static final Tag SET
-
PAIRS
public static final Tag PAIRS
-
OMAP
public static final Tag OMAP
-
BINARY
public static final Tag BINARY
-
INT
public static final Tag INT
-
FLOAT
public static final Tag FLOAT
-
TIMESTAMP
public static final Tag TIMESTAMP
-
BOOL
public static final Tag BOOL
-
NULL
public static final Tag NULL
-
STR
public static final Tag STR
-
SEQ
public static final Tag SEQ
-
MAP
public static final Tag MAP
-
COMMENT
public static final Tag COMMENT
-
-
Method Detail
-
isSecondary
public boolean isSecondary()
-
getValue
public String getValue()
-
startsWith
public boolean startsWith(String prefix)
-
getClassName
public String getClassName()
-
isCompatible
public boolean isCompatible(Class<?> clazz)
Java has more than 1 class compatible with a language-independent tag (!!int, !!float, !!timestamp etc)- Parameters:
clazz- - Class to check compatibility- Returns:
- true when the Class can be represented by this language-independent tag
-
matches
public boolean matches(Class<? extends Object> clazz)
Check whether this tag matches the global tag for the Class- Parameters:
clazz- - Class to check- Returns:
- true when this tag can be used as a global tag for the Class during serialisation
-
isCustomGlobal
public boolean isCustomGlobal()
Check if the that is global and not standard to provide it to TagInspector for verification.- Returns:
- true when the tag must be verified to avoid remote code invocation
-
-