Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2012 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;

Alternate constructor invocation statement AST node type. For JLS2:
 ConstructorInvocation:
  this ( [ Expression { , Expression } ] ) ;
 
For JLS3, type arguments are added:
 ConstructorInvocation:
      [ < Type { , Type } > ]
        this ( [ Expression { , Expression } ] ) ;
 

Since:
2.0
Noinstantiate:
This class is not intended to be instantiated by clients.
 
 public class ConstructorInvocation extends Statement {

The "typeArguments" structural property of this node type (element type: Type) (added in JLS3 API).

Since:
3.1
 
 		new ChildListPropertyDescriptor(ConstructorInvocation.class"typeArguments"Type.class); //$NON-NLS-1$
 
The "arguments" structural property of this node type (element type: Expression).

Since:
3.0
 
 		new ChildListPropertyDescriptor(ConstructorInvocation.class"arguments"Expression.class); //$NON-NLS-1$
 
A list of property descriptors (element type: StructuralPropertyDescriptor), or null if uninitialized.

Since:
3.0
 
 	private static final List PROPERTY_DESCRIPTORS_2_0;

A list of property descriptors (element type: StructuralPropertyDescriptor), or null if uninitialized.

Since:
3.1
 
 	private static final List PROPERTY_DESCRIPTORS_3_0;
 
 	static {
 		List properyList = new ArrayList(2);
 
 		properyList = new ArrayList(3);
 	}

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)
Since:
3.0
 
 	public static List propertyDescriptors(int apiLevel) {
 		if (apiLevel == .) {
 		} else {
 		}
 	}

The type arguments (element type: Type). Null in JLS2. Added in JLS3; defaults to an empty list (see constructor).

Since:
3.1
	private ASTNode.NodeList typeArguments = null;

The list of argument expressions (element type: Expression). Defaults to an empty list.
Creates a new AST node for an alternate constructor invocation statement owned by the given AST. By default, an empty list of arguments.

Parameters:
ast the AST that is to own this node
		super(ast);
		if (ast.apiLevel >= .) {
		}
	}
	/* (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 arguments();
		}
		if (property == ) {
			return typeArguments();
		}
		// allow default implementation to flag the error
		return super.internalGetChildListProperty(property);
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	final int getNodeType0() {
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	ASTNode clone0(AST target) {
		result.copyLeadingComment(this);
		if (this.. >= .) {
			result.typeArguments().addAll(ASTNode.copySubtrees(targettypeArguments()));
		}
		result.arguments().addAll(ASTNode.copySubtrees(targetarguments()));
		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) {
			if (this.. >= .) {
			}
			acceptChildren(visitorthis.);
		}
		visitor.endVisit(this);
	}

Returns the live ordered list of type arguments of this constructor invocation (added in JLS3 API).

Returns:
the live list of type arguments (element type: Type)
Throws:
java.lang.UnsupportedOperationException if this operation is used in a JLS2 AST
Since:
3.1
	public List typeArguments() {
		// more efficient than just calling unsupportedIn2() to check
		if (this. == null) {
		}
		return this.;
	}

Returns the live ordered list of argument expressions in this alternate constructor invocation statement.

Returns:
the live list of argument expressions (element type: Expression)
	public List arguments() {
		return this.;
	}

Resolves and returns the binding for the constructor invoked by this expression.

Note that bindings are generally unavailable unless requested when the AST is being built.

Returns:
the constructor binding, or null if the binding cannot be resolved
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	int memSize() {
		// treat Code as free
		return  + 2 * 4;
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	int treeSize() {
		return
			+ (this. == null ? 0 : this..listSize())
			+ (this. == null ? 0 : this..listSize());
	}
New to GrepCode? Check out our FAQ X