private boolean hasSharedAnnotation(JMethod method) { JClassType enclosingType = method.getEnclosingType(); Shared shared = enclosingType.getAnnotation(Shared.class); return shared != null; } }
/** * Returns the import prefix for a type, including the trailing hyphen. */ public static String getImportPrefix(JClassType importType) { String prefix = importType.getSimpleSourceName(); ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class); if (exp != null) { prefix = exp.value(); } return prefix + "-"; }
/** * Returns the import prefix for a type, including the trailing hyphen. */ public static String getImportPrefix(JClassType importType) { String prefix = importType.getSimpleSourceName(); ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class); if (exp != null) { prefix = exp.value(); } return prefix + "-"; }
Shared shared = type.getAnnotation(Shared.class); if (shared != null) { replacementsForSharedMethods.put(method, obfuscatedClassName);
/** * @param type the type to query * @return true if the type is annotated with @Entity */ static boolean hasJpaAnnotation(JClassType type) { if (JPA_ENTITY_ANNOTATION == null) { return false; } Annotation annotation = type.getAnnotation(JPA_ENTITY_ANNOTATION); return annotation != null; }
private void maybeHandleSharedMethod(JMethod method, String obfuscatedClassName) { JClassType enclosingType = method.getEnclosingType(); Shared shared = enclosingType.getAnnotation(Shared.class); if (shared != null) { replacementsForSharedMethods.put(method, obfuscatedClassName); } } }
protected String getRemoteServiceRelativePath() { RemoteServiceRelativePath moduleRelativeURL = serviceIntf.getAnnotation(RemoteServiceRelativePath.class); if (moduleRelativeURL != null) { return "\"" + moduleRelativeURL.value() + "\""; } return null; }
@Override public void createDelegates(JClassType injectableType, Collection<InjectorCreatorDelegate> delegates) { if (injectableType.getAnnotation(Templated.class) != null) { delegates.add(new InjectTemplateCreator(injectableType)); } }
protected String getRemoteServiceRelativePath() { RemoteServiceRelativePath moduleRelativeURL = serviceIntf.getAnnotation(RemoteServiceRelativePath.class); if (moduleRelativeURL != null) { return "\"" + moduleRelativeURL.value() + "\""; } return null; }
@Override public void createDelegates(JClassType injectableType, Collection<InjectorCreatorDelegate> delegates) { Secured securedAnnotation = injectableType.getAnnotation(Secured.class); if (securedAnnotation != null) { delegates.add(new InjectSecuritedCreator(securedAnnotation)); } }
@Override public void createDelegates(JClassType injectableType, Collection<InjectorCreatorDelegate> delegates) { if (injectableType.getAnnotation(Templated.class) != null) { delegates.add(new InjectTemplateCreator(injectableType)); } }
@Override public void createDelegates(JClassType injectableType, Collection<InjectorCreatorDelegate> delegates) { Secured securedAnnotation = injectableType.getAnnotation(Secured.class); if (securedAnnotation != null) { delegates.add(new InjectSecuritedCreator(securedAnnotation)); } }
private boolean hasSharedAnnotation(JMethod method) { JClassType enclosingType = method.getEnclosingType(); Shared shared = enclosingType.getAnnotation(Shared.class); return shared != null; } }
/** * Returns the import prefix for a type, including the trailing hyphen. */ public static String getImportPrefix(JClassType importType) { String prefix = importType.getSimpleSourceName(); ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class); if (exp != null) { prefix = exp.value(); } return prefix + "-"; }
/** * Returns the import prefix for a type, including the trailing hyphen. */ public static String getImportPrefix(JClassType importType) { String prefix = importType.getSimpleSourceName(); ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class); if (exp != null) { prefix = exp.value(); } return prefix + "-"; }
/** * Returns the import prefix for a type, including the trailing hyphen. */ public static String getImportPrefix(JClassType importType) { String prefix = importType.getSimpleSourceName(); ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class); if (exp != null) { prefix = exp.value(); } return prefix + "-"; }
private String getAnnotatedParserForClass(JClassType uiClass) { String parserClassName = null; if (uiClass.isAnnotationPresent(ElementParserToUse.class)) { String uiClassName = uiClass.getQualifiedSourceName(); parserClassName = uiClass.getAnnotation(ElementParserToUse.class).className(); elementParsers.put(uiClassName, parserClassName); } return parserClassName; } // laaglu
protected boolean isDebug(JClassType type, int memberType) { ReflectionStrategy strategy = type.getAnnotation(ReflectionStrategy.class); if (strategy == null) { strategy = type.getPackage().getAnnotation(ReflectionStrategy.class); } if (strategy == null) { return false; } return (strategy.debug() & memberType) > 0; }
private String getPrefixForTokenizerType(JClassType returnType) throws UnableToCompleteException { Prefix annotation; annotation = returnType.getAnnotation(Prefix.class); if (annotation != null) { return annotation.value(); } return getPlaceTypeForTokenizerType(returnType).getName(); }
protected boolean isDebug(final JClassType type, final int memberType) { ReflectionStrategy strategy = type.getAnnotation(ReflectionStrategy.class); if (strategy == null) { strategy = type.getPackage().getAnnotation(ReflectionStrategy.class); } if (strategy == null) { return false; } return (strategy.debug() & memberType) > 0; }