Package org.codehaus.groovy.util

Examples of org.codehaus.groovy.util.ListHashMap


    protected void restoreVariableExpressionMetadata(final Map<VariableExpression, ListHashMap> typesBeforeVisit) {
        if (typesBeforeVisit != null) {
            for (Map.Entry<VariableExpression, ListHashMap> entry : typesBeforeVisit.entrySet()) {
                VariableExpression ve = entry.getKey();
                ListHashMap metadata = entry.getValue();
                for (StaticTypesMarker marker : StaticTypesMarker.values()) {
                    ve.removeNodeMetaData(marker);
                    Object value = metadata.get(marker);
                    if (value != null) ve.setNodeMetaData(marker, value);
                }
            }
        }
    }
View Full Code Here


    public void copyNodeMetaData(ASTNode other) {
        if (other.metaDataMap == null) {
            return;
        }
        if (metaDataMap == null) {
            metaDataMap = new ListHashMap();
        }
        metaDataMap.putAll(other.metaDataMap);
    }
View Full Code Here

     *                        data under that key
     */
    public void setNodeMetaData(Object key, Object value) {
        if (key==null) throw new GroovyBugError("Tried to set meta data with null key on "+this+".");
        if (metaDataMap == null) {
            metaDataMap = new ListHashMap();
        }
        Object old = metaDataMap.put(key,value);
        if (old!=null) throw new GroovyBugError("Tried to overwrite existing meta data "+this+".");
    }
View Full Code Here

     * @throws GroovyBugError if key is null
     */
    public Object putNodeMetaData(Object key, Object value) {
        if (key == null) throw new GroovyBugError("Tried to set meta data with null key on " + this + ".");
        if (metaDataMap == null) {
            metaDataMap = new ListHashMap();
        }
        return metaDataMap.put(key, value);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.util.ListHashMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.