/** * Returns the type of this formal parameter. That type * is exactly that of the variable declarator id, * which means that the declarator id's type takes into * account whether this parameter is varargs or not. */ @Override public Class<?> getType() { return getVariableDeclaratorId().getType(); }
private static boolean isStringBuilderOrBuffer(ASTVariableDeclaratorId node) { if (node.getType() != null) { return TypeHelper.isEither(node, StringBuffer.class, StringBuilder.class); } Node nn = node.getTypeNameNode(); if (nn == null || nn.jjtGetNumChildren() == 0) { return false; } return TypeHelper.isEither((TypeNode) nn.jjtGetChild(0), StringBuffer.class, StringBuilder.class); } }
private static boolean isStringBuilderOrBuffer(ASTVariableDeclaratorId node) { if (node.getType() != null) { return TypeHelper.isEither(node, StringBuffer.class, StringBuilder.class); } Node nn = node.getTypeNameNode(); if (nn == null || nn.jjtGetNumChildren() == 0) { return false; } return TypeHelper.isEither((TypeNode) nn.jjtGetChild(0), StringBuffer.class, StringBuilder.class); } }
@Override public Class<?> getType() { TypeNode typeNode = getTypeNode(); if (typeNode != null) { return typeNode.getType(); } // if there is no type node, then return the type of the declarator id. // this might be a inferred type return getDeclaratorId().getType(); }
/** * Returns the type of this formal parameter. That type * is exactly that of the variable declarator id, * which means that the declarator id's type takes into * account whether this parameter is varargs or not. */ @Override public Class<?> getType() { return getVariableDeclaratorId().getType(); }
@Override public Class<?> getType() { TypeNode typeNode = getTypeNode(); if (typeNode != null) { return typeNode.getType(); } // if there is no type node, then return the type of the declarator id. // this might be a inferred type return getDeclaratorId().getType(); }