Java Code Examples for org.yaml.snakeyaml.TypeDescription#getTag()
The following examples show how to use
org.yaml.snakeyaml.TypeDescription#getTag() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Representer.java From onedev with MIT License | 5 votes |
public TypeDescription addTypeDescription(TypeDescription td) { if (Collections.EMPTY_MAP == typeDefinitions) { typeDefinitions = new HashMap<Class<? extends Object>, TypeDescription>(); } if (td.getTag() != null) { addClassTag(td.getType(), td.getTag()); } td.setPropertyUtils(getPropertyUtils()); return typeDefinitions.put(td.getType(), td); }
Example 2
Source File: BaseConstructor.java From onedev with MIT License | 5 votes |
/** * Make YAML aware how to parse a custom Class. If there is no root Class * assigned in constructor then the 'root' property of this definition is * respected. * * @param definition to be added to the Constructor * @return the previous value associated with <tt>definition</tt>, or * <tt>null</tt> if there was no mapping for <tt>definition</tt>. */ public TypeDescription addTypeDescription(TypeDescription definition) { if (definition == null) { throw new NullPointerException("TypeDescription is required."); } Tag tag = definition.getTag(); typeTags.put(tag, definition.getType()); definition.setPropertyUtils(getPropertyUtils()); return typeDefinitions.put(definition.getType(), definition); }
Example 3
Source File: Constructor.java From orion.server with Eclipse Public License 1.0 | 3 votes |
/** * Make YAML aware how to parse a custom Class. If there is no root Class * assigned in constructor then the 'root' property of this definition is * respected. * * @param definition * to be added to the Constructor * @return the previous value associated with <tt>definition</tt>, or * <tt>null</tt> if there was no mapping for <tt>definition</tt>. */ public TypeDescription addTypeDescription(TypeDescription definition) { if (definition == null) { throw new NullPointerException("TypeDescription is required."); } Tag tag = definition.getTag(); typeTags.put(tag, definition.getType()); return typeDefinitions.put(definition.getType(), definition); }
Example 4
Source File: Constructor.java From snake-yaml with Apache License 2.0 | 3 votes |
/** * Make YAML aware how to parse a custom Class. If there is no root Class * assigned in constructor then the 'root' property of this definition is * respected. * * @param definition * to be added to the Constructor * @return the previous value associated with <tt>definition</tt>, or * <tt>null</tt> if there was no mapping for <tt>definition</tt>. */ public TypeDescription addTypeDescription(TypeDescription definition) { if (definition == null) { throw new NullPointerException("TypeDescription is required."); } Tag tag = definition.getTag(); typeTags.put(tag, definition.getType()); return typeDefinitions.put(definition.getType(), definition); }