当前位置: 首页>>代码示例>>Java>>正文


Java ClassInstanceCreation.ARGUMENTS_PROPERTY属性代码示例

本文整理汇总了Java中org.eclipse.jdt.core.dom.ClassInstanceCreation.ARGUMENTS_PROPERTY属性的典型用法代码示例。如果您正苦于以下问题:Java ClassInstanceCreation.ARGUMENTS_PROPERTY属性的具体用法?Java ClassInstanceCreation.ARGUMENTS_PROPERTY怎么用?Java ClassInstanceCreation.ARGUMENTS_PROPERTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.jdt.core.dom.ClassInstanceCreation的用法示例。


在下文中一共展示了ClassInstanceCreation.ARGUMENTS_PROPERTY属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getArgumentsProperty

public static ChildListPropertyDescriptor getArgumentsProperty(ASTNode invocation) {
  switch (invocation.getNodeType()) {
    case ASTNode.METHOD_INVOCATION:
      return MethodInvocation.ARGUMENTS_PROPERTY;
    case ASTNode.SUPER_METHOD_INVOCATION:
      return SuperMethodInvocation.ARGUMENTS_PROPERTY;

    case ASTNode.CONSTRUCTOR_INVOCATION:
      return ConstructorInvocation.ARGUMENTS_PROPERTY;
    case ASTNode.SUPER_CONSTRUCTOR_INVOCATION:
      return SuperConstructorInvocation.ARGUMENTS_PROPERTY;

    case ASTNode.CLASS_INSTANCE_CREATION:
      return ClassInstanceCreation.ARGUMENTS_PROPERTY;
    case ASTNode.ENUM_CONSTANT_DECLARATION:
      return EnumConstantDeclaration.ARGUMENTS_PROPERTY;

    default:
      throw new IllegalArgumentException(invocation.toString());
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:Invocations.java

示例2: getArgumentsProperty

public static ChildListPropertyDescriptor getArgumentsProperty(ASTNode invocation) {
	switch (invocation.getNodeType()) {
		case ASTNode.METHOD_INVOCATION:
			return MethodInvocation.ARGUMENTS_PROPERTY;
		case ASTNode.SUPER_METHOD_INVOCATION:
			return SuperMethodInvocation.ARGUMENTS_PROPERTY;
			
		case ASTNode.CONSTRUCTOR_INVOCATION:
			return ConstructorInvocation.ARGUMENTS_PROPERTY;
		case ASTNode.SUPER_CONSTRUCTOR_INVOCATION:
			return SuperConstructorInvocation.ARGUMENTS_PROPERTY;
			
		case ASTNode.CLASS_INSTANCE_CREATION:
			return ClassInstanceCreation.ARGUMENTS_PROPERTY;
		case ASTNode.ENUM_CONSTANT_DECLARATION:
			return EnumConstantDeclaration.ARGUMENTS_PROPERTY;
			
		default:
			throw new IllegalArgumentException(invocation.toString());
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:Invocations.java

示例3: getBooleanExpression

private static Expression getBooleanExpression(ASTNode node) {
	if (!(node instanceof Expression)) {
		return null;
	}

	// check if the node is a location where it can be negated
	StructuralPropertyDescriptor locationInParent= node.getLocationInParent();
	if (locationInParent == QualifiedName.NAME_PROPERTY) {
		node= node.getParent();
		locationInParent= node.getLocationInParent();
	}
	while (locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY) {
		node= node.getParent();
		locationInParent= node.getLocationInParent();
	}
	Expression expression= (Expression) node;
	if (!isBoolean(expression)) {
		return null;
	}
	if (expression.getParent() instanceof InfixExpression) {
		return expression;
	}
	if (locationInParent == Assignment.RIGHT_HAND_SIDE_PROPERTY || locationInParent == IfStatement.EXPRESSION_PROPERTY
			|| locationInParent == WhileStatement.EXPRESSION_PROPERTY || locationInParent == DoStatement.EXPRESSION_PROPERTY
			|| locationInParent == ReturnStatement.EXPRESSION_PROPERTY || locationInParent == ForStatement.EXPRESSION_PROPERTY
			|| locationInParent == AssertStatement.EXPRESSION_PROPERTY || locationInParent == MethodInvocation.ARGUMENTS_PROPERTY
			|| locationInParent == ConstructorInvocation.ARGUMENTS_PROPERTY || locationInParent == SuperMethodInvocation.ARGUMENTS_PROPERTY
			|| locationInParent == EnumConstantDeclaration.ARGUMENTS_PROPERTY || locationInParent == SuperConstructorInvocation.ARGUMENTS_PROPERTY
			|| locationInParent == ClassInstanceCreation.ARGUMENTS_PROPERTY || locationInParent == ConditionalExpression.EXPRESSION_PROPERTY
			|| locationInParent == PrefixExpression.OPERAND_PROPERTY) {
		return expression;
	}
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:34,代码来源:AdvancedQuickAssistProcessor.java


注:本文中的org.eclipse.jdt.core.dom.ClassInstanceCreation.ARGUMENTS_PROPERTY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。