Class OOSymbolsSymTypeRelations
- java.lang.Object
-
- de.monticore.symbols.oosymbols.types3.OOSymbolsSymTypeRelations
-
public class OOSymbolsSymTypeRelations extends java.lang.Objectrelations for SymTypes of wrt. OOSymbols, e.g, isEnum, etc. Mostly used as convenience instead of the required, e.g.,- checking if a symbol exists
- checking if the symbol is a OOSymbol
- typeDispatch the symbol to the OOSymbols variant
- actually checking a value
-
-
Field Summary
Fields Modifier and Type Field Description protected static OOSymbolsSymTypeRelationsdelegateprotected static java.lang.StringLOG_NAME
-
Constructor Summary
Constructors Constructor Description OOSymbolsSymTypeRelations()
-
Method Summary
-
-
-
Field Detail
-
LOG_NAME
protected static final java.lang.String LOG_NAME
-
delegate
protected static OOSymbolsSymTypeRelations delegate
-
-
Method Detail
-
isClass
public static boolean isClass(SymTypeExpression type)
-
_isClass
protected boolean _isClass(SymTypeExpression type)
-
isInterface
public static boolean isInterface(SymTypeExpression type)
-
_isInterface
protected boolean _isInterface(SymTypeExpression type)
-
isEnum
public static boolean isEnum(SymTypeExpression type)
-
_isEnum
protected boolean _isEnum(SymTypeExpression type)
-
getAbstractFunctionOfFunctionalInterFace
public static java.util.Optional<SymTypeOfFunction> getAbstractFunctionOfFunctionalInterFace(SymTypeExpression type)
Checks if the type is a functional interface and returns the abstract method. S. JLS 21 9.8- Returns:
- the abstract method of the type iff the type is a functional interface
-
_getAbstractFunctionOfFunctionalInterFace
protected java.util.Optional<SymTypeOfFunction> _getAbstractFunctionOfFunctionalInterFace(SymTypeExpression type)
-
sourceIsEnumConstant
public static boolean sourceIsEnumConstant(SymTypeExpression type)
whether the source of the type is an enum constant. s.a.SymTypeSourceInfo.getSourceSymbol()
-
_sourceIsEnumConstant
protected boolean _sourceIsEnumConstant(SymTypeExpression type)
-
isMethod
public static boolean isMethod(SymTypeExpression type)
-
_isMethod
protected boolean _isMethod(SymTypeExpression type)
-
isConstructor
public static boolean isConstructor(SymTypeExpression type)
-
_isConstructor
protected boolean _isConstructor(SymTypeExpression type)
-
getOOTypeSymbolIfAvailable
protected java.util.Optional<OOTypeSymbol> getOOTypeSymbolIfAvailable(SymTypeExpression type)
-
getMethodSymbolIfAvailable
protected java.util.Optional<MethodSymbol> getMethodSymbolIfAvailable(SymTypeExpression type)
-
getSourceFieldSymbolIfAvailable
protected java.util.Optional<FieldSymbol> getSourceFieldSymbolIfAvailable(SymTypeExpression type)
-
init
public static void init()
-
reset
public static void reset()
-
setDelegate
protected static void setDelegate(OOSymbolsSymTypeRelations newDelegate)
-
getDelegate
protected static OOSymbolsSymTypeRelations getDelegate()
-
-