Package manifold.internal.javac
Class ArrayTypeExtender
- java.lang.Object
-
- manifold.internal.javac.ArrayTypeExtender
-
public class ArrayTypeExtender extends Object
-
-
Constructor Summary
Constructors Constructor Description ArrayTypeExtender()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
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.
-
-