Class ArrayTypeExtender
java.lang.Object
manifold.internal.javac.ArrayTypeExtender
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidextend(com.sun.tools.javac.util.Context context, com.sun.source.tree.CompilationUnitTree compilingClass) Array types in Java all share the same symbol,Symtab.arrayClass.
-
Constructor Details
-
ArrayTypeExtender
public ArrayTypeExtender()
-
-
Method Details
-
extend
public static void extend(com.sun.tools.javac.util.Context context, com.sun.source.tree.CompilationUnitTree compilingClass) Array types in Java all share the same symbol,Symtab.arrayClass. For example,int[],String[],Foo[], andlong[][]all share the same symbol instance. Also, Java has no base type for the array class; there's no "java.lang.Array" to add extension methods to. Therefore, Manifold provides a substitute type for the sole purpose of adding extension methods, namelymanifold.rt.api.Array. Extension classes extending this class effectively extend Java's array class.
-