public final class KeYTypeUtil
extends java.lang.Object
KeYJavaType
instances with help of given Services
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PACKAGE_SEPARATOR
Separator between packages and types.
|
Modifier | Constructor and Description |
---|---|
private |
KeYTypeUtil()
Forbid instances.
|
Modifier and Type | Method and Description |
---|---|
static IProgramMethod |
findExplicitConstructor(Services services,
IProgramMethod implicitConstructor)
Returns the
IProgramMethod of the explicit constructor for
the given implicit constructor. |
static java.lang.String |
getParentName(Services services,
KeYJavaType type)
Returns the name of the parent package/type or
null if it has no one. |
private static java.lang.String |
getParentName(Services services,
java.lang.String fullName)
Returns the name of the parent package/type or
null if it has no one. |
static KeYJavaType |
getType(Services services,
java.lang.String fullName)
Returns the
KeYJavaType fore the given name. |
static boolean |
isImplicitConstructor(IProgramMethod pm)
Checks if the given
IProgramMethod is an implicit constructor. |
static boolean |
isInnerType(Services services,
KeYJavaType type)
Checks if the given type is an inner or anonymous type.
|
static boolean |
isLibraryClass(KeYJavaType kjt)
Checks if the given
KeYJavaType is a library class. |
static boolean |
isType(Services services,
java.lang.String fullName)
Checks if the given full name is a type in KeY.
|
static java.lang.String |
resolveType(ParameterDeclaration parameterDeclaration)
Resolves the type of the given
ParameterDeclaration . |
static java.lang.String |
resolveType(Type type)
Resolves the type of the given
Type . |
static java.lang.String |
resolveType(TypeReference typeReference)
Resolves the type of the given
TypeReference . |
public static final java.lang.String PACKAGE_SEPARATOR
public static boolean isInnerType(Services services, KeYJavaType type)
services
- The Services
to use.type
- The type to check.true
is inner or anonymous, false
is notpublic static java.lang.String getParentName(Services services, KeYJavaType type)
null
if it has no one.services
- The Services
to use.type
- The type.null
if it has no one.private static java.lang.String getParentName(Services services, java.lang.String fullName)
null
if it has no one.services
- The Services
to use.fullName
- The name of the current package/type.null
if it has no one.public static boolean isType(Services services, java.lang.String fullName)
services
- The services to use.fullName
- The full name to check.true
= is type, false
= is no typepublic static KeYJavaType getType(Services services, java.lang.String fullName)
KeYJavaType
fore the given name.services
- The Services
to use.fullName
- The full name of the requested KeYJavaType
.KeYJavaType
or null
if no type exist with the given name.public static boolean isLibraryClass(KeYJavaType kjt)
KeYJavaType
is a library class.kjt
- The KeYJavaType
to check.true
is library class, false
is no library class.public static boolean isImplicitConstructor(IProgramMethod pm)
IProgramMethod
is an implicit constructor.pm
- The IProgramMethod
to check.true
is implicit constructor, false
is no implicit constructor (e.g. method or explicit construcotr).public static IProgramMethod findExplicitConstructor(Services services, IProgramMethod implicitConstructor)
IProgramMethod
of the explicit constructor for
the given implicit constructor.services
- The Services
to use.implicitConstructor
- The implicit constructor.null
if not available.public static java.lang.String resolveType(ParameterDeclaration parameterDeclaration)
ParameterDeclaration
.parameterDeclaration
- The ParameterDeclaration
to resolve.null
if the given ParameterDeclaration
is null
.public static java.lang.String resolveType(TypeReference typeReference)
TypeReference
.typeReference
- The TypeReference
to resolve.null
if the given TypeReference
is null
.