Package de.monticore.types.check
Class SymTypeOfObject
- java.lang.Object
-
- de.monticore.types.check.SymTypeExpression
-
- de.monticore.types.check.SymTypeOfObject
-
public class SymTypeOfObject extends SymTypeExpression
An objectType is a full qualified class name. Therefore, we have the fullName, the baseName and the Symbol behind that full qualified class name to retrieve
-
-
Field Summary
Fields Modifier and Type Field Description protected TypeSymboltypeSymbol-
Fields inherited from class de.monticore.types.check.SymTypeExpression
functionList, LOG_NAME, sourceInfo
-
-
Constructor Summary
Constructors Constructor Description SymTypeOfObject(TypeSymbol typeSymbol)Constructor: with a TypeSymbolSurrogate that contains the name and enclosingScope
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(ISymTypeVisitor visitor)SymTypeOfObjectasObjectType()booleandeepEquals(SymTypeExpression sym)java.lang.StringgetBaseName()Deprecated, for removal: This API element is subject to removal in a future version.unused outside of tests, but not required for tests useNamesinstead, orgetTypeInfo().getName()java.lang.StringgetObjName()Deprecated, for removal: This API element is subject to removal in a future version.questionable name: getter and setter do different things.TypeSymbolgetTypeInfo()Returns an TypeSymbol representing the type Only to be called according toSymTypeExpression.hasTypeInfo()booleanhasTypeInfo()Whether we can call getTypeInfobooleanisObjectType()Am I an object type? (e.g.voidsetObjName(java.lang.String objname)Deprecated, for removal: This API element is subject to removal in a future version.unused in main projects-
Methods inherited from class de.monticore.types.check.SymTypeExpression
_internal_setSourceInfo, asArrayType, asFunctionType, asGenericType, asInferenceVariable, asIntersectionType, asNullType, asNumericWithSIUnitType, asObscureType, asPrimitive, asRegExType, asSIUnitType, asTupleType, asTypeVariable, asUnionType, asVoidType, asWildcard, deepClone, getCorrectFields, getCorrectFields, getCorrectMethods, getCorrectMethods, getFieldList, getFieldList, getFieldList, getFieldList, getMethodList, getMethodList, getMethodList, getMethodList, getSourceInfo, isArrayType, isFunctionType, isGenericType, isInferenceVariable, isIntersectionType, isNullType, isNumericWithSIUnitType, isObscureType, isPrimitive, isRegExType, isSIUnitType, isTupleType, isTypeVariable, isUnionType, isValidType, isVoidType, isWildcard, print, printAsJson, printFullName, replaceTypeVariables, transformFieldList, transformMethodList
-
-
-
-
Field Detail
-
typeSymbol
protected TypeSymbol typeSymbol
-
-
Constructor Detail
-
SymTypeOfObject
public SymTypeOfObject(TypeSymbol typeSymbol)
Constructor: with a TypeSymbolSurrogate that contains the name and enclosingScope
-
-
Method Detail
-
hasTypeInfo
public boolean hasTypeInfo()
Description copied from class:SymTypeExpressionWhether we can call getTypeInfo- Overrides:
hasTypeInfoin classSymTypeExpression
-
getTypeInfo
public TypeSymbol getTypeInfo()
Description copied from class:SymTypeExpressionReturns an TypeSymbol representing the type Only to be called according toSymTypeExpression.hasTypeInfo()As most SymTypeExpressions do not have a TypeSymbol (this is legacy), this method will log a warning and is expected to be overridden, if a TypeSymbol exists.
- Overrides:
getTypeInfoin classSymTypeExpression
-
getObjName
@Deprecated(forRemoval=true) public java.lang.String getObjName()
Deprecated, for removal: This API element is subject to removal in a future version.questionable name: getter and setter do different things. one may add a getObjFullName() or similar if required also, seems unused in our main projects
-
setObjName
@Deprecated(forRemoval=true) public void setObjName(java.lang.String objname)
Deprecated, for removal: This API element is subject to removal in a future version.unused in main projects
-
getBaseName
@Deprecated(forRemoval=true) public java.lang.String getBaseName()
Deprecated, for removal: This API element is subject to removal in a future version.unused outside of tests, but not required for tests useNamesinstead, orgetTypeInfo().getName()getBaseName: get the unqualified Name (no ., no Package)
-
isObjectType
public boolean isObjectType()
Description copied from class:SymTypeExpressionAm I an object type? (e.g. "String", "Person")- Overrides:
isObjectTypein classSymTypeExpression
-
asObjectType
public SymTypeOfObject asObjectType()
- Overrides:
asObjectTypein classSymTypeExpression
-
deepEquals
public boolean deepEquals(SymTypeExpression sym)
- Specified by:
deepEqualsin classSymTypeExpression
-
accept
public void accept(ISymTypeVisitor visitor)
- Overrides:
acceptin classSymTypeExpression
-
-