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;

Super constructor invocation statement AST node type. For JLS2: *
 SuperConstructorInvocation:
     [ Expression . ] super
         ( [ Expression { , Expression } ] ) ;
 
For JLS3, type arguments are added:
 SuperConstructorInvocation:
     [ Expression . ]
         [ < Type { , Type } > ]
         super ( [ Expression { , Expression } ] ) ;
 

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

The "expression" structural property of this node type (child type: Expression).

Since:
3.0
 
 	public static final ChildPropertyDescriptor EXPRESSION_PROPERTY =
 		new ChildPropertyDescriptor(SuperConstructorInvocation.class"expression"Expression.class); //$NON-NLS-1$
 
The "typeArguments" structural property of this node type (element type: Type) (added in JLS3 API).

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

Since:
3.0
 
 		new ChildListPropertyDescriptor(SuperConstructorInvocation.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 propertyList = new ArrayList(3);
 		addProperty(propertyList);
 
 		propertyList = new ArrayList(4);
 		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)
Since:
3.0
 
	public static List propertyDescriptors(int apiLevel) {
		if (apiLevel == .) {
else {
		}
	}

The expression; null for none; defaults to none.
	private Expression optionalExpression = null;

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 super constructor invocation statement owned by the given AST. By default, no type arguments, and 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.
	 */
	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor propertyboolean getASTNode child) {
		if (property == ) {
			if (get) {
				return getExpression();
else {
				return null;
			}
		}
		// allow default implementation to flag the error
		return super.internalGetSetChildProperty(propertygetchild);
	}
	/* (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);
			(Expression) ASTNode.copySubtree(targetgetExpression()));
		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) {
			// visit children in normal left to right reading order
			if (this.. >= .) {
			}
			acceptChildren(visitorthis.);
		}
		visitor.endVisit(this);
	}

Returns the expression of this super constructor invocation statement, or null if there is none.

Returns:
the expression node, or null if there is none
		return this.;
	}

Sets or clears the expression of this super constructor invocation statement.

Parameters:
expression the expression node, or null if there is none
Throws:
java.lang.IllegalArgumentException if:
  • the node belongs to a different AST
  • the node already has a parent
  • a cycle in would be created
	public void setExpression(Expression expression) {
		ASTNode oldChild = this.;
		preReplaceChild(oldChildexpression);
		this. = expression;
		postReplaceChild(oldChildexpression);
	}

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 super 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  + 3 * 4;
	}
	/* (omit javadoc for this method)
	 * Method declared on ASTNode.
	 */
	int treeSize() {
		return memSize()
		+ (this. == null ? 0 : getExpression().treeSize())
		+ (this. == null ? 0 : this..listSize())
		+ (this. == null ? 0 : this..listSize());
	}
New to GrepCode? Check out our FAQ X