Class JavaParserFieldDeclaration

java.lang.Object
com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserFieldDeclaration
All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST, com.github.javaparser.resolution.declarations.HasAccessSpecifier, com.github.javaparser.resolution.declarations.ResolvedDeclaration, com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration, com.github.javaparser.resolution.declarations.ResolvedValueDeclaration

public class JavaParserFieldDeclaration extends Object implements com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
Author:
Federico Tomassetti
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavaParserFieldDeclaration(com.github.javaparser.ast.body.VariableDeclarator variableDeclarator, com.github.javaparser.resolution.TypeSolver typeSolver)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.github.javaparser.ast.AccessSpecifier
     
    com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
     
     
    com.github.javaparser.resolution.types.ResolvedType
     
    com.github.javaparser.ast.body.VariableDeclarator
     
    com.github.javaparser.ast.body.FieldDeclaration
    Returns the JavaParser node associated with this JavaParserFieldDeclaration.
    boolean
     
    boolean
     
    boolean
     
    Optional<com.github.javaparser.ast.Node>
     
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST

    toAst

    Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration

    asEnumConstant, asMethod, asParameter, asType, asTypePattern, hasName, isArrayLength, isEnumConstant, isMethod, isParameter, isType, isTypePattern, isVariable

    Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration

    asField
  • Constructor Details

    • JavaParserFieldDeclaration

      public JavaParserFieldDeclaration(com.github.javaparser.ast.body.VariableDeclarator variableDeclarator, com.github.javaparser.resolution.TypeSolver typeSolver)
  • Method Details

    • getType

      public com.github.javaparser.resolution.types.ResolvedType getType()
      Specified by:
      getType in interface com.github.javaparser.resolution.declarations.ResolvedValueDeclaration
    • getName

      public String getName()
      Specified by:
      getName in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
    • isStatic

      public boolean isStatic()
      Specified by:
      isStatic in interface com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
    • isVolatile

      public boolean isVolatile()
      Specified by:
      isVolatile in interface com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
    • isField

      public boolean isField()
      Specified by:
      isField in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
      Specified by:
      isField in interface com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
    • getWrappedNode

      public com.github.javaparser.ast.body.FieldDeclaration getWrappedNode()
      Returns the JavaParser node associated with this JavaParserFieldDeclaration.
      Returns:
      A visitable JavaParser node wrapped by this object.
    • getVariableDeclarator

      public com.github.javaparser.ast.body.VariableDeclarator getVariableDeclarator()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • accessSpecifier

      public com.github.javaparser.ast.AccessSpecifier accessSpecifier()
      Specified by:
      accessSpecifier in interface com.github.javaparser.resolution.declarations.HasAccessSpecifier
    • declaringType

      public com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration declaringType()
      Specified by:
      declaringType in interface com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
    • toAst

      public Optional<com.github.javaparser.ast.Node> toAst()
      Specified by:
      toAst in interface com.github.javaparser.resolution.declarations.AssociableToAST