Tabnine Logo
CachedMethod.getCachedMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
getCachedMethod
method
in
org.codehaus.groovy.reflection.CachedMethod

Best Java code snippets using org.codehaus.groovy.reflection.CachedMethod.getCachedMethod (Showing top 20 results out of 315)

origin: org.codehaus.groovy/groovy

private static boolean hasAnnotation(CachedMethod method, Class<Internal> annotationClass) {
  return method.getCachedMethod().getAnnotation(annotationClass) != null;
}
origin: spockframework/spock

 @Nullable
 public static Method toMethod(@Nullable MetaMethod metaMethod) {
  CachedMethod cachedMethod = ObjectUtil.asInstance(metaMethod, CachedMethod.class);
  return cachedMethod == null ? null : cachedMethod.getCachedMethod();
 }
}
origin: spockframework/spock

public static Method methodFor(MetaMethod method) {
 if (method instanceof CachedMethod)
  return ((CachedMethod) method).getCachedMethod();
 if (method instanceof ClosureMetaMethod)
  return ((ClosureMetaMethod) method).getDoCall().getCachedMethod();
 if (method instanceof ReflectionMetaMethod) {
  try {
   return ((CachedMethod) ReflectionMetaMethod_method.get(method)).getCachedMethod();
  } catch (IllegalAccessException e) {
   throw new UnreachableCodeError(e);
  }
 }
 
 // could try stunts for MixinInstanceMetaMethod and TransformMetaMethod or
 // even apply some general heuristics (e.g. look for field named "method" or
 // "metaMethod" (or with type Method/MetaMethod) and invoke methodFor()
 // recursively), but we won't do this for now
 return null;
}
origin: org.codehaus.groovy/groovy

if (Modifier.isStatic(mod) && Modifier.isPublic(mod) && method.getCachedMethod().getAnnotation(Deprecated.class) == null) {
  CachedClass[] paramTypes = method.getParameterTypes();
  if (paramTypes.length > 0) {
origin: org.codehaus.groovy/groovy

  continue;
if (method.getCachedMethod().getAnnotation(Deprecated.class) != null)
  continue;
origin: org.codehaus.groovy/groovy

isVargs = cm.isVargsMethod();
try {
  Method m = cm.getCachedMethod();
  handle = correctClassForNameAndUnReflectOtherwise(m);
  if (LOG_ENABLED) LOG.info("successfully unreflected method");
origin: org.codehaus.groovy/groovy

  continue;
if (method instanceof CachedMethod && ((CachedMethod) method).getCachedMethod().isSynthetic())
  continue;
origin: org.grails/grails-datastore-core

protected void addBeanProperty(List<PropertyDescriptor> propertyDescriptors, MetaProperty property) {
  if(property instanceof MetaBeanProperty) {
    MetaBeanProperty beanProperty = (MetaBeanProperty) property;
    MetaMethod getter = beanProperty.getGetter();
    MetaMethod setter = beanProperty.getSetter();
    boolean isGetterCachedMethod = getter instanceof CachedMethod;
    if(isGetterCachedMethod && setter instanceof CachedMethod) {
      CachedMethod cachedGetter = (CachedMethod) getter;
      CachedMethod cachedSetter = (CachedMethod) setter;
      try {
        propertyDescriptors.add(new PropertyDescriptor(beanProperty.getName(), cachedGetter.getCachedMethod(), cachedSetter.getCachedMethod()));
      } catch (IntrospectionException e) {
        // ignore
      }
    }
    else if(isGetterCachedMethod) {
      CachedMethod cachedGetter = (CachedMethod) getter;
      try {
        propertyDescriptors.add(new PropertyDescriptor(beanProperty.getName(), cachedGetter.getCachedMethod(), null));
      } catch (IntrospectionException e) {
        // ignore
      }
    }
  }
}
origin: com.disney.groovity/groovity-core

public static final <T extends Annotation> T getAnnotation(MetaProperty mp, Class<T> annotationClass) {
  if(mp instanceof MetaBeanProperty) {
    MetaBeanProperty mbp = (MetaBeanProperty) mp;
    MetaMethod mm = mbp.getGetter();
    if(mm instanceof CachedMethod) {
      CachedMethod cm = (CachedMethod) mm;
      T anno = cm.getCachedMethod().getAnnotation(annotationClass);
      if(anno!=null) {
        return anno;
      }
    }
    CachedField cf = mbp.getField();
    if(cf != null) {
      return cf.field.getAnnotation(annotationClass);
    }
  }
  return null;
}

origin: disney/groovity

public static final <T extends Annotation> T getAnnotation(MetaProperty mp, Class<T> annotationClass) {
  if(mp instanceof MetaBeanProperty) {
    MetaBeanProperty mbp = (MetaBeanProperty) mp;
    MetaMethod mm = mbp.getGetter();
    if(mm instanceof CachedMethod) {
      CachedMethod cm = (CachedMethod) mm;
      T anno = cm.getCachedMethod().getAnnotation(annotationClass);
      if(anno!=null) {
        return anno;
      }
    }
    CachedField cf = mbp.getField();
    if(cf != null) {
      return cf.field.getAnnotation(annotationClass);
    }
  }
  return null;
}

origin: org.grails/grails-datastore-core

if(getter instanceof CachedMethod && setter instanceof CachedMethod) {
  try {
    Method getterMethod = ((CachedMethod) getter).getCachedMethod();
    Method setterMethod = ((CachedMethod) setter).getCachedMethod();
    if(getterMethod.getReturnType().equals(setterMethod.getParameterTypes()[0])) {
      return new PropertyDescriptor(propertyName, getterMethod, setterMethod);
    return new PropertyDescriptor(propertyName, ((CachedMethod) getter).getCachedMethod(), null);
  } catch (IntrospectionException e) {
    return null;
origin: com.disney.groovity/groovity-core

MetaMethod mm = mbp.getGetter();
if(mm instanceof CachedMethod) {
  type = ((CachedMethod)mm).getCachedMethod().getGenericReturnType();
origin: disney/groovity

MetaMethod mm = mbp.getGetter();
if(mm instanceof CachedMethod) {
  type = ((CachedMethod)mm).getCachedMethod().getGenericReturnType();
origin: com.disney.groovity/groovity-core

if(getter instanceof CachedMethod) {
  CachedMethod cm = (CachedMethod)getter;
  ModelSkip skipAnn = cm.getCachedMethod().getAnnotation(ModelSkip.class);
  if(skipAnn!=null) {
    continue;
    continue;
  if(!cm.getCachedMethod().getDeclaringClass().equals(c)) {
      Method override = c.getDeclaredMethod(cm.getCachedMethod().getName(), cm.getCachedMethod().getParameterTypes());
      if(override.getAnnotation(ModelSkip.class) !=null) {
        continue;
origin: disney/groovity

if(getter instanceof CachedMethod) {
  CachedMethod cm = (CachedMethod)getter;
  ModelSkip skipAnn = cm.getCachedMethod().getAnnotation(ModelSkip.class);
  if(skipAnn!=null) {
    continue;
    continue;
  if(!cm.getCachedMethod().getDeclaringClass().equals(c)) {
      Method override = c.getDeclaredMethod(cm.getCachedMethod().getName(), cm.getCachedMethod().getParameterTypes());
      if(override.getAnnotation(ModelSkip.class) !=null) {
        continue;
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

if (Modifier.isStatic(mod) && Modifier.isPublic(mod) && method.getCachedMethod().getAnnotation(Deprecated.class) == null) {
  CachedClass[] paramTypes = method.getParameterTypes();
  if (paramTypes.length > 0) {
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

  continue;
if (method.getCachedMethod().getAnnotation(Deprecated.class) != null)
  continue;
origin: org.kohsuke.droovy/groovy

  continue;
if (method instanceof CachedMethod && ((CachedMethod)method).getCachedMethod().isSynthetic())
 continue;
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

  continue;
if (method instanceof CachedMethod && ((CachedMethod) method).getCachedMethod().isSynthetic())
  continue;
origin: org.codehaus.groovy/groovy-jdk14

  continue;
if (method instanceof CachedMethod && ((CachedMethod)method).getCachedMethod().isSynthetic())
 continue;
org.codehaus.groovy.reflectionCachedMethodgetCachedMethod

Popular methods of CachedMethod

  • <init>
  • find
  • isStatic
  • setAccessible
  • compareTo
  • compareToCachedMethod
  • compareToMethod
  • getDeclaringClass
  • getDescriptor
  • getModifiers
  • getName
  • getNativeParameterTypes
  • getName,
  • getNativeParameterTypes,
  • getParameterTypes,
  • getReturnType,
  • toString,
  • correctArguments,
  • createPogoMetaMethodSite,
  • createPojoMetaMethodSite,
  • createStaticMetaMethodSite

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • startActivity (Activity)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTable (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now