Top Description Inners Constructors Methods
org.python.modules.posix

pack-priv Class Hider

extends Object
Class Inheritance
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target, java.lang.reflect.Method, org.python.core.PyObject

Utility class for hiding PosixModule methods depending on the platform, or whether the underlying posix implementation is native.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static @interface
Hider.Hide

Tags PosixModule methods as hidden on the specified OS or PosixImpl.

pack-priv static enum
Hider.PosixImpl

The type of underlying POSIX library implementation (native or not).

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static void
hideFunctions(Class<?>
the PosixModule class
cls
,
PyObject
the PosixModule module dict
dict
,
OS
the underlying OS
os
,
boolean
whether the underlying posix is native
isNative
)

Hide module level functions defined in the PosixModule dict not applicable to this OS, identified by the PosixModule.Hide annotation.

private static boolean
isHidden(Method method, OS os, Hider.PosixImpl posixImpl)

Determine if method should be hidden for this OS/PosixImpl.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Hiderback to summary
pack-priv Hider()

Method Detail

hideFunctionsback to summary
public static void hideFunctions(Class<?> cls, PyObject dict, OS os, boolean isNative)

Hide module level functions defined in the PosixModule dict not applicable to this OS, identified by the PosixModule.Hide annotation.

Parameters
cls:Class<?>

the PosixModule class

dict:PyObject

the PosixModule module dict

os:OS

the underlying OS

isNative:boolean

whether the underlying posix is native

isHiddenback to summary
private static boolean isHidden(Method method, OS os, Hider.PosixImpl posixImpl)

Determine if method should be hidden for this OS/PosixImpl.

org.python.modules.posix back to summary

pack-priv @Interface Hider.Hide

extends Annotation
Annotations
@Retention:RUNTIME
@Target:METHOD

Tags PosixModule methods as hidden on the specified OS or PosixImpl.

Method Summary

Modifier and TypeMethod and Description
public Hider.PosixImpl
posixImpl()

@Hide(posixImpl = PosixImpl.JAVA) hides the method from Python when the POSIX library isn't native.

public OS[]
value()

Hide method on these OSes.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

posixImplback to summary
public Hider.PosixImpl posixImpl()

@Hide(posixImpl = PosixImpl.JAVA) hides the method from Python when the POSIX library isn't native. The default NOT_APPLICABLE means the POSIX implementation doesn't matter.

valueback to summary
public OS[] value()

Hide method on these OSes.

org.python.modules.posix back to summary

pack-priv final Enum Hider.PosixImpl

extends Enum<Hider.PosixImpl>
Class Inheritance

The type of underlying POSIX library implementation (native or not).

Field Summary

Modifier and TypeField and Description
public static final Hider.PosixImpl
public static final Hider.PosixImpl
public static final Hider.PosixImpl

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Hider.PosixImpl
public static Hider.PosixImpl[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

JAVAback to summary
public static final Hider.PosixImpl JAVA
NATIVEback to summary
public static final Hider.PosixImpl NATIVE
NOT_APPLICABLEback to summary
public static final Hider.PosixImpl NOT_APPLICABLE

Constructor Detail

PosixImplback to summary
private PosixImpl()

Method Detail

valueOfback to summary
public static Hider.PosixImpl valueOf(String name)
valuesback to summary
public static Hider.PosixImpl[] values()