Skip to main content

JasmElementType

Enum JasmElementType 

Source
#[repr(u16)]
pub enum JasmElementType {
Show 115 variants RootToken = 0, ClassKw = 1, VersionKw = 2, MethodKw = 3, FieldKw = 4, StringKw = 5, SourceFileKw = 6, StackKw = 7, LocalsKw = 8, EndKw = 9, CompiledKw = 10, FromKw = 11, InnerClassKw = 12, NestMembersKw = 13, BootstrapMethodKw = 14, Public = 15, Private = 16, Protected = 17, Static = 18, Super = 19, Final = 20, Abstract = 21, Synchronized = 22, Native = 23, Synthetic = 24, Deprecated = 25, Varargs = 26, ALoad0 = 27, ALoad1 = 28, ALoad2 = 29, ALoad3 = 30, ILoad0 = 31, ILoad1 = 32, ILoad2 = 33, ILoad3 = 34, Ldc = 35, LdcW = 36, Ldc2W = 37, InvokeSpecial = 38, InvokeVirtual = 39, InvokeStatic = 40, InvokeInterface = 41, InvokeDynamic = 42, GetStatic = 43, PutStatic = 44, GetField = 45, PutField = 46, New = 47, CheckCast = 48, InstanceOf = 49, NewArray = 50, ANewArray = 51, ArrayLength = 52, AThrow = 53, MonitorEnter = 54, MonitorExit = 55, MultiANewArray = 56, IfNull = 57, IfNonNull = 58, Goto = 59, GotoW = 60, Jsr = 61, JsrW = 62, Ret = 63, TableSwitch = 64, LookupSwitch = 65, IReturn = 66, LReturn = 67, FReturn = 68, DReturn = 69, AReturn = 70, Return = 71, BiPush = 72, SiPush = 73, IInc = 74, Wide = 75, BreakPoint = 76, ImpDep1 = 77, ImpDep2 = 78, Nop = 79, Dup = 80, Pop = 81, LeftBrace = 82, RightBrace = 83, LeftBracket = 84, RightBracket = 85, LeftParen = 86, RightParen = 87, Comma = 88, Colon = 89, Semicolon = 90, Eq = 91, Dot = 92, Slash = 93, Identifier = 94, String = 95, Number = 96, Comment = 97, Whitespace = 98, Newline = 99, Eof = 100, Root = 101, Class = 102, Method = 103, Field = 104, Constant = 105, Attribute = 106, Instruction = 107, ExceptionHandler = 108, StackMapFrame = 109, InnerClass = 110, Annotation = 111, AnnotationParam = 112, AnnotationArray = 113, Error = 114,
}
Expand description

Element types for the JASM AST.

Variants§

§

RootToken = 0

Root token.

§

ClassKw = 1

class keyword.

§

VersionKw = 2

version keyword.

§

MethodKw = 3

method keyword.

§

FieldKw = 4

field keyword.

§

StringKw = 5

string keyword.

§

SourceFileKw = 6

source_file keyword.

§

StackKw = 7

stack keyword.

§

LocalsKw = 8

locals keyword.

§

EndKw = 9

end keyword.

§

CompiledKw = 10

compiled keyword.

§

FromKw = 11

from keyword.

§

InnerClassKw = 12

inner_class keyword.

§

NestMembersKw = 13

nest_members keyword.

§

BootstrapMethodKw = 14

bootstrap_method keyword.

§

Public = 15

public access modifier.

§

Private = 16

private access modifier.

§

Protected = 17

protected access modifier.

§

Static = 18

static modifier.

§

Super = 19

super modifier.

§

Final = 20

final modifier.

§

Abstract = 21

abstract modifier.

§

Synchronized = 22

synchronized modifier.

§

Native = 23

native modifier.

§

Synthetic = 24

synthetic modifier.

§

Deprecated = 25

deprecated modifier.

§

Varargs = 26

varargs modifier.

§

ALoad0 = 27

aload_0 instruction.

§

ALoad1 = 28

aload_1 instruction.

§

ALoad2 = 29

aload_2 instruction.

§

ALoad3 = 30

aload_3 instruction.

§

ILoad0 = 31

iload_0 instruction.

§

ILoad1 = 32

iload_1 instruction.

§

ILoad2 = 33

iload_2 instruction.

§

ILoad3 = 34

iload_3 instruction.

§

Ldc = 35

ldc instruction.

§

LdcW = 36

ldc_w instruction.

§

Ldc2W = 37

ldc2_w instruction.

§

InvokeSpecial = 38

invokespecial instruction.

§

InvokeVirtual = 39

invokevirtual instruction.

§

InvokeStatic = 40

invokestatic instruction.

§

InvokeInterface = 41

invokeinterface instruction.

§

InvokeDynamic = 42

invokedynamic instruction.

§

GetStatic = 43

getstatic instruction.

§

PutStatic = 44

putstatic instruction.

§

GetField = 45

getfield instruction.

§

PutField = 46

putfield instruction.

§

New = 47

new instruction.

§

CheckCast = 48

checkcast instruction.

§

InstanceOf = 49

instanceof instruction.

§

NewArray = 50

newarray instruction.

§

ANewArray = 51

anewarray instruction.

§

ArrayLength = 52

arraylength instruction.

§

AThrow = 53

athrow instruction.

§

MonitorEnter = 54

monitorenter instruction.

§

MonitorExit = 55

monitorexit instruction.

§

MultiANewArray = 56

multianewarray instruction.

§

IfNull = 57

ifnull instruction.

§

IfNonNull = 58

ifnonnull instruction.

§

Goto = 59

goto instruction.

§

GotoW = 60

goto_w instruction.

§

Jsr = 61

jsr instruction.

§

JsrW = 62

jsr_w instruction.

§

Ret = 63

ret instruction.

§

TableSwitch = 64

tableswitch instruction.

§

LookupSwitch = 65

lookupswitch instruction.

§

IReturn = 66

ireturn instruction.

§

LReturn = 67

lreturn instruction.

§

FReturn = 68

freturn instruction.

§

DReturn = 69

dreturn instruction.

§

AReturn = 70

areturn instruction.

§

Return = 71

return instruction.

§

BiPush = 72

bipush instruction.

§

SiPush = 73

sipush instruction.

§

IInc = 74

iinc instruction.

§

Wide = 75

wide instruction.

§

BreakPoint = 76

breakpoint instruction.

§

ImpDep1 = 77

impdep1 instruction.

§

ImpDep2 = 78

impdep2 instruction.

§

Nop = 79

nop instruction.

§

Dup = 80

dup instruction.

§

Pop = 81

pop instruction.

§

LeftBrace = 82

Left brace {.

§

RightBrace = 83

Right brace }.

§

LeftBracket = 84

Left bracket [.

§

RightBracket = 85

Right bracket ].

§

LeftParen = 86

Left parenthesis (.

§

RightParen = 87

Right parenthesis ).

§

Comma = 88

Comma ,.

§

Colon = 89

Colon :.

§

Semicolon = 90

Semicolon ;.

§

Eq = 91

Equals =.

§

Dot = 92

Dot ..

§

Slash = 93

Slash /.

§

Identifier = 94

Identifier.

§

String = 95

String literal.

§

Number = 96

Number literal.

§

Comment = 97

Comment.

§

Whitespace = 98

Whitespace.

§

Newline = 99

Newline.

§

Eof = 100

End of file.

§

Root = 101

Root node of the AST.

§

Class = 102

Class definition.

§

Method = 103

Method definition.

§

Field = 104

Field definition.

§

Constant = 105

Constant pool entry.

§

Attribute = 106

Attribute definition.

§

Instruction = 107

Instruction.

§

ExceptionHandler = 108

Exception handler.

§

StackMapFrame = 109

Stack map frame.

§

InnerClass = 110

Inner class definition.

§

Annotation = 111

Annotation definition.

§

AnnotationParam = 112

Annotation parameter.

§

AnnotationArray = 113

Annotation array parameter.

§

Error = 114

Error node.

Trait Implementations§

Source§

impl Clone for JasmElementType

Source§

fn clone(&self) -> JasmElementType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JasmElementType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for JasmElementType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ElementType for JasmElementType

Source§

type Role = UniversalElementRole

The associated role type for this element kind.
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this element.
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this element matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalElementRole) -> bool

Returns true if this element matches the specified universal role.
Source§

fn is_root(&self) -> bool

Returns true if this element represents the root of the parsed tree.
Source§

fn is_error(&self) -> bool

Returns true if this element represents an error condition.
Source§

impl From<JasmTokenType> for JasmElementType

Source§

fn from(token: JasmTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for JasmElementType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for JasmElementType

Source§

fn eq(&self, other: &JasmElementType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for JasmElementType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for JasmElementType

Source§

impl Eq for JasmElementType

Source§

impl StructuralPartialEq for JasmElementType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,