Annotation Type Untraversable


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface Untraversable
    Indicates that a given class is not traversable and does intentionally not implement Traverseproc. This annotation is ignored if the class implements Traverseproc, i.e. it cannot be used to remove Traverseproc support of a superclass. Thus it is well defined what happens if both Traverseproc and {@literal @}Untraversable are present: Traverseproc wins.
    If a class does not implement Traverseproc and is not annotated with {@literal @}Untraversable, gc assumes that the programmers were not aware of Jython's traverse mechanism and attempts to traverse the target object by using Java-reflection (which is assumably very inefficient).