Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.resolver

public Class EnumLiteralResolver

extends Resolver
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.AbstractExpression, org.eclipse.persistence.jpa.jpql.tools.spi.IType, .ITypeDeclaration

This Resolver retrieves the type for an enum constant.
Author
Pascal Filion
Since
2.4
Version
2.5

Field Summary

Modifier and TypeField and Description
private String
enumLiteral

The fully qualified name of the enum constant.

private IType
type

Hides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.type.

The cached IType that was already created elsewhere.

Constructor Summary

AccessConstructor and Description
public
EnumLiteralResolver(Resolver
The parent of this resolver, which is never null
parent
,
IType
The IType of the enum type
type
,
String
The fully qualified name of the enum constant
enumLiteral
)

Creates a new EnumLiteralResolver.

Method Summary

Modifier and TypeMethod and Description
protected IType
buildType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Resolves the IType of the property handled by this Resolver.
protected ITypeDeclaration
public String

Returns:

The name of the constant without the fully qualified enum type
getConstantName
()

Returns the name of the constant constant.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver:
addChildcheckParentgetChildgetManagedTypegetMappinggetParentgetParentManagedTypegetParentMappinggetParentTypegetParentTypeDeclarationgetProvidergetQuerygetTypegetTypegetTypegetTypeDeclarationgetTypeHelpergetTypeRepositoryisNullAllowedsetNullAllowed

Field Detail

enumLiteralback to summary
private String enumLiteral

The fully qualified name of the enum constant.

typeback to summary
private IType type

Hides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.type.

The cached IType that was already created elsewhere.

Constructor Detail

EnumLiteralResolverback to summary
public EnumLiteralResolver(Resolver parent, IType type, String enumLiteral)

Creates a new EnumLiteralResolver.

Parameters
parent:Resolver

The parent of this resolver, which is never null

type:IType

The IType of the enum type

enumLiteral:String

The fully qualified name of the enum constant

Exceptions
NullPointerException:
If the parent is null

Method Detail

buildTypeback to summary
protected IType buildType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Resolves the IType of the property handled by this Resolver.

Returns:IType

Either the IType that was resolved by this Resolver or the IType for IType#UNRESOLVABLE_TYPE if it could not be resolved

Annotations
@Override
buildTypeDeclarationback to summary
protected ITypeDeclaration buildTypeDeclaration()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildTypeDeclaration.

Doc from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildTypeDeclaration.

Resolves the ITypeDeclaration of the property handled by this Resolver.

Returns:ITypeDeclaration

Either the ITypeDeclaration that was resolved by this Resolver or the ITypeDeclaration for IType#UNRESOLVABLE_TYPE if it could not be resolved

Annotations
@Override
getConstantNameback to summary
public String getConstantName()

Returns the name of the constant constant.

Returns:String

The name of the constant without the fully qualified enum type

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override