示例#1
0
  public ClassTreeImpl(
      Kind kind, SyntaxToken openBraceToken, List<Tree> members, SyntaxToken closeBraceToken) {
    super(kind);

    this.kind = kind;
    this.openBraceToken = openBraceToken;
    this.members = members;
    this.closeBraceToken = closeBraceToken;
    this.modifiers = ModifiersTreeImpl.emptyModifiers();
    this.typeParameters = new TypeParameterListTreeImpl();
    this.superInterfaces = QualifiedIdentifierListTreeImpl.emptyList();
  }
示例#2
0
 public MethodTreeImpl(
     FormalParametersListTreeImpl parameters,
     @Nullable SyntaxToken defaultToken,
     @Nullable ExpressionTree defaultValue) {
   super(Kind.METHOD);
   this.typeParameters = new TypeParameterListTreeImpl();
   this.parameters = parameters;
   this.openParenToken = parameters.openParenToken();
   this.closeParenToken = parameters.closeParenToken();
   this.block = null;
   this.throwsToken = null;
   this.throwsClauses = QualifiedIdentifierListTreeImpl.emptyList();
   this.defaultToken = defaultToken;
   this.defaultValue = defaultValue;
 }
示例#3
0
 public ClassTreeImpl(
     ModifiersTree modifiers,
     SyntaxToken openBraceToken,
     List<Tree> members,
     SyntaxToken closeBraceToken) {
   super(Kind.ANNOTATION_TYPE);
   this.kind = Preconditions.checkNotNull(Kind.ANNOTATION_TYPE);
   this.modifiers = modifiers;
   this.typeParameters = new TypeParameterListTreeImpl();
   this.superClass = null;
   this.superInterfaces = QualifiedIdentifierListTreeImpl.emptyList();
   this.openBraceToken = openBraceToken;
   this.members = Preconditions.checkNotNull(members);
   this.closeBraceToken = closeBraceToken;
 }