All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gxp.compiler.reparent..svn.text-base.Parts.svn-base Maven / Gradle / Ivy

Go to download

Google XML Pages (GXP) is a templating system used to generate XML/SGML markup (most often HTML).

The newest version!
/*
 * Copyright (C) 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.gxp.compiler.reparent;

import com.google.gxp.compiler.base.Conditional;
import com.google.gxp.compiler.base.Constructor;
import com.google.gxp.compiler.base.Expression;
import com.google.gxp.compiler.base.Parameter;
import com.google.gxp.compiler.base.FormalTypeParameter;
import com.google.gxp.compiler.base.ImplementsDeclaration;
import com.google.gxp.compiler.base.Import;
import com.google.gxp.compiler.base.JavaAnnotation;
import com.google.gxp.compiler.base.Root;
import com.google.gxp.compiler.base.ThrowsDeclaration;

import java.util.*;

/**
 * A categorization of the different "parts" that can go into a ReparentedNode.
 * In the reparenting phase we collect the ParsedAttributes and children
 * (ParsedNodes) of each ParsedNode, convert them into "higher level" node
 * types, and then categorize the resulting nodes into a nuber of buckets.
 *
 * 

This interface has one getter method for each category's bucket, in * addition to the reportUnused method which should be called once the client * has finished retrieving the parts it cares about. * *

A Parts object is intended to be used in several phases: *

    *
  • The client calls the getters to get the parts it cares about. *
  • {@code reportUnused} is called to report anything that was supplied but * not used. *
*/ interface Parts { /** * @return the Roots for the new node. */ List getRoots(); /** * @return the Constructors for the new node. */ List getConstructors(); /** * @return the content for the new node. */ Expression getContent(); /** * @return the ImplementsDeclarations for the new node. */ List getImplementsDeclarations(); /** * @return the Imports for the new node. */ List getImports(); /** * @return the ThrowsDeclarartions for the new node. */ List getThrowsDeclarations(); /** * @return the Parameters for the new node. */ List getParameters(); /** * @return the FormalTypeParameters for the new node. */ List getFormalTypeParameters(); /** * @return the clauses for the new node */ List getClauses(); /** * @return the java annotations for the new node */ List getJavaAnnotations(); /** * @return the attributes for the new node as an AttributeMap. Note that the * client does not need to call reportUnusedAttributes on the resulting * AttributeMap as reportUnused will invoke it automatically. */ AttributeMap getAttributes(); /** * Reports any parts that we didn't actually use. This method should be * called after all of the desired parts have been retrieved. */ void reportUnused(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy