java.lang.Object
org.glavo.classfile.impl.Util
Helper to create and manipulate type descriptors, where type descriptors are
represented as JVM type descriptor strings and symbols are represented as
name strings
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckKind(Opcode op, Opcode.Kind k) static List<ClassEntry> static ClassDescstatic intflagsToBits(AccessFlag.Location location, Collection<AccessFlag> flags) static intflagsToBits(AccessFlag.Location location, AccessFlag... flags) static booleanhas(AccessFlag.Location location, int flagsMask, AccessFlag flag) static booleanisAttributeAllowed(Attribute<?> attr, ClassFile.AttributesProcessingOption processingOption) static booleanisDoubleSlot(ClassDesc desc) static <T,U> List <U> mappedList(List<? extends T> list, Function<T, U> mapper) static intmaxLocals(int flags, MethodTypeDesc mDesc) static MethodTypeDescstatic List<ModuleEntry> moduleEntryList(List<? extends ModuleDesc> list) static intparameterSlots(MethodTypeDesc mDesc) static int[]parseParameterSlots(int flags, MethodTypeDesc mDesc) static intstatic StringConverts a descriptor of classes or interfaces into a binary name.static ClassDesctoClassDesc(String classInternalNameOrArrayDesc) static String
-
Method Details
-
isAttributeAllowed
public static boolean isAttributeAllowed(Attribute<?> attr, ClassFile.AttributesProcessingOption processingOption) -
parameterSlots
-
parseParameterSlots
-
maxLocals
-
toBinaryName
Converts a descriptor of classes or interfaces into a binary name. Rejects primitive types or arrays. This is an inverse ofClassDesc.of(String). -
toInternalName
-
toClassDesc
-
mappedList
-
entryList
-
moduleEntryList
-
checkKind
-
flagsToBits
-
flagsToBits
-
has
-
fieldTypeSymbol
-
methodTypeSymbol
-
slotSize
-
isDoubleSlot
-