Beispiel #1
0
 public <T extends lombok.ast.pg.IType<?, ?, ?, ?, ?, ?>> T memberType(final String typeName) {
   for (EclipseNode child : node().down()) {
     if (child.getKind() != Kind.TYPE) continue;
     if (child.getName().equals(typeName)) {
       return Cast.<T>uncheckedCast(EclipseType.typeOf(child, source));
     }
   }
   throw new IllegalArgumentException();
 }
Beispiel #2
0
 public <T extends IType<?, ?, ?, ?, ?, ?>> T surroundingType() {
   final EclipseNode parent = node().directUp();
   if (parent == null) return null;
   return Cast.<T>uncheckedCast(EclipseType.typeOf(parent, source));
 }