Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
 
 
 package org.eclipse.jdt.core.dom;
 
 import java.util.List;

Type node for an union type (added in JLS4 API).
 UnionType:
    Type | Type { | Type }
 

This kind of node is used inside a catch clause's formal parameter type.

Since:
3.7.1
Noinstantiate:
This class is not intended to be instantiated by clients.
 
 public class UnionType extends Type {

The "types" structural property of this node type (element type: Type).
 
 	public static final ChildListPropertyDescriptor TYPES_PROPERTY =
 		new ChildListPropertyDescriptor(UnionType.class"types"Type.class); //$NON-NLS-1$
 
A list of property descriptors (element type: StructuralPropertyDescriptor), or null if uninitialized.
 
 	private static final List PROPERTY_DESCRIPTORS;
 
 	static {
 		List propertyList = new ArrayList(2);
 		createPropertyList(UnionType.classpropertyList);
 		addProperty(propertyList);
 	}

Returns a list of structural property descriptors for this node type. Clients must not modify the result.

Parameters:
apiLevel the API level; one of the AST.JLS* constants
Returns:
a list of property descriptors (element type: StructuralPropertyDescriptor)
 
 	public static List propertyDescriptors(int apiLevel) {
 	}

The list of types (element type: Type). Defaults to an empty list.
 
Creates a new unparented node for an union type owned by the given AST. By default, it has no types.

N.B. This constructor is package-private.

Parameters:
ast the AST that is to own this node
 
 	UnionType(AST ast) {
 		super(ast);
 	}
 
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	final List internalStructuralPropertiesForType(int apiLevel) {
 		return propertyDescriptors(apiLevel);
 	}
 
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 		if (property == ) {
 			return types();
 		}
 		// allow default implementation to flag the error
 		return super.internalGetChildListProperty(property);
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	final int getNodeType0() {
		return ;
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	ASTNode clone0(AST target) {
		UnionType result = new UnionType(target);
		result.types().addAll(
				ASTNode.copySubtrees(targettypes()));
		return result;
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	final boolean subtreeMatch0(ASTMatcher matcherObject other) {
		// dispatch to correct overloaded match method
		return matcher.match(thisother);
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	void accept0(ASTVisitor visitor) {
		boolean visitChildren = visitor.visit(this);
		if (visitChildren) {
			// visit children in normal left to right reading order
			acceptChildren(visitorthis.);
		}
		visitor.endVisit(this);
	}

Returns the live ordered list of types in this union type. Adding and removing nodes from this list affects this node dynamically. All nodes in this list must be Types; attempts to add any other type of node will trigger an exception.

Returns:
the live list of types in this union type (element type: Type)
	public List types() {
		return this.;
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	int memSize() {
		return  + 1 * 4;
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	int treeSize() {
		return
this..listSize();
	}
New to GrepCode? Check out our FAQ X