java.lang.Object
simula.compiler.byteCodeEngineering.JavaClassInfo
Java class info.
This class is introduced to compensate for a weakness in ASM.
ClassWriter.getCommonSuperClass does not work because Global.tempClassFileDir is not present in java.class.path
See: ExtendedClassWriter.getCommonSuperClass
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final boolean
DEBUG on/offExternal identifier.private static Hashtable
<String, JavaClassInfo> The java class mapPrefix identifier. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static JavaClassInfo
Get the JavaClassInfo associated with 'key'private String
getPrefixIdent
(String ident) Return the prefix identifier of a class named 'ident'.static void
init()
Initiate javaClassMap(package private) boolean
isSuperTypeOf
(JavaClassInfo other) Test if this JavaClassInfo is super of the other JavaClassInfo.(package private) static void
printJavaClassMap
(String title) Utility: Print Java class mapstatic void
put
(String key, JavaClassInfo info) Update javaClassMap.toString()
-
Field Details
-
DEBUG
private static final boolean DEBUGDEBUG on/off- See Also:
-
javaClassMap
The java class map -
externalIdent
External identifier. -
prefixIdent
Prefix identifier.
-
-
Constructor Details
-
JavaClassInfo
public JavaClassInfo()Default constructor.
-
-
Method Details
-
put
Update javaClassMap.- Parameters:
key
- the keyinfo
- the info
-
init
public static void init()Initiate javaClassMap -
get
Get the JavaClassInfo associated with 'key'- Parameters:
key
- a java class map key- Returns:
- the associated info or an empty String if not found
-
isSuperTypeOf
Test if this JavaClassInfo is super of the other JavaClassInfo.This is subtype of other iff This is in other's prefix chain.
- Parameters:
other
- the other JavaClassInfo- Returns:
- true if condition holds
-
getPrefixIdent
Return the prefix identifier of a class named 'ident'. May be null- Parameters:
ident
- class identifier- Returns:
- the prefix identifier or null
-
printJavaClassMap
Utility: Print Java class map- Parameters:
title
- the title
-
toString
-