Top Description Methods
com.github.javaparser.resolution.declarations

public Interface ResolvedDeclaration

Known Direct Subinterfaces
com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedValueDeclaration

A generic declaration.
Author
Federico Tomassetti

Method Summary

Modifier and TypeMethod and Description
public default ResolvedEnumConstantDeclaration
public default ResolvedFieldDeclaration
asField()

Return this as a FieldDeclaration or throw an UnsupportedOperationException

public default ResolvedMethodDeclaration
asMethod()

Return this as a MethodDeclaration or throw an UnsupportedOperationException

public default ResolvedParameterDeclaration
asParameter()

Return this as a ParameterDeclaration or throw an UnsupportedOperationException

public default ResolvedTypeDeclaration
asType()

Return this as a TypeDeclaration or throw an UnsupportedOperationException

public String
getName()

Should return the name or return null if the name is not available.

public default boolean
hasName()

Anonymous classes do not have a name, for example.

public default boolean
public default boolean
isField()

Does this declaration represents a class field?

public default boolean
isMethod()

Does this declaration represents a method?

public default boolean
isParameter()

Does this declaration represents a method parameter?

public default boolean
isType()

Does this declaration represents a type?

public default boolean
isVariable()

Does this declaration represents a variable?

Method Detail

asEnumConstantback to summary
public default ResolvedEnumConstantDeclaration asEnumConstant()
asFieldback to summary
public default ResolvedFieldDeclaration asField()

Return this as a FieldDeclaration or throw an UnsupportedOperationException

asMethodback to summary
public default ResolvedMethodDeclaration asMethod()

Return this as a MethodDeclaration or throw an UnsupportedOperationException

asParameterback to summary
public default ResolvedParameterDeclaration asParameter()

Return this as a ParameterDeclaration or throw an UnsupportedOperationException

asTypeback to summary
public default ResolvedTypeDeclaration asType()

Return this as a TypeDeclaration or throw an UnsupportedOperationException

getNameback to summary
public String getName()

Should return the name or return null if the name is not available.

hasNameback to summary
public default boolean hasName()

Anonymous classes do not have a name, for example.

isEnumConstantback to summary
public default boolean isEnumConstant()
isFieldback to summary
public default boolean isField()

Does this declaration represents a class field?

isMethodback to summary
public default boolean isMethod()

Does this declaration represents a method?

isParameterback to summary
public default boolean isParameter()

Does this declaration represents a method parameter?

isTypeback to summary
public default boolean isType()

Does this declaration represents a type?

isVariableback to summary
public default boolean isVariable()

Does this declaration represents a variable?