本文整理汇总了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());
}
}
示例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());
}
}
示例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;
}