aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-03-25 17:17:14 +0100
committer zaaarf <zaaarf@proton.me>2023-03-25 17:17:14 +0100
commit193db6bf7b5cc767ff88527fc20ac52e6bb7d16c (patch)
tree25c9548dca4222325b822114e19301a6fbe15805 /src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java
parent597fda2362e8261d6c617da7baef2dbd75d6d0d8 (diff)
feat: initial untested draft of version 0.5.0 compatible with lillero 0.4
Diffstat (limited to 'src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java')
-rw-r--r--src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java b/src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java
deleted file mode 100644
index c32a621..0000000
--- a/src/main/java/ftbsc/lll/processor/tools/ArrayContainer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package ftbsc.lll.processor.tools;
-
-import javax.lang.model.type.ArrayType;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-
-/**
- * Utility class that extrapolates information from a {@link TypeMirror},
- * making it considerably easier to get informations about an
- * array.
- * @since 0.4.0
- */
-public class ArrayContainer {
- /**
- * The nesting level of the array - a type who is not an array will have 0.
- */
- public final int arrayLevel;
-
- /**
- * The innermost component of the array, corresponding to the type of the base
- * component.
- */
- public final TypeMirror innermostComponent;
-
- /**
- * Creates a new {@link ArrayContainer} from a {@link TypeMirror}.
- * @param t the {@link TypeMirror} representing the type.
- */
- public ArrayContainer(TypeMirror t) {
- int arrayLevel = 0;
- while(t.getKind() == TypeKind.ARRAY) {
- t = ((ArrayType) t).getComponentType();
- arrayLevel++;
- }
- this.arrayLevel = arrayLevel;
- this.innermostComponent = t;
- }
-}