Class ReflectionFieldDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionFieldDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedDeclaration
,ResolvedFieldDeclaration
,ResolvedValueDeclaration
public class ReflectionFieldDeclaration extends java.lang.Object implements ResolvedFieldDeclaration
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Field
field
private ResolvedType
type
private TypeSolver
typeSolver
-
Constructor Summary
Constructors Modifier Constructor Description ReflectionFieldDeclaration(java.lang.reflect.Field field, TypeSolver typeSolver)
private
ReflectionFieldDeclaration(java.lang.reflect.Field field, TypeSolver typeSolver, ResolvedType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessSpecifier
accessSpecifier()
The access specifier of this element.private ResolvedType
calcType()
ResolvedTypeDeclaration
declaringType()
The type on which this field has been declaredjava.lang.String
getName()
Should return the name or return null if the name is not available.ResolvedType
getType()
Type of the declaration.boolean
isField()
Does this declaration represents a class field?boolean
isParameter()
Does this declaration represents a method parameter?boolean
isStatic()
Is the field static?boolean
isType()
Does this declaration represents a type?boolean
isVolatile()
Is the field volatile?ResolvedFieldDeclaration
replaceType(ResolvedType fieldType)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAst, toAst
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asMethod, asParameter, asType, asTypePattern, hasName, isEnumConstant, isMethod, isTypePattern, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
asField
-
-
-
-
Field Detail
-
field
private java.lang.reflect.Field field
-
typeSolver
private TypeSolver typeSolver
-
type
private ResolvedType type
-
-
Constructor Detail
-
ReflectionFieldDeclaration
public ReflectionFieldDeclaration(java.lang.reflect.Field field, TypeSolver typeSolver)
-
ReflectionFieldDeclaration
private ReflectionFieldDeclaration(java.lang.reflect.Field field, TypeSolver typeSolver, ResolvedType type)
-
-
Method Detail
-
getType
public ResolvedType getType()
Description copied from interface:ResolvedValueDeclaration
Type of the declaration.- Specified by:
getType
in interfaceResolvedValueDeclaration
-
calcType
private ResolvedType calcType()
-
getName
public java.lang.String getName()
Description copied from interface:ResolvedDeclaration
Should return the name or return null if the name is not available.- Specified by:
getName
in interfaceResolvedDeclaration
-
isStatic
public boolean isStatic()
Description copied from interface:ResolvedFieldDeclaration
Is the field static?- Specified by:
isStatic
in interfaceResolvedFieldDeclaration
-
isVolatile
public boolean isVolatile()
Description copied from interface:ResolvedFieldDeclaration
Is the field volatile?- Specified by:
isVolatile
in interfaceResolvedFieldDeclaration
-
isField
public boolean isField()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a class field?- Specified by:
isField
in interfaceResolvedDeclaration
- Specified by:
isField
in interfaceResolvedFieldDeclaration
-
declaringType
public ResolvedTypeDeclaration declaringType()
Description copied from interface:ResolvedFieldDeclaration
The type on which this field has been declared- Specified by:
declaringType
in interfaceResolvedFieldDeclaration
-
replaceType
public ResolvedFieldDeclaration replaceType(ResolvedType fieldType)
-
isParameter
public boolean isParameter()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a method parameter?- Specified by:
isParameter
in interfaceResolvedDeclaration
-
isType
public boolean isType()
Description copied from interface:ResolvedDeclaration
Does this declaration represents a type?- Specified by:
isType
in interfaceResolvedDeclaration
-
accessSpecifier
public AccessSpecifier accessSpecifier()
Description copied from interface:HasAccessSpecifier
The access specifier of this element.- Specified by:
accessSpecifier
in interfaceHasAccessSpecifier
-
-