本文整理汇总了Java中com.github.javaparser.ast.TypeParameter.accept方法的典型用法代码示例。如果您正苦于以下问题:Java TypeParameter.accept方法的具体用法?Java TypeParameter.accept怎么用?Java TypeParameter.accept使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.javaparser.ast.TypeParameter
的用法示例。
在下文中一共展示了TypeParameter.accept方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printTypeParameters
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
public void printTypeParameters(final List<TypeParameter> args, final Object arg) {
if (!isNullOrEmpty(args)) {
printer.print("<");
for (final Iterator<TypeParameter> i = args.iterator(); i.hasNext(); ) {
final TypeParameter t = i.next();
t.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
}
示例2: visit
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
@Override
public void visit(MethodReferenceExpr n, Object arg) {
printer.printLn("MethodReferenceExpr");
printJavaComment(n.getComment(), arg);
Expression scope = n.getScope();
String identifier = n.getIdentifier();
if (scope != null) {
n.getScope().accept(this, arg);
}
printer.print("::");
if (n.getTypeParameters() != null) {
printer.print("<");
for (Iterator<TypeParameter> i = n.getTypeParameters().iterator(); i
.hasNext(); ) {
TypeParameter p = i.next();
p.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
if (identifier != null) {
printer.print(identifier);
}
}
示例3: printTypeParameters
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
private void printTypeParameters(final List<TypeParameter> args, final Object arg) {
if (!isNullOrEmpty(args)) {
printer.print("<");
for (final Iterator<TypeParameter> i = args.iterator(); i.hasNext();) {
final TypeParameter t = i.next();
t.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
}
示例4: visit
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
@Override
public void visit(MethodReferenceExpr n, Object arg) {
printJavaComment(n.getComment(), arg);
Expression scope = n.getScope();
String identifier = n.getIdentifier();
if (scope != null) {
n.getScope().accept(this, arg);
}
printer.print("::");
if (!n.getTypeParameters().isEmpty()) {
printer.print("<");
for (Iterator<TypeParameter> i = n.getTypeParameters().iterator(); i
.hasNext();) {
TypeParameter p = i.next();
p.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
if (identifier != null) {
printer.print(identifier);
}
}
示例5: visit
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
@Override public void visit(final ConstructorDeclaration n, final A arg) {
visitComment(n.getComment(), arg);
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (final AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getTypeParameters() != null) {
for (final TypeParameter t : n.getTypeParameters()) {
t.accept(this, arg);
}
}
if (n.getParameters() != null) {
for (final Parameter p : n.getParameters()) {
p.accept(this, arg);
}
}
if (n.getThrows() != null) {
for (final NameExpr name : n.getThrows()) {
name.accept(this, arg);
}
}
n.getBlock().accept(this, arg);
}
示例6: visit
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
@Override public void visit(final ConstructorDeclaration n, final A arg) {
jw.write(n);
visitComment(n.getComment(), arg);
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (final AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getTypeParameters() != null) {
for (final TypeParameter t : n.getTypeParameters()) {
t.accept(this, arg);
}
}
if (n.getParameters() != null) {
for (final Parameter p : n.getParameters()) {
p.accept(this, arg);
}
}
if (n.getThrows() != null) {
for (final NameExpr name : n.getThrows()) {
name.accept(this, arg);
}
}
n.getBlock().accept(this, arg);
}
示例7: printTypeParameters
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
private void printTypeParameters(final List<TypeParameter> args, final Object arg) {
if (!isNullOrEmpty(args)) {
printer.print("<");
for (final Iterator<TypeParameter> i = args.iterator(); i.hasNext();) {
final TypeParameter t = i.next();
t.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
}
示例8: visit
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
@Override
public void visit(MethodReferenceExpr n, Object arg) {
printJavaComment(n.getComment(), arg);
Expression scope = n.getScope();
String identifier = n.getIdentifier();
if (scope != null) {
n.getScope().accept(this, arg);
}
printer.print("::");
if (n.getTypeParameters() != null) {
printer.print("<");
for (Iterator<TypeParameter> i = n.getTypeParameters().iterator(); i
.hasNext();) {
TypeParameter p = i.next();
p.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
if (identifier != null) {
printer.print(identifier);
}
}
示例9: printTypeParameters
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
private void printTypeParameters(final List<TypeParameter> args, final Object arg) {
if (!isNullOrEmpty(args)) {
printer.print("<");
for (final Iterator<TypeParameter> i = args.iterator(); i.hasNext(); ) {
final TypeParameter t = i.next();
t.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
}
示例10: visit
import com.github.javaparser.ast.TypeParameter; //导入方法依赖的package包/类
@Override
public void visit(MethodReferenceExpr n, Object arg) {
printJavaComment(n.getComment(), arg);
Expression scope = n.getScope();
String identifier = n.getIdentifier();
if (scope != null) {
n.getScope().accept(this, arg);
}
printer.print("::");
if (!n.getTypeParameters().isEmpty()) {
printer.print("<");
for (Iterator<TypeParameter> i = n.getTypeParameters().iterator(); i
.hasNext(); ) {
TypeParameter p = i.next();
p.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
if (identifier != null) {
printer.print(identifier);
}
}