lombok-ast-0.2.2

16:38:58.335 INFO  jd.cli.Main - Decompiling lombok-ast-0.2.2.jar
package lombok.ast;

import com.google.common.collect.Lists;
import java.util.List;

abstract class AbstractNode$WithParens
  extends AbstractNode
  implements Expression
{
  private List<Position> parensPositions = Lists.newArrayList();
  
  public boolean needsParentheses()
  {
    return false;
  }
  
  public List<Position> astParensPositions()
  {
    return parensPositions;
  }
  
  public int getParens()
  {
    return parensPositions.size();
  }
  
  public int getIntendedParens()
  {
    return parensPositions.size();
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AbstractNode.WithParens
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import lombok.ast.printer.SourcePrinter;
import lombok.ast.printer.TextFormatter;

abstract class AbstractNode
  implements Node
{
  private Position position;
  private Node parent;
  private List<Node> danglings;
  private Map<String, Position> conversionPositions;
  private Map<MessageKey, Message> messagesMap;
  private List<Message> messages;
  private Object nativeNode;
  private PositionFactory positionFactory;
  
  AbstractNode()
  {
    position = Position.UNPLACED;
  }
  
  public boolean isGenerated()
  {
    return position.getGeneratedBy() != null;
  }
  
  public Node getGeneratedBy()
  {
    return position.getGeneratedBy();
  }
  
  public boolean hasParent()
  {
    return parent != null;
  }
  
  public List<Node> getChildren()
  {
    return Collections.emptyList();
  }
  
  public boolean replace(Node replacement)
    throws AstException
  {
    if (getParent() == null) {
      return false;
    }
    return parent.replaceChild(this, replacement);
  }
  
  public void unparent()
  {
    if (parent != null) {
      parent.detach(this);
    }
  }
  
  protected AbstractNode adopt(AbstractNode child)
    throws IllegalStateException
  {
    child.ensureParentless();
    parent = this;
    return child;
  }
  
  protected void ensureParentless()
    throws IllegalStateException
  {
    if (parent == null) {
      return;
    }
    throw new IllegalStateException(String.format("I (%s) already have a parent, so you can't add me to something else; clone or unparent me first.", new Object[] { getClass().getName() }));
  }
  
  protected void disown(AbstractNode child)
    throws IllegalStateException
  {
    ensureParentage(child);
    parent = null;
  }
  
  protected void ensureParentage(AbstractNode child)
    throws IllegalStateException
  {
    if (parent == this) {
      return;
    }
    throw new IllegalStateException(String.format("Can't disown child of type %s - it isn't my child (I'm a %s)", new Object[] { child.getClass().getName(), getClass().getName() }));
  }
  
  public Node setPosition(Position position)
  {
    if (position == null) {
      throw new NullPointerException("position");
    }
    this.position = position;
    return this;
  }
  
  public Position getPosition()
  {
    if ((position == Position.UNPLACED) && (positionFactory != null)) {
      position = positionFactory.getPosition(this);
    }
    return position;
  }
  
  public String toString()
  {
    TextFormatter formatter = new TextFormatter();
    SourcePrinter printer = new SourcePrinter(formatter);
    accept(printer);
    return formatter.finish();
  }
  
  public boolean replaceChild(Node original, Node replacement)
  {
    return false;
  }
  
  public boolean detach(Node child)
  {
    return false;
  }
  
  void addDanglingNode(Node dangling)
  {
    if (dangling == null) {
      return;
    }
    if (danglings == null) {
      danglings = Lists.newArrayList();
    }
    danglings.add(dangling);
  }
  
  void removeDanglingNode(Node dangling)
  {
    if (danglings != null) {
      danglings.remove(dangling);
    }
  }
  
  List<Node> getDanglingNodes()
  {
    return danglings == null ? Collections.emptyList() : Collections.unmodifiableList(danglings);
  }
  
  void addConversionPositionInfo(String key, Position position)
  {
    if (conversionPositions == null) {
      conversionPositions = Maps.newHashMap();
    }
    conversionPositions.put(key, position);
  }
  
  Position getConversionPositionInfo(String key)
  {
    if (conversionPositions == null) {
      return null;
    }
    return (Position)conversionPositions.get(key);
  }
  
  public Node addMessage(Message message)
  {
    if (messagesMap == null)
    {
      messagesMap = Maps.newHashMap();
      messages = Lists.newArrayList();
    }
    if (message.getKey() == null)
    {
      messages.add(message);
    }
    else if (!messagesMap.containsKey(message.getKey()))
    {
      messagesMap.put(message.getKey(), message);
      messages.add(message);
    }
    return this;
  }
  
  public boolean hasMessage(String key)
  {
    if (messagesMap == null) {
      return false;
    }
    return messagesMap.containsKey(key);
  }
  
  public List<Message> getMessages()
  {
    return messages == null ? Collections.emptyList() : Collections.unmodifiableList(messages);
  }
  
  public Node getParent()
  {
    return parent;
  }
  
  public Object getNativeNode()
  {
    return nativeNode;
  }
  
  public void setNativeNode(Object nativeNode)
  {
    this.nativeNode = nativeNode;
  }
  
  public PositionFactory getPositionFactory()
  {
    return positionFactory;
  }
  
  public void setPositionFactory(PositionFactory positionFactory)
  {
    this.positionFactory = positionFactory;
  }
  
  static abstract class WithParens
    extends AbstractNode
    implements Expression
  {
    private List<Position> parensPositions = Lists.newArrayList();
    
    public boolean needsParentheses()
    {
      return false;
    }
    
    public List<Position> astParensPositions()
    {
      return parensPositions;
    }
    
    public int getParens()
    {
      return parensPositions.size();
    }
    
    public int getIntendedParens()
    {
      return parensPositions.size();
    }
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AbstractNode
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class AlternateConstructorInvocation
  extends AbstractNode
  implements Statement
{
  ListAccessor<TypeReference, AlternateConstructorInvocation> constructorTypeArguments = ListAccessor.of(this, TypeReference.class, "AlternateConstructorInvocation.constructorTypeArguments");
  ListAccessor<Expression, AlternateConstructorInvocation> arguments = ListAccessor.of(this, Expression.class, "AlternateConstructorInvocation.arguments");
  
  public Block upToBlock()
  {
    if (!(getParent() instanceof Block)) {
      return null;
    }
    Block out = (Block)getParent();
    if (!out.rawContents().contains(this)) {
      return null;
    }
    return out;
  }
  
  public RawListAccessor<TypeReference, AlternateConstructorInvocation> rawConstructorTypeArguments()
  {
    return constructorTypeArguments.asRaw();
  }
  
  public StrictListAccessor<TypeReference, AlternateConstructorInvocation> astConstructorTypeArguments()
  {
    return constructorTypeArguments.asStrict();
  }
  
  public RawListAccessor<Expression, AlternateConstructorInvocation> rawArguments()
  {
    return arguments.asRaw();
  }
  
  public StrictListAccessor<Expression, AlternateConstructorInvocation> astArguments()
  {
    return arguments.asStrict();
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    result.addAll(constructorTypeArguments.backingList());
    result.addAll(arguments.backingList());
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (rawConstructorTypeArguments().replace(original, replacement)) {
      return true;
    }
    if (rawArguments().replace(original, replacement)) {
      return true;
    }
    return false;
  }
  
  public boolean detach(Node child)
  {
    if (rawConstructorTypeArguments().remove(child)) {
      return true;
    }
    if (rawArguments().remove(child)) {
      return true;
    }
    return false;
  }
  
  public void accept(AstVisitor visitor)
  {
    if (visitor.visitAlternateConstructorInvocation(this)) {
      return;
    }
    for (Node child : constructorTypeArguments.asIterable()) {
      child.accept(visitor);
    }
    for (Node child : arguments.asIterable()) {
      child.accept(visitor);
    }
    visitor.endVisit(this);
  }
  
  public AlternateConstructorInvocation copy()
  {
    AlternateConstructorInvocation result = new AlternateConstructorInvocation();
    for (Node n : constructorTypeArguments.backingList()) {
      result.rawConstructorTypeArguments().addToEnd(new Node[] { n == null ? null : n.copy() });
    }
    for (Node n : arguments.backingList()) {
      result.rawArguments().addToEnd(new Node[] { n == null ? null : n.copy() });
    }
    return result;
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AlternateConstructorInvocation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.List;

class AlternateConstructorInvocationTemplate
{
  List<TypeReference> constructorTypeArguments1;
  List<Expression> arguments2;
}

/* Location:
 * Qualified Name:     lombok.ast.AlternateConstructorInvocationTemplate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class Annotation
  extends AbstractNode
  implements DescribedNode, AnnotationValue
{
  private AbstractNode annotationTypeReference = null;
  ListAccessor<AnnotationElement, Annotation> elements = ListAccessor.of(this, AnnotationElement.class, "Annotation.elements");
  
  public Modifiers upToModifiers()
  {
    if (!(getParent() instanceof Modifiers)) {
      return null;
    }
    Modifiers out = (Modifiers)getParent();
    if (!out.rawAnnotations().contains(this)) {
      return null;
    }
    return out;
  }
  
  public TypeReference astAnnotationTypeReference()
  {
    if (!(annotationTypeReference instanceof TypeReference)) {
      return null;
    }
    return (TypeReference)annotationTypeReference;
  }
  
  public Annotation astAnnotationTypeReference(TypeReference annotationTypeReference)
  {
    if (annotationTypeReference == null) {
      throw new NullPointerException("annotationTypeReference is mandatory");
    }
    return rawAnnotationTypeReference(annotationTypeReference);
  }
  
  public Node rawAnnotationTypeReference()
  {
    return annotationTypeReference;
  }
  
  public Annotation rawAnnotationTypeReference(Node annotationTypeReference)
  {
    if (annotationTypeReference == this.annotationTypeReference) {
      return this;
    }
    if (annotationTypeReference != null) {
      adopt((AbstractNode)annotationTypeReference);
    }
    if (this.annotationTypeReference != null) {
      disown(this.annotationTypeReference);
    }
    this.annotationTypeReference = ((AbstractNode)annotationTypeReference);
    return this;
  }
  
  public RawListAccessor<AnnotationElement, Annotation> rawElements()
  {
    return elements.asRaw();
  }
  
  public StrictListAccessor<AnnotationElement, Annotation> astElements()
  {
    return elements.asStrict();
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    if (annotationTypeReference != null) {
      result.add(annotationTypeReference);
    }
    result.addAll(elements.backingList());
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (annotationTypeReference == original)
    {
      rawAnnotationTypeReference(replacement);
      return true;
    }
    if (rawElements().replace(original, replacement)) {
      return true;
    }
    return false;
  }
  
  public boolean detach(Node child)
  {
    if (annotationTypeReference == child)
    {
      disown((AbstractNode)child);
      annotationTypeReference = null;
      return true;
    }
    if (rawElements().remove(child)) {
      return true;
    }
    return false;
  }
  
  public void accept(AstVisitor visitor)
  {
    if (visitor.visitAnnotation(this)) {
      return;
    }
    if (annotationTypeReference != null) {
      annotationTypeReference.accept(visitor);
    }
    for (Node child : elements.asIterable()) {
      child.accept(visitor);
    }
    visitor.endVisit(this);
  }
  
  public Annotation copy()
  {
    Annotation result = new Annotation();
    if (annotationTypeReference != null) {
      result.rawAnnotationTypeReference(annotationTypeReference.copy());
    }
    for (Node n : elements.backingList()) {
      result.rawElements().addToEnd(new Node[] { n == null ? null : n.copy() });
    }
    return result;
  }
  
  public String getDescription()
  {
    return AnnotationTemplate.getDescription(this);
  }
  
  public List<Node> getValueValues()
  {
    return AnnotationTemplate.getValueValues(this);
  }
  
  public List<Node> getValues(String key)
  {
    return AnnotationTemplate.getValues(this, key);
  }
}

/* Location:
 * Qualified Name:     lombok.ast.Annotation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class AnnotationDeclaration
  extends AbstractNode
  implements TypeMember, Statement, TypeDeclaration, JavadocContainer
{
  private AbstractNode javadoc = null;
  private AbstractNode modifiers = adopt(new Modifiers());
  private AbstractNode name = adopt(new Identifier());
  private AbstractNode body = null;
  
  public TypeBody upToTypeBody()
  {
    if (!(getParent() instanceof TypeBody)) {
      return null;
    }
    TypeBody out = (TypeBody)getParent();
    if (!out.rawMembers().contains(this)) {
      return null;
    }
    return out;
  }
  
  public Block upToBlock()
  {
    if (!(getParent() instanceof Block)) {
      return null;
    }
    Block out = (Block)getParent();
    if (!out.rawContents().contains(this)) {
      return null;
    }
    return out;
  }
  
  public CompilationUnit upIfTopLevelToCompilationUnit()
  {
    if (!(getParent() instanceof CompilationUnit)) {
      return null;
    }
    CompilationUnit out = (CompilationUnit)getParent();
    if (!out.rawTypeDeclarations().contains(this)) {
      return null;
    }
    return out;
  }
  
  public Comment astJavadoc()
  {
    if (!(javadoc instanceof Comment)) {
      return null;
    }
    return (Comment)javadoc;
  }
  
  public AnnotationDeclaration astJavadoc(Comment javadoc)
  {
    return rawJavadoc(javadoc);
  }
  
  public Node rawJavadoc()
  {
    return javadoc;
  }
  
  public AnnotationDeclaration rawJavadoc(Node javadoc)
  {
    if (javadoc == this.javadoc) {
      return this;
    }
    if (javadoc != null) {
      adopt((AbstractNode)javadoc);
    }
    if (this.javadoc != null) {
      disown(this.javadoc);
    }
    this.javadoc = ((AbstractNode)javadoc);
    return this;
  }
  
  public Modifiers astModifiers()
  {
    if (!(modifiers instanceof Modifiers)) {
      return null;
    }
    return (Modifiers)modifiers;
  }
  
  public AnnotationDeclaration astModifiers(Modifiers modifiers)
  {
    return rawModifiers(modifiers);
  }
  
  private AnnotationDeclaration rawModifiers(Node modifiers)
  {
    if (modifiers == this.modifiers) {
      return this;
    }
    if (modifiers != null) {
      adopt((AbstractNode)modifiers);
    }
    if (this.modifiers != null) {
      disown(this.modifiers);
    }
    this.modifiers = ((AbstractNode)modifiers);
    return this;
  }
  
  public Identifier astName()
  {
    if (!(name instanceof Identifier)) {
      return null;
    }
    return (Identifier)name;
  }
  
  public AnnotationDeclaration astName(Identifier name)
  {
    return rawName(name);
  }
  
  private AnnotationDeclaration rawName(Node name)
  {
    if (name == this.name) {
      return this;
    }
    if (name != null) {
      adopt((AbstractNode)name);
    }
    if (this.name != null) {
      disown(this.name);
    }
    this.name = ((AbstractNode)name);
    return this;
  }
  
  public NormalTypeBody astBody()
  {
    if (!(body instanceof NormalTypeBody)) {
      return null;
    }
    return (NormalTypeBody)body;
  }
  
  public AnnotationDeclaration astBody(NormalTypeBody body)
  {
    if (body == null) {
      throw new NullPointerException("body is mandatory");
    }
    return rawBody(body);
  }
  
  public Node rawBody()
  {
    return body;
  }
  
  public AnnotationDeclaration rawBody(Node body)
  {
    if (body == this.body) {
      return this;
    }
    if (body != null) {
      adopt((AbstractNode)body);
    }
    if (this.body != null) {
      disown(this.body);
    }
    this.body = ((AbstractNode)body);
    return this;
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    if (javadoc != null) {
      result.add(javadoc);
    }
    if (modifiers != null) {
      result.add(modifiers);
    }
    if (name != null) {
      result.add(name);
    }
    if (body != null) {
      result.add(body);
    }
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (javadoc == original)
    {
      rawJavadoc(replacement);
      return true;
    }
    if (modifiers == original)
    {
      if ((replacement instanceof Modifiers))
      {
        astModifiers((Modifiers)replacement);
        return true;
      }
      throw new AstException(this, String.format("Cannot replace node: replacement must be of type %s but is of type %s", new Object[] { "Modifiers", replacement == null ? "null" : replacement.getClass().getName() }));
    }
    if (name == original)
    {
      if ((replacement instanceof Identifier))
      {
        astName((Identifier)replacement);
        return true;
      }
      throw new AstException(this, String.format("Cannot replace node: replacement must be of type %s but is of type %s", new Object[] { "Identifier", replacement == null ? "null" : replacement.getClass().getName() }));
    }
    if (body == original)
    {
      rawBody(replacement);
      return true;
    }
    return false;
  }
  
  public boolean detach(Node child)
  {
    if (javadoc == child)
    {
      disown((AbstractNode)child);
      javadoc = null;
      return true;
    }
    if (modifiers == child)
    {
      disown((AbstractNode)child);
      modifiers = null;
      return true;
    }
    if (name == child)
    {
      disown((AbstractNode)child);
      name = null;
      return true;
    }
    if (body == child)
    {
      disown((AbstractNode)child);
      body = null;
      return true;
    }
    return false;
  }
  
  public void accept(AstVisitor visitor)
  {
    if (visitor.visitAnnotationDeclaration(this)) {
      return;
    }
    if (javadoc != null) {
      javadoc.accept(visitor);
    }
    if (modifiers != null) {
      modifiers.accept(visitor);
    }
    if (name != null) {
      name.accept(visitor);
    }
    if (body != null) {
      body.accept(visitor);
    }
    visitor.endVisit(this);
  }
  
  public AnnotationDeclaration copy()
  {
    AnnotationDeclaration result = new AnnotationDeclaration();
    if (javadoc != null) {
      result.rawJavadoc(javadoc.copy());
    }
    if (modifiers != null) {
      result.rawModifiers(modifiers.copy());
    }
    if (name != null) {
      result.rawName(name.copy());
    }
    if (body != null) {
      result.rawBody(body.copy());
    }
    return result;
  }
  
  public String getDescription()
  {
    return AnnotationDeclarationTemplate.getDescription(this);
  }
  
  public boolean isInterface()
  {
    return AnnotationDeclarationTemplate.isInterface(this);
  }
  
  public TypeDeclaration upUpToTypeDeclaration()
  {
    return TypeMemberMixin.upUpToTypeDeclaration(this);
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationDeclaration
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import lombok.ast.template.ForcedType;

class AnnotationDeclarationTemplate
{
  Comment javadoc1;
  @ForcedType
  Modifiers modifiers2;
  @ForcedType
  Identifier name3;
  NormalTypeBody body4;
  
  static String getDescription(AnnotationDeclaration self)
  {
    return self.astName().astValue();
  }
  
  static boolean isInterface(AnnotationDeclaration self)
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationDeclarationTemplate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class AnnotationElement
  extends AbstractNode
  implements DescribedNode
{
  private AbstractNode name = null;
  private AbstractNode value = null;
  
  public Annotation upToAnnotation()
  {
    if (!(getParent() instanceof Annotation)) {
      return null;
    }
    Annotation out = (Annotation)getParent();
    if (!out.rawElements().contains(this)) {
      return null;
    }
    return out;
  }
  
  public Identifier astName()
  {
    if (!(name instanceof Identifier)) {
      return null;
    }
    return (Identifier)name;
  }
  
  public AnnotationElement astName(Identifier name)
  {
    return rawName(name);
  }
  
  private AnnotationElement rawName(Node name)
  {
    if (name == this.name) {
      return this;
    }
    if (name != null) {
      adopt((AbstractNode)name);
    }
    if (this.name != null) {
      disown(this.name);
    }
    this.name = ((AbstractNode)name);
    return this;
  }
  
  public AnnotationValue astValue()
  {
    if (!(value instanceof AnnotationValue)) {
      return null;
    }
    return (AnnotationValue)value;
  }
  
  public AnnotationElement astValue(AnnotationValue value)
  {
    if (value == null) {
      throw new NullPointerException("value is mandatory");
    }
    return rawValue(value);
  }
  
  public Node rawValue()
  {
    return value;
  }
  
  public AnnotationElement rawValue(Node value)
  {
    if (value == this.value) {
      return this;
    }
    if (value != null) {
      adopt((AbstractNode)value);
    }
    if (this.value != null) {
      disown(this.value);
    }
    this.value = ((AbstractNode)value);
    return this;
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    if (name != null) {
      result.add(name);
    }
    if (value != null) {
      result.add(value);
    }
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (name == original)
    {
      if ((replacement instanceof Identifier))
      {
        astName((Identifier)replacement);
        return true;
      }
      throw new AstException(this, String.format("Cannot replace node: replacement must be of type %s but is of type %s", new Object[] { "Identifier", replacement == null ? "null" : replacement.getClass().getName() }));
    }
    if (value == original)
    {
      rawValue(replacement);
      return true;
    }
    return false;
  }
  
  public boolean detach(Node child)
  {
    if (name == child)
    {
      disown((AbstractNode)child);
      name = null;
      return true;
    }
    if (value == child)
    {
      disown((AbstractNode)child);
      value = null;
      return true;
    }
    return false;
  }
  
  public void accept(AstVisitor visitor)
  {
    if (visitor.visitAnnotationElement(this)) {
      return;
    }
    if (name != null) {
      name.accept(visitor);
    }
    if (value != null) {
      value.accept(visitor);
    }
    visitor.endVisit(this);
  }
  
  public AnnotationElement copy()
  {
    AnnotationElement result = new AnnotationElement();
    if (name != null) {
      result.rawName(name.copy());
    }
    if (value != null) {
      result.rawValue(value.copy());
    }
    return result;
  }
  
  public String getDescription()
  {
    return AnnotationElementTemplate.getDescription(this);
  }
  
  public List<Node> getValues()
  {
    return AnnotationElementTemplate.getValues(this);
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationElement
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
import java.util.Iterator;
import java.util.List;
import lombok.ast.template.ForcedType;

class AnnotationElementTemplate
{
  @ForcedType
  Identifier name1;
  AnnotationValue value2;
  
  static String getDescription(AnnotationElement self)
  {
    try
    {
      return self.astName().astValue();
    }
    catch (NullPointerException e) {}
    return null;
  }
  
  static List<Node> getValues(AnnotationElement self)
  {
    if (self.rawValue() == null) {
      return ImmutableList.of();
    }
    if ((self.rawValue() instanceof AnnotationValueArray))
    {
      ImmutableList.Builder<Node> result = ImmutableList.builder();
      Node n;
      for (Iterator i$ = ((AnnotationValueArray)self.rawValue()).rawValues().iterator(); i$.hasNext(); result.add(n)) {
        n = (Node)i$.next();
      }
      return result.build();
    }
    return ImmutableList.of(self.rawValue());
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationElementTemplate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class AnnotationMethodDeclaration
  extends AbstractNode
  implements TypeMember, DescribedNode, JavadocContainer
{
  private AbstractNode javadoc = null;
  private AbstractNode modifiers = adopt(new Modifiers());
  private AbstractNode returnTypeReference = null;
  private AbstractNode methodName = adopt(new Identifier());
  private AbstractNode defaultValue = null;
  
  public TypeBody upToTypeBody()
  {
    if (!(getParent() instanceof TypeBody)) {
      return null;
    }
    TypeBody out = (TypeBody)getParent();
    if (!out.rawMembers().contains(this)) {
      return null;
    }
    return out;
  }
  
  public Comment astJavadoc()
  {
    if (!(javadoc instanceof Comment)) {
      return null;
    }
    return (Comment)javadoc;
  }
  
  public AnnotationMethodDeclaration astJavadoc(Comment javadoc)
  {
    return rawJavadoc(javadoc);
  }
  
  public Node rawJavadoc()
  {
    return javadoc;
  }
  
  public AnnotationMethodDeclaration rawJavadoc(Node javadoc)
  {
    if (javadoc == this.javadoc) {
      return this;
    }
    if (javadoc != null) {
      adopt((AbstractNode)javadoc);
    }
    if (this.javadoc != null) {
      disown(this.javadoc);
    }
    this.javadoc = ((AbstractNode)javadoc);
    return this;
  }
  
  public Modifiers astModifiers()
  {
    if (!(modifiers instanceof Modifiers)) {
      return null;
    }
    return (Modifiers)modifiers;
  }
  
  public AnnotationMethodDeclaration astModifiers(Modifiers modifiers)
  {
    return rawModifiers(modifiers);
  }
  
  private AnnotationMethodDeclaration rawModifiers(Node modifiers)
  {
    if (modifiers == this.modifiers) {
      return this;
    }
    if (modifiers != null) {
      adopt((AbstractNode)modifiers);
    }
    if (this.modifiers != null) {
      disown(this.modifiers);
    }
    this.modifiers = ((AbstractNode)modifiers);
    return this;
  }
  
  public TypeReference astReturnTypeReference()
  {
    if (!(returnTypeReference instanceof TypeReference)) {
      return null;
    }
    return (TypeReference)returnTypeReference;
  }
  
  public AnnotationMethodDeclaration astReturnTypeReference(TypeReference returnTypeReference)
  {
    if (returnTypeReference == null) {
      throw new NullPointerException("returnTypeReference is mandatory");
    }
    return rawReturnTypeReference(returnTypeReference);
  }
  
  public Node rawReturnTypeReference()
  {
    return returnTypeReference;
  }
  
  public AnnotationMethodDeclaration rawReturnTypeReference(Node returnTypeReference)
  {
    if (returnTypeReference == this.returnTypeReference) {
      return this;
    }
    if (returnTypeReference != null) {
      adopt((AbstractNode)returnTypeReference);
    }
    if (this.returnTypeReference != null) {
      disown(this.returnTypeReference);
    }
    this.returnTypeReference = ((AbstractNode)returnTypeReference);
    return this;
  }
  
  public Identifier astMethodName()
  {
    if (!(methodName instanceof Identifier)) {
      return null;
    }
    return (Identifier)methodName;
  }
  
  public AnnotationMethodDeclaration astMethodName(Identifier methodName)
  {
    return rawMethodName(methodName);
  }
  
  private AnnotationMethodDeclaration rawMethodName(Node methodName)
  {
    if (methodName == this.methodName) {
      return this;
    }
    if (methodName != null) {
      adopt((AbstractNode)methodName);
    }
    if (this.methodName != null) {
      disown(this.methodName);
    }
    this.methodName = ((AbstractNode)methodName);
    return this;
  }
  
  public Expression astDefaultValue()
  {
    if (!(defaultValue instanceof Expression)) {
      return null;
    }
    return (Expression)defaultValue;
  }
  
  public AnnotationMethodDeclaration astDefaultValue(Expression defaultValue)
  {
    return rawDefaultValue(defaultValue);
  }
  
  public Node rawDefaultValue()
  {
    return defaultValue;
  }
  
  public AnnotationMethodDeclaration rawDefaultValue(Node defaultValue)
  {
    if (defaultValue == this.defaultValue) {
      return this;
    }
    if (defaultValue != null) {
      adopt((AbstractNode)defaultValue);
    }
    if (this.defaultValue != null) {
      disown(this.defaultValue);
    }
    this.defaultValue = ((AbstractNode)defaultValue);
    return this;
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    if (javadoc != null) {
      result.add(javadoc);
    }
    if (modifiers != null) {
      result.add(modifiers);
    }
    if (returnTypeReference != null) {
      result.add(returnTypeReference);
    }
    if (methodName != null) {
      result.add(methodName);
    }
    if (defaultValue != null) {
      result.add(defaultValue);
    }
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (javadoc == original)
    {
      rawJavadoc(replacement);
      return true;
    }
    if (modifiers == original)
    {
      if ((replacement instanceof Modifiers))
      {
        astModifiers((Modifiers)replacement);
        return true;
      }
      throw new AstException(this, String.format("Cannot replace node: replacement must be of type %s but is of type %s", new Object[] { "Modifiers", replacement == null ? "null" : replacement.getClass().getName() }));
    }
    if (returnTypeReference == original)
    {
      rawReturnTypeReference(replacement);
      return true;
    }
    if (methodName == original)
    {
      if ((replacement instanceof Identifier))
      {
        astMethodName((Identifier)replacement);
        return true;
      }
      throw new AstException(this, String.format("Cannot replace node: replacement must be of type %s but is of type %s", new Object[] { "Identifier", replacement == null ? "null" : replacement.getClass().getName() }));
    }
    if (defaultValue == original)
    {
      rawDefaultValue(replacement);
      return true;
    }
    return false;
  }
  
  public boolean detach(Node child)
  {
    if (javadoc == child)
    {
      disown((AbstractNode)child);
      javadoc = null;
      return true;
    }
    if (modifiers == child)
    {
      disown((AbstractNode)child);
      modifiers = null;
      return true;
    }
    if (returnTypeReference == child)
    {
      disown((AbstractNode)child);
      returnTypeReference = null;
      return true;
    }
    if (methodName == child)
    {
      disown((AbstractNode)child);
      methodName = null;
      return true;
    }
    if (defaultValue == child)
    {
      disown((AbstractNode)child);
      defaultValue = null;
      return true;
    }
    return false;
  }
  
  public void accept(AstVisitor visitor)
  {
    if (visitor.visitAnnotationMethodDeclaration(this)) {
      return;
    }
    if (javadoc != null) {
      javadoc.accept(visitor);
    }
    if (modifiers != null) {
      modifiers.accept(visitor);
    }
    if (returnTypeReference != null) {
      returnTypeReference.accept(visitor);
    }
    if (methodName != null) {
      methodName.accept(visitor);
    }
    if (defaultValue != null) {
      defaultValue.accept(visitor);
    }
    visitor.endVisit(this);
  }
  
  public AnnotationMethodDeclaration copy()
  {
    AnnotationMethodDeclaration result = new AnnotationMethodDeclaration();
    if (javadoc != null) {
      result.rawJavadoc(javadoc.copy());
    }
    if (modifiers != null) {
      result.rawModifiers(modifiers.copy());
    }
    if (returnTypeReference != null) {
      result.rawReturnTypeReference(returnTypeReference.copy());
    }
    if (methodName != null) {
      result.rawMethodName(methodName.copy());
    }
    if (defaultValue != null) {
      result.rawDefaultValue(defaultValue.copy());
    }
    return result;
  }
  
  public String getDescription()
  {
    return AnnotationMethodDeclarationTemplate.getDescription(this);
  }
  
  public TypeDeclaration upUpToTypeDeclaration()
  {
    return TypeMemberMixin.upUpToTypeDeclaration(this);
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationMethodDeclaration
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import lombok.ast.template.ForcedType;

class AnnotationMethodDeclarationTemplate
{
  Comment javadoc1;
  @ForcedType
  Modifiers modifiers2;
  TypeReference returnTypeReference3;
  @ForcedType
  Identifier methodName4;
  Expression defaultValue5;
  
  static String getDescription(AnnotationMethodDeclaration self)
  {
    return self.astMethodName().astValue();
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationMethodDeclarationTemplate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import com.google.common.collect.ImmutableList;
import java.util.Iterator;
import java.util.List;

class AnnotationTemplate
{
  TypeReference annotationTypeReference1;
  List<AnnotationElement> elements2;
  
  static String getDescription(Annotation self)
  {
    try
    {
      return self.astAnnotationTypeReference().getDescription();
    }
    catch (NullPointerException e) {}
    return null;
  }
  
  static List<Node> getValueValues(Annotation self)
  {
    List<Node> result = getValues(self, null);
    return result.isEmpty() ? getValues(self, "value") : result;
  }
  
  static List<Node> getValues(Annotation self, String key)
  {
    AnnotationElement elem;
    for (Iterator i$ = self.astElements().iterator(); i$.hasNext(); return elem.getValues())
    {
      elem = (AnnotationElement)i$.next();
      if ((key == null) && (elem.astName() == null)) {
        return elem.getValues();
      }
      if ((key == null) || (elem.astName() == null) || (!elem.astName().astValue().equals(key))) {}
    }
    return ImmutableList.of();
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationTemplate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

public abstract interface AnnotationValue
  extends Node
{}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class AnnotationValueArray
  extends AbstractNode
  implements AnnotationValue
{
  ListAccessor<AnnotationValue, AnnotationValueArray> values = ListAccessor.of(this, AnnotationValue.class, "AnnotationValueArray");
  
  public RawListAccessor<AnnotationValue, AnnotationValueArray> rawValues()
  {
    return values.asRaw();
  }
  
  public StrictListAccessor<AnnotationValue, AnnotationValueArray> astValues()
  {
    return values.asStrict();
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    result.addAll(values.backingList());
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (rawValues().replace(original, replacement)) {
      return true;
    }
    return false;
  }
  
  public boolean detach(Node child)
  {
    if (rawValues().remove(child)) {
      return true;
    }
    return false;
  }
  
  public void accept(AstVisitor visitor)
  {
    if (visitor.visitAnnotationValueArray(this)) {
      return;
    }
    for (Node child : values.asIterable()) {
      child.accept(visitor);
    }
    visitor.endVisit(this);
  }
  
  public AnnotationValueArray copy()
  {
    AnnotationValueArray result = new AnnotationValueArray();
    for (Node n : values.backingList()) {
      result.rawValues().addToEnd(new Node[] { n == null ? null : n.copy() });
    }
    return result;
  }
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationValueArray
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.List;

class AnnotationValueArrayTemplate
{
  List<AnnotationValue> values1;
}

/* Location:
 * Qualified Name:     lombok.ast.AnnotationValueArrayTemplate
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

public class ArrayAccess
  extends AbstractNode
  implements Expression
{
  private List<Position> parensPositions = new ArrayList();
  private AbstractNode operand = null;
  private AbstractNode indexExpression = null;
  
  public List<Position> astParensPositions()
  {
    return parensPositions;
  }
  
  public Expression astOperand()
  {
    if (!(operand instanceof Expression)) {
      return null;
    }
    return (Expression)operand;
  }
  
  public ArrayAccess astOperand(Expression operand)
  {
    if (operand == null) {
      throw new NullPointerException("operand is mandatory");
    }
    return rawOperand(operand);
  }
  
  public Node rawOperand()
  {
    return operand;
  }
  
  public ArrayAccess rawOperand(Node operand)
  {
    if (operand == this.operand) {
      return this;
    }
    if (operand != null) {
      adopt((AbstractNode)operand);
    }
    if (this.operand != null) {
      disown(this.operand);
    }
    this.operand = ((AbstractNode)operand);
    return this;
  }
  
  public Expression astIndexExpression()
  {
    if (!(indexExpression instanceof Expression)) {
      return null;
    }
    return (Expression)indexExpression;
  }
  
  public ArrayAccess astIndexExpression(Expression indexExpression)
  {
    if (indexExpression == null) {
      throw new NullPointerException("indexExpression is mandatory");
    }
    return rawIndexExpression(indexExpression);
  }
  
  public Node rawIndexExpression()
  {
    return indexExpression;
  }
  
  public ArrayAccess rawIndexExpression(Node indexExpression)
  {
    if (indexExpression == this.indexExpression) {
      return this;
    }
    if (indexExpression != null) {
      adopt((AbstractNode)indexExpression);
    }
    if (this.indexExpression != null) {
      disown(this.indexExpression);
    }
    this.indexExpression = ((AbstractNode)indexExpression);
    return this;
  }
  
  public List<Node> getChildren()
  {
    List<Node> result = new ArrayList();
    if (operand != null) {
      result.add(operand);
    }
    if (indexExpression != null) {
      result.add(indexExpression);
    }
    return result;
  }
  
  public boolean replaceChild(Node original, Node replacement)
    throws AstException
  {
    if (operand == original)
    {
      rawOperand(replacement);
      return true;
    }
    if (indexExpression == original)
    {
      rawIndexExpression(replacement);
      return true;
    }
    return false;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd