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

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

Best Java code snippets using org.codehaus.groovy.ast.ClassNode.getPackage (Showing top 11 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

public static boolean inSamePackage(ClassNode first, ClassNode second) {
  PackageNode firstPackage = first.getPackage();
  PackageNode secondPackage = second.getPackage();
  return ((firstPackage == null && secondPackage == null) ||
          firstPackage != null && secondPackage != null && firstPackage.getName().equals(secondPackage.getName()));
}
origin: org.codehaus.groovy/groovy

setAnnotationMetaData(classNode.getTypeClass().getAnnotations(), classNode);
PackageNode packageNode = classNode.getPackage();
if (packageNode != null) {
  setAnnotationMetaData(classNode.getTypeClass().getPackage().getAnnotations(), packageNode);
origin: org.codehaus.groovy/groovy

public void visitClass(ClassNode node) {
  visitAnnotations(node);
  visitPackage(node.getPackage());
  visitImports(node.getModule());
  node.visitContents(this);
  visitObjectInitializerStatements(node);
}

origin: org.codehaus.groovy/groovy

public void visitClass(ClassNode node) {
  AnnotationConstantsVisitor acv = new AnnotationConstantsVisitor();
  acv.visitClass(node, this.source);
  this.currentClass = node;
  if (node.isAnnotationDefinition()) {
    visitAnnotations(node, AnnotationNode.ANNOTATION_TARGET);
  } else {
    visitAnnotations(node, AnnotationNode.TYPE_TARGET);
  }
  PackageNode packageNode = node.getPackage();
  if (packageNode != null) {
    visitAnnotations(packageNode, AnnotationNode.PACKAGE_TARGET);
  }
  node.visitContents(this);
}
origin: org.codehaus.groovy/groovy

PackageNode packageNode = classNode.getPackage();
if (packageNode != null) {
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public void visitClass(ClassNode node) {
  this.currentClass = node;
  if (node.isAnnotationDefinition()) {
    visitAnnotations(node, AnnotationNode.ANNOTATION_TARGET);
  } else {
    visitAnnotations(node, AnnotationNode.TYPE_TARGET);
  }
  PackageNode packageNode = node.getPackage();
  if (packageNode != null) {
    visitAnnotations(packageNode, AnnotationNode.PACKAGE_TARGET);
  }
  node.visitContents(this);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

setAnnotationMetaData(classNode.getTypeClass().getAnnotations(), classNode);
PackageNode packageNode = classNode.getPackage();
if (packageNode != null) {
  setAnnotationMetaData(classNode.getTypeClass().getPackage().getAnnotations(), packageNode);
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public void visitClass(ClassNode node) {
  visitAnnotations(node);
  visitPackage(node.getPackage());
  visitImports(node.getModule());
  node.visitContents(this);
  visitObjectInitializerStatements(node);
}

origin: com.disney.groovity/groovity-core

public void visitClass(ClassNode classNode){
  this.classNode = classNode;
  traitName = null;
  classNodeName = getClassLabel(classNode);
  apiSkipStats = new HashSet<>();
  crawlParents(classNode, new HashSet<>());
  visitAnnotations(classNode);
  visitPackage(classNode.getPackage());
  visitImports(classNode.getModule());
  
  for (MethodNode mn : classNode.getMethods()) {
    visitMethod(mn);
  }
  
  for (ConstructorNode cn : classNode.getDeclaredConstructors()) {
    visitConstructor(cn);
  }
  
  for (PropertyNode pn : classNode.getProperties()) {
    visitProperty(pn);
  }
  
  //for (FieldNode fn : classNode.getFields()) {
  //    visitField(fn);
  //}
  
  visitObjectInitializerStatements(classNode);
}
origin: disney/groovity

public void visitClass(ClassNode classNode){
  this.classNode = classNode;
  traitName = null;
  classNodeName = getClassLabel(classNode);
  apiSkipStats = new HashSet<>();
  crawlParents(classNode, new HashSet<>());
  visitAnnotations(classNode);
  visitPackage(classNode.getPackage());
  visitImports(classNode.getModule());
  
  for (MethodNode mn : classNode.getMethods()) {
    visitMethod(mn);
  }
  
  for (ConstructorNode cn : classNode.getDeclaredConstructors()) {
    visitConstructor(cn);
  }
  
  for (PropertyNode pn : classNode.getProperties()) {
    visitProperty(pn);
  }
  
  //for (FieldNode fn : classNode.getFields()) {
  //    visitField(fn);
  //}
  
  visitObjectInitializerStatements(classNode);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

cv.visitSource(sourceFile, null);
if (classNode.getName().endsWith("package-info")) {
  PackageNode packageNode = classNode.getPackage();
  if (packageNode != null) {
org.codehaus.groovy.astClassNodegetPackage

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

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • ImageIO (javax.imageio)
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
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