Codota Logo
ClassNode.getColumnNumber
Code IndexAdd Codota to your IDE (free)

How to use
getColumnNumber
method
in
org.codehaus.groovy.ast.ClassNode

Best Java code snippets using org.codehaus.groovy.ast.ClassNode.getColumnNumber (Showing top 8 results out of 315)

  • Common ways to obtain ClassNode
private void myMethod () {
ClassNode c =
  • Codota IconExpression expression;expression.getType()
  • Codota IconMethodNode methodNode;methodNode.getReturnType()
  • Codota IconString name;ClassHelper.make(name)
  • Smart code suggestions by Codota
}
origin: org.codehaus.groovy/groovy

private static void checkTraitAllowed(final ClassNode bottomTrait, final SourceUnit unit) {
  ClassNode superClass = bottomTrait.getSuperClass();
  if (superClass==null || ClassHelper.OBJECT_TYPE.equals(superClass)) return;
  if (!Traits.isTrait(superClass)) {
    unit.addError(new SyntaxException("A trait can only inherit from another trait", superClass.getLineNumber(), superClass.getColumnNumber()));
  }
}
origin: org.codehaus.groovy/groovy

    new SyntaxErrorMessage(new SyntaxException(txt, node.getLineNumber(), node.getColumnNumber(), node.getLastLineNumber(), node.getLastColumnNumber()), nodeSource)
);
origin: palantir/language-servers

/**
 * Creates a location which goes from the given node's starting position to at most one line after.
 */
public static Location createClassDefinitionLocation(URI uri, ClassNode node) {
  Range range;
  // This takes care of the edge case where the class is defined on one line.
  if (node.getLineNumber() == node.getLastLineNumber()) {
    range = Ranges.createZeroBasedRange(node.getLineNumber(), node.getColumnNumber(), node.getLastLineNumber(),
        node.getLastColumnNumber());
  } else {
    range = Ranges.createZeroBasedRange(node.getLineNumber(), node.getColumnNumber(),
        Math.min(node.getLineNumber() + 1, node.getLastLineNumber()),
        Math.min(1, node.getLastColumnNumber()));
  }
  return new Location(uri.toString(), range);
}
origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

private void addClassNodeOccurrences(ClassNode visitedNode, ClassNode findingNode) {
  final String findingName = ElementUtils.getTypeName(findingNode);
  final ClassNode superClass = visitedNode.getUnresolvedSuperClass(false);
  final ClassNode[] interfaces = visitedNode.getInterfaces();
  // Check if the caret is on the ClassNode itself
  if (findingName.equals(visitedNode.getName())) {
    occurrences.add(new FakeASTNode(visitedNode, visitedNode.getNameWithoutPackage()));
  }
  // Check if the caret is on the parent type
  if (superClass.getLineNumber() > 0 && superClass.getColumnNumber() > 0) {
    if (findingName.equals(superClass.getName())) {
      occurrences.add(new FakeASTNode(superClass, superClass.getNameWithoutPackage()));
    }
  }
  // Check all implemented interfaces
  for (ClassNode interfaceNode : interfaces) {
    if (interfaceNode.getLineNumber() > 0 && interfaceNode.getColumnNumber() > 0) {
      if (findingName.equals(interfaceNode.getName())) {
        occurrences.add(new FakeASTNode(interfaceNode, interfaceNode.getNameWithoutPackage()));
      }
    }
  }
  // Check all class level annotations
  for (AnnotationNode annotation : visitedNode.getAnnotations(findingNode)) {
    addAnnotationOccurrences(annotation, findingNode);
  }
}

origin: org.codehaus.groovy/groovy-all-minimal

    new SyntaxErrorMessage(new SyntaxException(txt, node.getLineNumber(), node.getColumnNumber()), nodeSource)
);
origin: org.kohsuke.droovy/groovy

    new SyntaxErrorMessage(new SyntaxException(txt, node.getLineNumber(), node.getColumnNumber()), nodeSource)
);
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

    new SyntaxErrorMessage(new SyntaxException(txt, node.getLineNumber(), node.getColumnNumber()), nodeSource)
);
origin: org.codehaus.groovy/groovy-jdk14

    new SyntaxErrorMessage(new SyntaxException(txt, node.getLineNumber(), node.getColumnNumber()), nodeSource)
);
org.codehaus.groovy.astClassNodegetColumnNumber

Popular methods of ClassNode

  • getName
  • getMethods
    This methods creates a list of all methods with this name of the current class and of all super clas
  • <init>
    Constructor used by makeArray() if no real class is available
  • getSuperClass
  • equals
  • addMethod
  • getAnnotations
  • addField
  • getFields
    Returns a list containing FieldNode objects for each field in the class represented by this ClassNod
  • getPlainNodeReference
  • getField
    Finds a field matching the given name in this class or a parent class.
  • getMethod
    Finds a method matching the given name and parameters in this class or any parent class.
  • getField,
  • getMethod,
  • isInterface,
  • getNameWithoutPackage,
  • isScript,
  • getDeclaredMethod,
  • getGenericsTypes,
  • getDeclaredConstructors,
  • getModifiers,
  • getTypeClass

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • orElseThrow (Optional)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JTextField (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now