repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
contentful/discovery-app-android
app/src/main/java/discovery/contentful/adapters/AssetInfoAdapter.java
// Path: app/src/main/java/discovery/contentful/CFApp.java // public class CFApp extends Application { // public static CFApp sInstance; // // @Override // public void onCreate() { // super.onCreate(); // // sInstance = this; // } // // public static CFApp getInstance() { // return sInstance; /...
import android.content.Context; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import discovery.contentful.CFApp; import discovery.contentful.R; import discovery.contentful.ui.FieldViewHolder; import discovery.con...
} @Override public Pair<String, String> getItem(int position) { return fields.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { FieldViewHolder vh; if (convertView == null) { ...
// Path: app/src/main/java/discovery/contentful/CFApp.java // public class CFApp extends Application { // public static CFApp sInstance; // // @Override // public void onCreate() { // super.onCreate(); // // sInstance = this; // } // // public static CFApp getInstance() { // return sInstance; /...
ViewHelper.setVisibility(vh.ivArrow, clickable);
contentful/discovery-app-android
app/src/main/java/discovery/contentful/activities/MapActivity.java
// Path: app/src/main/java/discovery/contentful/utils/IntentConsts.java // public class IntentConsts { // private IntentConsts() { // } // // public static final String PACKAGE_NAME = CFApp.getInstance().getPackageName(); // // public static final String EXTRA_SPACE = PACKAGE_NAME + ".EXTRA_SPACE"; // publi...
import android.content.Intent; import android.os.Bundle; import discovery.contentful.R; import discovery.contentful.utils.IntentConsts; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.g...
package discovery.contentful.activities; public class MapActivity extends CFFragmentActivity implements OnMapReadyCallback { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_map); SupportMapFragment mapFragment = (Suppo...
// Path: app/src/main/java/discovery/contentful/utils/IntentConsts.java // public class IntentConsts { // private IntentConsts() { // } // // public static final String PACKAGE_NAME = CFApp.getInstance().getPackageName(); // // public static final String EXTRA_SPACE = PACKAGE_NAME + ".EXTRA_SPACE"; // publi...
LatLng latLng = intent.getParcelableExtra(IntentConsts.EXTRA_LOCATION);
contentful/discovery-app-android
app/src/main/java/discovery/contentful/preview/PreviewViewFactory.java
// Path: app/src/main/java/discovery/contentful/ui/DisplayItem.java // public class DisplayItem { // public String key; // public String displayValue; // public String fieldType; // public CDAResource resource; // public String imageURI; // public LatLng location; // // // Array // public List<Object> ...
import android.content.Context; import android.support.annotation.LayoutRes; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import discovery.contentful.ui.DisplayItem;
package discovery.contentful.preview; public abstract class PreviewViewFactory<T extends AbsViewHolder> { @SuppressWarnings("unchecked")
// Path: app/src/main/java/discovery/contentful/ui/DisplayItem.java // public class DisplayItem { // public String key; // public String displayValue; // public String fieldType; // public CDAResource resource; // public String imageURI; // public LatLng location; // // // Array // public List<Object> ...
public T getView(Context context, View convertView, ViewGroup parent, DisplayItem displayItem,
contentful/discovery-app-android
app/src/main/java/discovery/contentful/loaders/ResourceArrayLoader.java
// Path: app/src/main/java/discovery/contentful/api/ResourceList.java // public class ResourceList { // public List<CDAResource> resources; // public Map<String, CDAContentType> contentTypes; // }
import discovery.contentful.api.ResourceList; import com.contentful.java.cda.CDAClient; import com.contentful.java.cda.CDAResource; import java.util.ArrayList;
package discovery.contentful.loaders; public class ResourceArrayLoader extends AbsResourceListLoader { private final ArrayList<Object> resources; public ResourceArrayLoader(ArrayList<Object> resources) { super(); this.resources = resources; }
// Path: app/src/main/java/discovery/contentful/api/ResourceList.java // public class ResourceList { // public List<CDAResource> resources; // public Map<String, CDAContentType> contentTypes; // } // Path: app/src/main/java/discovery/contentful/loaders/ResourceArrayLoader.java import discovery.contentful.api.Reso...
@Override protected ResourceList performLoad(CDAClient client) {
contentful/discovery-app-android
app/src/main/java/discovery/contentful/adapters/TutorialAdapter.java
// Path: app/src/main/java/discovery/contentful/loaders/TutorialLoader.java // public class TutorialLoader extends AbsAsyncTaskLoader<TutorialLoader.Tutorial> { // @Override protected Tutorial performLoad() { // try { // Tutorial tmp = new Tutorial(); // CDAEntry entry = CFDiscoveryClient.getClient()....
import android.content.Context; import android.support.v4.view.PagerAdapter; import android.view.View; import android.view.ViewGroup; import discovery.contentful.loaders.TutorialLoader; import discovery.contentful.ui.TutorialView;
package discovery.contentful.adapters; public class TutorialAdapter extends PagerAdapter { private static final int POS_VIDEO = 0; private Context context;
// Path: app/src/main/java/discovery/contentful/loaders/TutorialLoader.java // public class TutorialLoader extends AbsAsyncTaskLoader<TutorialLoader.Tutorial> { // @Override protected Tutorial performLoad() { // try { // Tutorial tmp = new Tutorial(); // CDAEntry entry = CFDiscoveryClient.getClient()....
private TutorialLoader.Tutorial tutorial;
contentful/discovery-app-android
app/src/main/java/discovery/contentful/adapters/TutorialAdapter.java
// Path: app/src/main/java/discovery/contentful/loaders/TutorialLoader.java // public class TutorialLoader extends AbsAsyncTaskLoader<TutorialLoader.Tutorial> { // @Override protected Tutorial performLoad() { // try { // Tutorial tmp = new Tutorial(); // CDAEntry entry = CFDiscoveryClient.getClient()....
import android.content.Context; import android.support.v4.view.PagerAdapter; import android.view.View; import android.view.ViewGroup; import discovery.contentful.loaders.TutorialLoader; import discovery.contentful.ui.TutorialView;
package discovery.contentful.adapters; public class TutorialAdapter extends PagerAdapter { private static final int POS_VIDEO = 0; private Context context; private TutorialLoader.Tutorial tutorial; private Listener listener; public interface Listener { void onVideoClicked(); } public TutorialAdap...
// Path: app/src/main/java/discovery/contentful/loaders/TutorialLoader.java // public class TutorialLoader extends AbsAsyncTaskLoader<TutorialLoader.Tutorial> { // @Override protected Tutorial performLoad() { // try { // Tutorial tmp = new Tutorial(); // CDAEntry entry = CFDiscoveryClient.getClient()....
TutorialView tutorialView = new TutorialView(context);
contentful/discovery-app-android
app/src/main/java/discovery/contentful/loaders/AbsResourceListLoader.java
// Path: app/src/main/java/discovery/contentful/api/CFClient.java // public class CFClient { // private static CDAClient sInstance; // private static String locale; // // private CFClient() { // } // // /** // * Initialize this client. // * // * @param space String representing the Space key. // ...
import discovery.contentful.api.CFClient; import discovery.contentful.api.ResourceList; import com.contentful.java.cda.CDAArray; import com.contentful.java.cda.CDAClient; import com.contentful.java.cda.CDAContentType; import com.contentful.java.cda.CDAResource; import java.util.HashMap; import retrofit.RetrofitError;
package discovery.contentful.loaders; public abstract class AbsResourceListLoader extends AbsAsyncTaskLoader<ResourceList> { @Override protected ResourceList performLoad() {
// Path: app/src/main/java/discovery/contentful/api/CFClient.java // public class CFClient { // private static CDAClient sInstance; // private static String locale; // // private CFClient() { // } // // /** // * Initialize this client. // * // * @param space String representing the Space key. // ...
CDAClient client = CFClient.getClient();
contentful/discovery-app-android
app/src/main/java/discovery/contentful/loaders/AssetsLoader.java
// Path: app/src/main/java/discovery/contentful/api/CFClient.java // public class CFClient { // private static CDAClient sInstance; // private static String locale; // // private CFClient() { // } // // /** // * Initialize this client. // * // * @param space String representing the Space key. // ...
import discovery.contentful.api.CFClient; import com.contentful.java.cda.CDAAsset; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.util.ArrayList; import retrofit.RetrofitError;
package discovery.contentful.loaders; public class AssetsLoader extends AbsAsyncTaskLoader<ArrayList<CDAAsset>> { private static Gson gson; public AssetsLoader() { super(); if (gson == null) { gson = new GsonBuilder().create(); } } @Override protected ArrayList<CDAAsset> performLoad() { ...
// Path: app/src/main/java/discovery/contentful/api/CFClient.java // public class CFClient { // private static CDAClient sInstance; // private static String locale; // // private CFClient() { // } // // /** // * Initialize this client. // * // * @param space String representing the Space key. // ...
return new ArrayList<>(CFClient.getClient().fetch(CDAAsset.class).all().assets().values());
contentful/discovery-app-android
app/src/main/java/discovery/contentful/preview/EntryListAdapter.java
// Path: app/src/main/java/discovery/contentful/ui/FieldViewHolder.java // public class FieldViewHolder { // public @Bind(R.id.tv_title) CFTextView tvTitle; // public @Bind(R.id.tv_value) CFTextView tvValue; // public @Bind(R.id.iv_arrow) ImageView ivArrow; // // public FieldViewHolder(View v) { // ButterK...
import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import discovery.contentful.R; import discovery.contentful.ui.FieldViewHolder; import discovery.contentful.utils.ViewHelper; import com.contentful.java.cda.CDAContentType; import com.contentful.ja...
package discovery.contentful.preview; public class EntryListAdapter extends BaseAdapter { private final Context context; private final CDAEntry entry; private final List<CDAField> contentTypeFields; public EntryListAdapter(Context context, CDAEntry entry, CDAContentType contentType) { this.context = cont...
// Path: app/src/main/java/discovery/contentful/ui/FieldViewHolder.java // public class FieldViewHolder { // public @Bind(R.id.tv_title) CFTextView tvTitle; // public @Bind(R.id.tv_value) CFTextView tvValue; // public @Bind(R.id.iv_arrow) ImageView ivArrow; // // public FieldViewHolder(View v) { // ButterK...
FieldViewHolder vh;
contentful/discovery-app-android
app/src/main/java/discovery/contentful/preview/EntryListAdapter.java
// Path: app/src/main/java/discovery/contentful/ui/FieldViewHolder.java // public class FieldViewHolder { // public @Bind(R.id.tv_title) CFTextView tvTitle; // public @Bind(R.id.tv_value) CFTextView tvValue; // public @Bind(R.id.iv_arrow) ImageView ivArrow; // // public FieldViewHolder(View v) { // ButterK...
import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import discovery.contentful.R; import discovery.contentful.ui.FieldViewHolder; import discovery.contentful.utils.ViewHelper; import com.contentful.java.cda.CDAContentType; import com.contentful.ja...
@Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { FieldViewHolder vh; if (convertView == null) { convertView = View.inflate(context, R.layout.view_field, null); convertView.setTag(vh = new FieldVi...
// Path: app/src/main/java/discovery/contentful/ui/FieldViewHolder.java // public class FieldViewHolder { // public @Bind(R.id.tv_title) CFTextView tvTitle; // public @Bind(R.id.tv_value) CFTextView tvValue; // public @Bind(R.id.iv_arrow) ImageView ivArrow; // // public FieldViewHolder(View v) { // ButterK...
ViewHelper.setVisibility(vh.ivArrow, value != null && isClickableFieldType(fieldType));
ghillert/botanic-ng
src/main/java/com/hillert/botanic/service/DefaultPictureService.java
// Path: src/main/java/com/hillert/botanic/dao/ImageRepository.java // public interface ImageRepository extends CrudRepository<Image, Long>, ImageRepositoryCustom { // } // // Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private String name...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import com.hillert.bo...
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/dao/ImageRepository.java // public interface ImageRepository extends CrudRepository<Image, Long>, ImageRepositoryCustom { // } // // Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private String name...
private ImageRepository imageRepository;
ghillert/botanic-ng
src/main/java/com/hillert/botanic/service/DefaultPictureService.java
// Path: src/main/java/com/hillert/botanic/dao/ImageRepository.java // public interface ImageRepository extends CrudRepository<Image, Long>, ImageRepositoryCustom { // } // // Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private String name...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import com.hillert.bo...
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/dao/ImageRepository.java // public interface ImageRepository extends CrudRepository<Image, Long>, ImageRepositoryCustom { // } // // Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private String name...
final Image image = imageRepository.findRandomImage();
ghillert/botanic-ng
src/main/java/com/hillert/botanic/controller/AuthenticationController.java
// Path: src/main/java/com/hillert/botanic/controller/dto/AuthenticationRequest.java // public class AuthenticationRequest { // // private String username; // private String password; // // public AuthenticationRequest() { // super(); // } // // public AuthenticationRequest(String username, String password) {...
import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.authentication.AuthenticationManager; imp...
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/controller/dto/AuthenticationRequest.java // public class AuthenticationRequest { // // private String username; // private String password; // // public AuthenticationRequest() { // super(); // } // // public AuthenticationRequest(String username, String password) {...
public AuthenticationToken info() {
ghillert/botanic-ng
src/main/java/com/hillert/botanic/controller/AuthenticationController.java
// Path: src/main/java/com/hillert/botanic/controller/dto/AuthenticationRequest.java // public class AuthenticationRequest { // // private String username; // private String password; // // public AuthenticationRequest() { // super(); // } // // public AuthenticationRequest(String username, String password) {...
import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.authentication.AuthenticationManager; imp...
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/controller/dto/AuthenticationRequest.java // public class AuthenticationRequest { // // private String username; // private String password; // // public AuthenticationRequest() { // super(); // } // // public AuthenticationRequest(String username, String password) {...
@RequestBody AuthenticationRequest authenticationRequest,
ghillert/botanic-ng
src/main/java/com/hillert/botanic/dao/jpa/ImageRepositoryImpl.java
// Path: src/main/java/com/hillert/botanic/dao/ImageRepositoryCustom.java // @NoRepositoryBean // public interface ImageRepositoryCustom { // // Image findRandomImage(); // // } // // Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private ...
import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.stereotype.Repository; import com.hillert.botanic.dao.ImageRepositoryCustom; import com.hillert.botanic.model.Image;
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/dao/ImageRepositoryCustom.java // @NoRepositoryBean // public interface ImageRepositoryCustom { // // Image findRandomImage(); // // } // // Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private ...
public Image findRandomImage() {
ghillert/botanic-ng
src/test/java/com/hillert/botanic/controller/BaseControllerTests.java
// Path: src/main/java/com/hillert/botanic/MainApp.java // @SpringBootApplication // public class MainApp { // // public static final String GZIP_COMPRESSION_MIME_TYPES = // MediaType.APPLICATION_JSON_VALUE + "," + "application/javascript" + "," + "text/css"; // // @Bean // public RepositoryRestConfigurer reposi...
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import org.junit.Before; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import o...
/* * Copyright 2014-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/hillert/botanic/MainApp.java // @SpringBootApplication // public class MainApp { // // public static final String GZIP_COMPRESSION_MIME_TYPES = // MediaType.APPLICATION_JSON_VALUE + "," + "application/javascript" + "," + "text/css"; // // @Bean // public RepositoryRestConfigurer reposi...
SeedDataService seedDataService;
ghillert/botanic-ng
src/main/java/com/hillert/botanic/config/SecurityConfig.java
// Path: src/main/java/com/hillert/botanic/service/DefaultUserDetailsService.java // public class DefaultUserDetailsService implements UserDetailsService { // public static final String ROLE_ADMIN = "ADMIN"; // public static final String ROLE_USER = "USER"; // // @SuppressWarnings("serial") // static class SimpleU...
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.con...
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/service/DefaultUserDetailsService.java // public class DefaultUserDetailsService implements UserDetailsService { // public static final String ROLE_ADMIN = "ADMIN"; // public static final String ROLE_USER = "USER"; // // @SuppressWarnings("serial") // static class SimpleU...
http.authorizeRequests().antMatchers(HttpMethod.POST, "/api/info/**").hasRole(DefaultUserDetailsService.ROLE_USER);
ghillert/botanic-ng
src/main/java/com/hillert/botanic/dao/ImageRepositoryCustom.java
// Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private String name; // // @Lob // private byte[] image; // // @ManyToOne // private Plant plant; // // public Image(String name, Resource data, Plant plant) { // super(); // this.n...
import org.springframework.data.repository.NoRepositoryBean; import com.hillert.botanic.model.Image;
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/model/Image.java // @Entity // public class Image extends BaseModelObject { // // private String name; // // @Lob // private byte[] image; // // @ManyToOne // private Plant plant; // // public Image(String name, Resource data, Plant plant) { // super(); // this.n...
Image findRandomImage();
ghillert/botanic-ng
src/test/java/com/hillert/botanic/ErrorMesssageTests.java
// Path: src/main/java/com/hillert/botanic/controller/ErrorMessage.java // public class ErrorMessage { // // private final Date timestamp; // private final int status; // private final String exception; // private final String message; // // public ErrorMessage(Date timestamp, int status, String exception, // ...
import java.util.Date; import org.junit.Test; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.hillert.botanic.controller.ErrorMessage;
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
// Path: src/main/java/com/hillert/botanic/controller/ErrorMessage.java // public class ErrorMessage { // // private final Date timestamp; // private final int status; // private final String exception; // private final String message; // // public ErrorMessage(Date timestamp, int status, String exception, // ...
ErrorMessage errorMessage = new ErrorMessage(new Date(), 404, "NotFoundException", "We did not find it.");
tfg13/LanXchange
modules/swing/src/main/java/de/tobifleig/lxc/plaf/swing/OptionsDialog.java
// Path: modules/core/src/main/java/de/tobifleig/lxc/Configuration.java // public class Configuration { // // /** // * the backing Hashmap // */ // private static final HashMap<String, String> map = new HashMap<String, String>(); // // /** // * private constructor // */ // private ...
import de.tobifleig.lxc.Configuration; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.io.File; import javax.swing.*;
/* * Copyright 2009, 2010, 2011, 2012, 2013, 2014 Tobias Fleig (tobifleig gmail com) * * All rights reserved. * * This file is part of LanXchange. * * LanXchange is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Fo...
// Path: modules/core/src/main/java/de/tobifleig/lxc/Configuration.java // public class Configuration { // // /** // * the backing Hashmap // */ // private static final HashMap<String, String> map = new HashMap<String, String>(); // // /** // * private constructor // */ // private ...
if (!Configuration.containsKey("defaulttarget") || "unset".equals(Configuration.getStringSetting("defaulttarget"))) {
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
import de.tobifleig.lxc.plaf.cli.BackendCommand; import de.tobifleig.lxc.plaf.cli.BackendCommandType;
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
super(BackendCommandType.LIST);
tfg13/LanXchange
modules/swing/src/main/java/de/tobifleig/lxc/plaf/swing/OverallProgressManager.java
// Path: modules/core/src/main/java/de/tobifleig/lxc/data/LXCJob.java // public class LXCJob { // // /** // * If this job represents a running upload (true) or download (false). // */ // private boolean isSeeder = false; // /** // * The remote LXCInstance. // */ // private final LXC...
import de.tobifleig.lxc.data.LXCJob; import de.tobifleig.lxc.plaf.ProgressIndicator;
/* * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Tobias Fleig (tobifleig gmail com) * * All rights reserved. * * This file is part of LanXchange. * * LanXchange is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free...
// Path: modules/core/src/main/java/de/tobifleig/lxc/data/LXCJob.java // public class LXCJob { // // /** // * If this job represents a running upload (true) or download (false). // */ // private boolean isSeeder = false; // /** // * The remote LXCInstance. // */ // private final LXC...
public void handleNewJob(final LXCJob job) {
tfg13/LanXchange
modules/swing/src/main/java/de/tobifleig/lxc/plaf/swing/OverallProgressManager.java
// Path: modules/core/src/main/java/de/tobifleig/lxc/data/LXCJob.java // public class LXCJob { // // /** // * If this job represents a running upload (true) or download (false). // */ // private boolean isSeeder = false; // /** // * The remote LXCInstance. // */ // private final LXC...
import de.tobifleig.lxc.data.LXCJob; import de.tobifleig.lxc.plaf.ProgressIndicator;
/* * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Tobias Fleig (tobifleig gmail com) * * All rights reserved. * * This file is part of LanXchange. * * LanXchange is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free...
// Path: modules/core/src/main/java/de/tobifleig/lxc/data/LXCJob.java // public class LXCJob { // // /** // * If this job represents a running upload (true) or download (false). // */ // private boolean isSeeder = false; // /** // * The remote LXCInstance. // */ // private final LXC...
job.getTrans().setProgressIndicator(new ProgressIndicator() {
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StatusCommand.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
import de.tobifleig.lxc.plaf.cli.BackendCommand; import de.tobifleig.lxc.plaf.cli.BackendCommandType; import de.tobifleig.lxc.plaf.cli.ui.CLITools;
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
super(BackendCommandType.NOP);
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StatusCommand.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
import de.tobifleig.lxc.plaf.cli.BackendCommand; import de.tobifleig.lxc.plaf.cli.BackendCommandType; import de.tobifleig.lxc.plaf.cli.ui.CLITools;
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
CLITools.out.println("LanXchange is running in the background.");
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
import de.tobifleig.lxc.plaf.cli.BackendCommand; import de.tobifleig.lxc.plaf.cli.BackendCommandType;
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
super(BackendCommandType.START);
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StopCommand.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
import de.tobifleig.lxc.plaf.cli.BackendCommand; import de.tobifleig.lxc.plaf.cli.BackendCommandType; import de.tobifleig.lxc.plaf.cli.ui.CLITools;
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
super(BackendCommandType.STOP);
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StopCommand.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
import de.tobifleig.lxc.plaf.cli.BackendCommand; import de.tobifleig.lxc.plaf.cli.BackendCommandType; import de.tobifleig.lxc.plaf.cli.ui.CLITools;
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/BackendCommand.java // public abstract class BackendCommand implements Serializable { // // private final BackendCommandType type; // // private final List<String> data; // // public BackendCommand(BackendCommandType type) { // this.typ...
CLITools.out.println("Not running.");
tfg13/LanXchange
modules/android/src/main/java/de/tobifleig/lxc/plaf/android/activity/KeepServiceRunningActivity.java
// Path: modules/android/src/main/java/de/tobifleig/lxc/plaf/android/service/AndroidSingleton.java // public class AndroidSingleton { // // private static boolean running = false; // private static MainActivity activity; // private static AndroidGuiListener guiListener; // private static GuiInterfaceBr...
import de.tobifleig.lxc.plaf.android.service.AndroidSingleton; import android.app.Activity; import android.support.v7.app.AppCompatActivity;
/* * Copyright 2009, 2010, 2011, 2012, 2013, 2014 Tobias Fleig (tobifleig gmail com) * * All rights reserved. * * This file is part of LanXchange. * * LanXchange is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Fo...
// Path: modules/android/src/main/java/de/tobifleig/lxc/plaf/android/service/AndroidSingleton.java // public class AndroidSingleton { // // private static boolean running = false; // private static MainActivity activity; // private static AndroidGuiListener guiListener; // private static GuiInterfaceBr...
AndroidSingleton.onMainActivityHidden(1);
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/CLIFrontend.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
import de.tobifleig.lxc.plaf.cli.cmds.ListCommand; import de.tobifleig.lxc.plaf.cli.cmds.StartCommand; import de.tobifleig.lxc.plaf.cli.cmds.StatusCommand; import de.tobifleig.lxc.plaf.cli.cmds.StopCommand; import de.tobifleig.lxc.plaf.cli.ui.CLITools; import java.io.IOException; import java.io.ObjectOutputStream; impo...
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
CLITools.out.println("Please use the script \"lxcc\" to interact with the CLI version of LanXchange. " +
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/CLIFrontend.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
import de.tobifleig.lxc.plaf.cli.cmds.ListCommand; import de.tobifleig.lxc.plaf.cli.cmds.StartCommand; import de.tobifleig.lxc.plaf.cli.cmds.StatusCommand; import de.tobifleig.lxc.plaf.cli.cmds.StopCommand; import de.tobifleig.lxc.plaf.cli.ui.CLITools; import java.io.IOException; import java.io.ObjectOutputStream; impo...
int reconnectDelay = RECONNECT_DELAY_MS_INITIAL; do { try (Socket socket = new Socket(InetAddress.getLoopbackAddress(), CLIBackend.LANXCHANGE_DAEMON_PORT)) { ObjectOutputStream output = new ObjectOutputStream(socket.getOutputStream()); output.writeObject(comma...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
return new ListCommand();
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/CLIFrontend.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
import de.tobifleig.lxc.plaf.cli.cmds.ListCommand; import de.tobifleig.lxc.plaf.cli.cmds.StartCommand; import de.tobifleig.lxc.plaf.cli.cmds.StatusCommand; import de.tobifleig.lxc.plaf.cli.cmds.StopCommand; import de.tobifleig.lxc.plaf.cli.ui.CLITools; import java.io.IOException; import java.io.ObjectOutputStream; impo...
return true; } catch (ConnectException e) { // backend might be in startup, retry with exponential backoff CLITools.out.println("DEBUG: Submisson failed, retry in " + reconnectDelay); try { Thread.sleep(reconnectDelay); ...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
return new StartCommand(alreadyStarted);
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/CLIFrontend.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
import de.tobifleig.lxc.plaf.cli.cmds.ListCommand; import de.tobifleig.lxc.plaf.cli.cmds.StartCommand; import de.tobifleig.lxc.plaf.cli.cmds.StatusCommand; import de.tobifleig.lxc.plaf.cli.cmds.StopCommand; import de.tobifleig.lxc.plaf.cli.ui.CLITools; import java.io.IOException; import java.io.ObjectOutputStream; impo...
// ignore } reconnectDelay *= 2; } catch (IOException e) { // unexpected // TODO! return false; } } while (awaitBackendStartup && reconnectDelay <= RECONNECT_DELAY_MS_MAX); // TODO...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
return new StatusCommand();
tfg13/LanXchange
modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/CLIFrontend.java
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
import de.tobifleig.lxc.plaf.cli.cmds.ListCommand; import de.tobifleig.lxc.plaf.cli.cmds.StartCommand; import de.tobifleig.lxc.plaf.cli.cmds.StatusCommand; import de.tobifleig.lxc.plaf.cli.cmds.StopCommand; import de.tobifleig.lxc.plaf.cli.ui.CLITools; import java.io.IOException; import java.io.ObjectOutputStream; impo...
} while (awaitBackendStartup && reconnectDelay <= RECONNECT_DELAY_MS_MAX); // TODO unreachable even after waiting quite a while! CLITools.out.println("DEBUG: Submission failed, retry time limit exceeded - giving up."); return false; } private static BackendCommand parseList(Stri...
// Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/ListCommand.java // public class ListCommand extends BackendCommand { // // public ListCommand() { // super(BackendCommandType.LIST); // } // } // // Path: modules/cli/src/main/java/de/tobifleig/lxc/plaf/cli/cmds/StartCommand.java // pu...
return new StopCommand(false);
tfg13/LanXchange
modules/android/src/main/java/de/tobifleig/lxc/plaf/android/ui/DownloadPathPreference.java
// Path: modules/android/src/main/java/de/tobifleig/lxc/plaf/android/activity/SettingsActivity.java // public class SettingsActivity extends KeepServiceRunningActivity implements CancelablePermissionPromptActivity { // // private DownloadPathPreference permissionDownloadPathPref; // // @Override // protec...
import android.content.Context; import android.content.res.TypedArray; import android.os.Environment; import android.os.Parcel; import android.os.Parcelable; import android.preference.Preference; import android.support.annotation.NonNull; import android.util.AttributeSet; import de.tobifleig.lxc.plaf.android.activity.S...
/* * Copyright 2017 Tobias Fleig (tobifleig gmail com) * All rights reserved. * * Usage of this source code is governed by the GNU GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. * For the full license text see the file COPYING or https://github.com/tfg13/LanXchange/blob/master/COPYING */ ...
// Path: modules/android/src/main/java/de/tobifleig/lxc/plaf/android/activity/SettingsActivity.java // public class SettingsActivity extends KeepServiceRunningActivity implements CancelablePermissionPromptActivity { // // private DownloadPathPreference permissionDownloadPathPref; // // @Override // protec...
SettingsActivity myActivity = (SettingsActivity) getContext();
tfg13/LanXchange
modules/core/src/main/java/de/tobifleig/lxc/log/LXCLogBackend.java
// Path: modules/core/src/main/java/de/tobifleig/lxc/util/ByteLimitOutputStream.java // public class ByteLimitOutputStream extends FilterOutputStream { // // private int bytesLeft; // private Runnable limitReachedAction; // // public ByteLimitOutputStream(OutputStream out, int byteLimit, Runnable limitRea...
import de.tobifleig.lxc.util.ByteLimitOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream;
File rotateVictim = new File(targetDir,"lxc_oldlog" + (i + 1) + ".log"); if (rotateDown.exists()) { if (rotateVictim.exists()) { rotateVictim.delete(); } rotateDown.renameTo(rotateVictim); ...
// Path: modules/core/src/main/java/de/tobifleig/lxc/util/ByteLimitOutputStream.java // public class ByteLimitOutputStream extends FilterOutputStream { // // private int bytesLeft; // private Runnable limitReachedAction; // // public ByteLimitOutputStream(OutputStream out, int byteLimit, Runnable limitRea...
return new PrintStream(new ByteLimitOutputStream(fileOut, byteLimit, new Runnable() {
rsmudge/armitage
src/msf/RpcConnectionImpl.java
// Path: src/armitage/ArmitageBuffer.java // public class ArmitageBuffer { // private static final class Message { // public String message = null; // public Message next = null; // } // // /* store our messages... */ // public Message first = null; // public Message last = null; // public long siz...
import java.io.*; import java.net.*; import java.text.*; import java.util.*; import javax.xml.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*; import armitage.ArmitageBuffer;
catch (Exception ex) { throw new RuntimeException(ex); } } public void execute_async(String methodName) { execute_async(methodName, new Object[]{}, null); } public void execute_async(String methodName, Object[] args) { execute_async(methodName, args, null); } public void execute_async(String methodN...
// Path: src/armitage/ArmitageBuffer.java // public class ArmitageBuffer { // private static final class Message { // public String message = null; // public Message next = null; // } // // /* store our messages... */ // public Message first = null; // public Message last = null; // public long siz...
public ArmitageBuffer getABuffer(String key) {
rsmudge/armitage
src/armitage/ArmitageApplication.java
// Path: src/cortana/gui/MenuBuilder.java // public class MenuBuilder { // protected ArmitageApplication armitage; // protected MenuBridge bridge; // // public MenuBuilder(ArmitageApplication a) { // armitage = a; // bridge = new MenuBridge(a); // } // // public Loadable getBridge() { // return bridge; /...
import javax.swing.*; import javax.swing.event.*; import java.awt.image.*; import java.awt.*; import java.awt.event.*; import java.util.*; import cortana.gui.MenuBuilder; import java.io.*; import ui.*;
package armitage; public class ArmitageApplication extends JComponent { protected JTabbedPane tabs = null; protected JSplitPane split = null; protected JMenuBar menus = new JMenuBar(); protected ScreenshotManager screens = null; protected KeyBindings keys = new KeyBindings();
// Path: src/cortana/gui/MenuBuilder.java // public class MenuBuilder { // protected ArmitageApplication armitage; // protected MenuBridge bridge; // // public MenuBuilder(ArmitageApplication a) { // armitage = a; // bridge = new MenuBridge(a); // } // // public Loadable getBridge() { // return bridge; /...
protected MenuBuilder builder = null;
rsmudge/armitage
src/cortana/metasploit/MeterpreterBridge.java
// Path: src/cortana/Safety.java // public class Safety { // /* should we ask the user what they want in life? */ // public static boolean shouldAsk(ScriptInstance script) { // return (script.getDebugFlags() & Cortana.DEBUG_INTERACT_ASK) == Cortana.DEBUG_INTERACT_ASK; // } // // /* should we log what the script ...
import cortana.core.*; import cortana.Safety; import msf.*; import sleep.bridges.*; import sleep.interfaces.*; import sleep.runtime.*; import sleep.engine.*; import java.util.*; import java.io.IOException;
} public MeterpreterBridge(RpcConnection client, RpcConnection dserver, EventManager events, FilterManager filters) { this.client = client; this.dserver = dserver; this.events = events; this.filters = filters; sessions = new HashMap(); } public Scalar evaluate(String name, ScriptInstance script, Stac...
// Path: src/cortana/Safety.java // public class Safety { // /* should we ask the user what they want in life? */ // public static boolean shouldAsk(ScriptInstance script) { // return (script.getDebugFlags() & Cortana.DEBUG_INTERACT_ASK) == Cortana.DEBUG_INTERACT_ASK; // } // // /* should we log what the script ...
if (Safety.shouldAsk(script)) {
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/postconstruct/PostConstructTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.ProvisionException; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import ru.vyarus.guice.ext.log.LogTest; import javax.annotation.PostConstruct; import ...
package ru.vyarus.guice.ext.postconstruct; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class PostConstructTest { Injector injector; @Before public void setUp() throws Exception {
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
injector = Guice.createInjector(new ExtAnnotationsModule());
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/generator/support/ctor/GenerifiedConstructorBean.java
// Path: src/main/java/com/google/inject/internal/DynamicSingletonProvider.java // @Singleton // public class DynamicSingletonProvider extends DynamicClassProvider { // // @Inject // public DynamicSingletonProvider(final Injector injector) { // super(injector); // } // // @Override // prot...
import com.google.inject.ProvidedBy; import com.google.inject.internal.DynamicSingletonProvider; import ru.vyarus.guice.ext.generator.support.ProvidedInterfaceBean; import javax.inject.Inject; import javax.inject.Provider;
package ru.vyarus.guice.ext.generator.support.ctor; /** * @author Vyacheslav Rusakov * @since 05.01.2015 */ @ProvidedBy(DynamicSingletonProvider.class) public abstract class GenerifiedConstructorBean {
// Path: src/main/java/com/google/inject/internal/DynamicSingletonProvider.java // @Singleton // public class DynamicSingletonProvider extends DynamicClassProvider { // // @Inject // public DynamicSingletonProvider(final Injector injector) { // super(injector); // } // // @Override // prot...
Provider<ProvidedInterfaceBean> beanProvider;
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/predestroy/PreDestroyTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.ProvisionException; import org.junit.Before; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import javax.annotation.PreDestroy; import s...
package ru.vyarus.guice.ext.predestroy; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class PreDestroyTest { Injector injector;
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
DestroyableManager manager;
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/predestroy/PreDestroyTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.ProvisionException; import org.junit.Before; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import javax.annotation.PreDestroy; import s...
package ru.vyarus.guice.ext.predestroy; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class PreDestroyTest { Injector injector; DestroyableManager manager; @Before public void setUp() throws Exception {
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
injector = Guice.createInjector(new ExtAnnotationsModule());
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/log/InstanceBindingTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.AbstractModule; import com.google.inject.Guice; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import static org.junit.Assert.assertNotNull;
package ru.vyarus.guice.ext.log; /** * @author Vyacheslav Rusakov * @since 20.12.2014 */ public class InstanceBindingTest { @Test public void testInstanceBinding() throws Exception {
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
LogTest.OkBean bean = Guice.createInjector(new ExtAnnotationsModule(), new AbstractModule() {
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/postprocess/TypePostProcessorTest.java
// Path: src/main/java/ru/vyarus/guice/ext/core/type/GeneralTypeListener.java // public class GeneralTypeListener<T> implements TypeListener { // // private final Class<T> typeClass; // private final TypePostProcessor<T> postProcessor; // // public GeneralTypeListener(final Class<T> typeClass, final TypeP...
import com.google.inject.*; import com.google.inject.matcher.Matchers; import org.junit.Assert; import org.junit.Test; import ru.vyarus.guice.ext.core.type.GeneralTypeListener; import ru.vyarus.guice.ext.postprocess.support.*;
package ru.vyarus.guice.ext.postprocess; /** * @author Vyacheslav Rusakov * @since 06.01.2015 */ public class TypePostProcessorTest { @Test public void testPostProcessingByType() throws Exception { final PostProcessor postProcessor = new PostProcessor(); Injector injector = Guice.createInj...
// Path: src/main/java/ru/vyarus/guice/ext/core/type/GeneralTypeListener.java // public class GeneralTypeListener<T> implements TypeListener { // // private final Class<T> typeClass; // private final TypePostProcessor<T> postProcessor; // // public GeneralTypeListener(final Class<T> typeClass, final TypeP...
new GeneralTypeListener<AbstractBean>(AbstractBean.class, postProcessor));
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/predestroy/DestroyableTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import org.junit.Before; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import ru.vyarus.guice.ext.managed.destroyable.Destroyable; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import static org.junit.Asser...
package ru.vyarus.guice.ext.predestroy; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class DestroyableTest { Injector injector;
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
DestroyableManager manager;
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/predestroy/DestroyableTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import org.junit.Before; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import ru.vyarus.guice.ext.managed.destroyable.Destroyable; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import static org.junit.Asser...
package ru.vyarus.guice.ext.predestroy; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class DestroyableTest { Injector injector; DestroyableManager manager; @Before public void setUp() throws Exception {
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
injector = Guice.createInjector(new ExtAnnotationsModule());
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/predestroy/DestroyableTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import org.junit.Before; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import ru.vyarus.guice.ext.managed.destroyable.Destroyable; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import static org.junit.Asser...
package ru.vyarus.guice.ext.predestroy; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class DestroyableTest { Injector injector; DestroyableManager manager; @Before public void setUp() throws Exception { injector = Guice.createInjector(new ExtAnnotationsModule()); ...
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
public static class Bean implements Destroyable {
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/generator/support/ctor/CustomConstructorBean.java
// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java // @Singleton // public class DynamicClassProvider implements Provider<Object> { // // private final Injector injector; // // @Inject // public DynamicClassProvider(final Injector injector) { // this.injector = injector; /...
import com.google.inject.Inject; import com.google.inject.ProvidedBy; import com.google.inject.internal.DynamicClassProvider; import ru.vyarus.guice.ext.generator.support.ProvidedInterfaceBean;
package ru.vyarus.guice.ext.generator.support.ctor; /** * @author Vyacheslav Rusakov * @since 10.12.2014 */ @ProvidedBy(DynamicClassProvider.class) public abstract class CustomConstructorBean {
// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java // @Singleton // public class DynamicClassProvider implements Provider<Object> { // // private final Injector injector; // // @Inject // public DynamicClassProvider(final Injector injector) { // this.injector = injector; /...
ProvidedInterfaceBean bean;
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/core/generator/DynamicClassGenerator.java
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
import com.google.common.base.Preconditions; import com.google.inject.ImplementedBy; import com.google.inject.Inject; import com.google.inject.ProvidedBy; import com.google.inject.internal.Annotations; import javassist.*; import javassist.bytecode.*; import javassist.bytecode.annotation.Annotation; import ru.vyarus.gui...
/* * Synchronization is required to avoid double generation and consequent problems. * Very unlikely that this method would be called too often and synchronization become bottleneck. * Using original class as monitor to allow concurrent generation for different classes. */ ...
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
return Utils.isJava8() ? impl.toClass(classLoader, type.getProtectionDomain()) : impl.toClass(type);
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/generator/GeneratorAnchorsTest.java
// Path: src/main/java/ru/vyarus/guice/ext/core/generator/anchor/GeneratorAnchorModule.java // public class GeneratorAnchorModule extends AbstractModule { // // @Override // protected void configure() { // // providers bound explicitly to tie them to child injector // bind(DynamicClassProvider....
import com.google.inject.*; import com.google.inject.matcher.Matchers; import com.google.inject.name.Names; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.junit.Assert; import org.junit.Test; import ru.vyarus.guice.ext.core.generator.anchor.GeneratorAnc...
package ru.vyarus.guice.ext.generator; /** * @author Vyacheslav Rusakov * @since 21.09.2016 */ public class GeneratorAnchorsTest { @Test(expected = AbstractMethodError.class) public void checkChildInjectorFailure() throws Exception { // aop registered in child injector Injector injector =...
// Path: src/main/java/ru/vyarus/guice/ext/core/generator/anchor/GeneratorAnchorModule.java // public class GeneratorAnchorModule extends AbstractModule { // // @Override // protected void configure() { // // providers bound explicitly to tie them to child injector // bind(DynamicClassProvider....
Injector injector = Guice.createInjector().createChildInjector(new ChildAopModule(), new GeneratorAnchorModule());
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/core/method/AnnotatedMethodTypeListener.java
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
import com.google.inject.TypeLiteral; import com.google.inject.spi.InjectionListener; import com.google.inject.spi.TypeEncounter; import com.google.inject.spi.TypeListener; import ru.vyarus.guice.ext.core.util.Utils; import java.lang.annotation.Annotation; import java.lang.reflect.Method;
package ru.vyarus.guice.ext.core.method; /** * Generic type listener to process annotated methods after bean instantiation. * * @author Vyacheslav Rusakov * @since 30.06.2014 * @param <T> annotation type */ public class AnnotatedMethodTypeListener<T extends Annotation> implements TypeListener { private fi...
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
if (!Utils.isPackageValid(actualType)) {
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/core/type/GeneralTypeListener.java
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
import com.google.inject.TypeLiteral; import com.google.inject.spi.InjectionListener; import com.google.inject.spi.TypeEncounter; import com.google.inject.spi.TypeListener; import ru.vyarus.guice.ext.core.util.Utils;
package ru.vyarus.guice.ext.core.type; /** * Generic type listener for bean types (exact class, by base class or beans annotating interface). * * @param <T> bean type * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class GeneralTypeListener<T> implements TypeListener { private final Class<T> typ...
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
if (!Utils.isPackageValid(actualType)) {
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/core/field/AnnotatedFieldTypeListener.java
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
import com.google.inject.TypeLiteral; import com.google.inject.spi.InjectionListener; import com.google.inject.spi.TypeEncounter; import com.google.inject.spi.TypeListener; import ru.vyarus.guice.ext.core.util.Utils; import java.lang.annotation.Annotation; import java.lang.reflect.Field;
package ru.vyarus.guice.ext.core.field; /** * Generic type listener to process annotated fields after bean instantiation. * * @author Vyacheslav Rusakov * @since 30.06.2014 * @param <T> annotation type */ public class AnnotatedFieldTypeListener<T extends Annotation> implements TypeListener { private final...
// Path: src/main/java/ru/vyarus/guice/ext/core/util/Utils.java // public final class Utils { // // private Utils() { // } // // /** // * Important check, because JDK proxies of public interfaces have no package // * (thanks to @binkley https://github.com/99soft/lifegycle/pull/5). // * // ...
if (!Utils.isPackageValid(actualType)) {
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/core/generator/anchor/GeneratorAnchorModule.java
// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java // @Singleton // public class DynamicClassProvider implements Provider<Object> { // // private final Injector injector; // // @Inject // public DynamicClassProvider(final Injector injector) { // this.injector = injector; /...
import com.google.inject.AbstractModule; import com.google.inject.internal.DynamicClassProvider; import com.google.inject.internal.DynamicSingletonProvider; import javax.inject.Singleton;
package ru.vyarus.guice.ext.core.generator.anchor; /** * Support module used to tie dynamic binding for generated class (generated with {@link DynamicClassProvider}) to * exact injector in injectors hierarchy. Also, allows using JIT resolution for generated classes in private modules * (without binding them expli...
// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java // @Singleton // public class DynamicClassProvider implements Provider<Object> { // // private final Injector injector; // // @Inject // public DynamicClassProvider(final Injector injector) { // this.injector = injector; /...
bind(DynamicClassProvider.class);
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/core/generator/anchor/GeneratorAnchorModule.java
// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java // @Singleton // public class DynamicClassProvider implements Provider<Object> { // // private final Injector injector; // // @Inject // public DynamicClassProvider(final Injector injector) { // this.injector = injector; /...
import com.google.inject.AbstractModule; import com.google.inject.internal.DynamicClassProvider; import com.google.inject.internal.DynamicSingletonProvider; import javax.inject.Singleton;
package ru.vyarus.guice.ext.core.generator.anchor; /** * Support module used to tie dynamic binding for generated class (generated with {@link DynamicClassProvider}) to * exact injector in injectors hierarchy. Also, allows using JIT resolution for generated classes in private modules * (without binding them expli...
// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java // @Singleton // public class DynamicClassProvider implements Provider<Object> { // // private final Injector injector; // // @Inject // public DynamicClassProvider(final Injector injector) { // this.injector = injector; /...
bind(DynamicSingletonProvider.class);
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/postconstruct/InheritanceTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import org.junit.Assert; import org.junit.Test; import ru.vyarus.guice.ext.ExtAnnotationsModule; import javax.annotation.PostConstruct;
package ru.vyarus.guice.ext.postconstruct; /** * @author Vyacheslav Rusakov * @since 20.12.2014 */ public class InheritanceTest { @Test public void testInheritance() throws Exception {
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
Bean bean = Guice.createInjector(new ExtAnnotationsModule()).getInstance(Bean.class);
xvik/guice-ext-annotations
src/test/java/ru/vyarus/guice/ext/log/LogTest.java
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.ProvisionException; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import ru.vyarus.guice.ext.ExtAnnotationsModule; import static org.junit.Assert.assertNotNull;
package ru.vyarus.guice.ext.log; /** * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class LogTest { Injector injector; @Before public void setUp() throws Exception {
// Path: src/main/java/ru/vyarus/guice/ext/ExtAnnotationsModule.java // @SuppressWarnings("checkstyle:ClassDataAbstractionCoupling") // public class ExtAnnotationsModule extends AbstractModule { // // private Matcher<Object> typeMatcher; // // /** // * Default module constructor to check annotations on a...
injector = Guice.createInjector(new ExtAnnotationsModule());
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/managed/PreDestroyAnnotationProcessor.java
// Path: src/main/java/ru/vyarus/guice/ext/core/method/MethodPostProcessor.java // public interface MethodPostProcessor<T extends Annotation> { // // /** // * Called to post process annotated bean method. // * It is safe to avoid explicit exception handling (except special cases required by processor log...
import ru.vyarus.guice.ext.core.method.MethodPostProcessor; import ru.vyarus.guice.ext.core.util.Utils; import ru.vyarus.guice.ext.managed.destroyable.AnnotatedMethodDestroyable; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import javax.annotation.PreDestroy; import java.lang.reflect.Method;
package ru.vyarus.guice.ext.managed; /** * Registers bean methods annotated with @PostConstruct in {@code DestroyableManager} to be called on shutdown. * * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class PreDestroyAnnotationProcessor implements MethodPostProcessor<PreDestroy> { private final...
// Path: src/main/java/ru/vyarus/guice/ext/core/method/MethodPostProcessor.java // public interface MethodPostProcessor<T extends Annotation> { // // /** // * Called to post process annotated bean method. // * It is safe to avoid explicit exception handling (except special cases required by processor log...
Utils.checkNoParams(method);
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/managed/PreDestroyAnnotationProcessor.java
// Path: src/main/java/ru/vyarus/guice/ext/core/method/MethodPostProcessor.java // public interface MethodPostProcessor<T extends Annotation> { // // /** // * Called to post process annotated bean method. // * It is safe to avoid explicit exception handling (except special cases required by processor log...
import ru.vyarus.guice.ext.core.method.MethodPostProcessor; import ru.vyarus.guice.ext.core.util.Utils; import ru.vyarus.guice.ext.managed.destroyable.AnnotatedMethodDestroyable; import ru.vyarus.guice.ext.managed.destroyable.DestroyableManager; import javax.annotation.PreDestroy; import java.lang.reflect.Method;
package ru.vyarus.guice.ext.managed; /** * Registers bean methods annotated with @PostConstruct in {@code DestroyableManager} to be called on shutdown. * * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class PreDestroyAnnotationProcessor implements MethodPostProcessor<PreDestroy> { private final...
// Path: src/main/java/ru/vyarus/guice/ext/core/method/MethodPostProcessor.java // public interface MethodPostProcessor<T extends Annotation> { // // /** // * Called to post process annotated bean method. // * It is safe to avoid explicit exception handling (except special cases required by processor log...
manager.register(new AnnotatedMethodDestroyable(method, instance));
xvik/guice-ext-annotations
src/main/java/ru/vyarus/guice/ext/managed/PostConstructAnnotationProcessor.java
// Path: src/main/java/ru/vyarus/guice/ext/core/method/MethodPostProcessor.java // public interface MethodPostProcessor<T extends Annotation> { // // /** // * Called to post process annotated bean method. // * It is safe to avoid explicit exception handling (except special cases required by processor log...
import ru.vyarus.guice.ext.core.method.MethodPostProcessor; import ru.vyarus.guice.ext.core.util.Utils; import javax.annotation.PostConstruct; import java.lang.reflect.Method;
package ru.vyarus.guice.ext.managed; /** * Process bean @PostConstruct annotated methods: executes annotated method just after bean initialization. * * @author Vyacheslav Rusakov * @since 30.06.2014 */ public class PostConstructAnnotationProcessor implements MethodPostProcessor<PostConstruct> { @Override ...
// Path: src/main/java/ru/vyarus/guice/ext/core/method/MethodPostProcessor.java // public interface MethodPostProcessor<T extends Annotation> { // // /** // * Called to post process annotated bean method. // * It is safe to avoid explicit exception handling (except special cases required by processor log...
Utils.checkNoParams(method);
remydb/Poke-A-Droid
Poke-A-Droid/src/main/java/com/os3/pokeadroid/MainActivity.java
// Path: opencv/sdk/java/src/org/opencv/android/OpenCVLoader.java // public class OpenCVLoader // { // /** // * OpenCV Library version 2.4.2. // */ // public static final String OPENCV_VERSION_2_4_2 = "2.4.2"; // // /** // * OpenCV Library version 2.4.3. // */ // public static final...
import android.app.Activity; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.hardware.Camera; import android.hardware.Camera.CameraInfo; import android.os.*; import android.util.Log; import android.view.View; import android.widget.*; impo...
@Override protected void onPause() { if (timerRuns == 1) { myTimer.cancel(); myTimer = new Timer(); } if (camera != null) { camera.release(); camera = null; } super.onPause(); } @Override protected void onStop()...
// Path: opencv/sdk/java/src/org/opencv/android/OpenCVLoader.java // public class OpenCVLoader // { // /** // * OpenCV Library version 2.4.2. // */ // public static final String OPENCV_VERSION_2_4_2 = "2.4.2"; // // /** // * OpenCV Library version 2.4.3. // */ // public static final...
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_3, this, mLoaderCallback);
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaConstants.java // public static final String DEFAULT_PREFIX = "/eureka";
import org.springframework.core.env.PropertyResolver; import org.springframework.util.StringUtils; import static org.springframework.cloud.netflix.eureka.EurekaConstants.DEFAULT_PREFIX; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import co...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaConstants.java // public static final String DEFAULT_PREFIX = "/eureka"; // Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java import org.sp...
public static final String DEFAULT_URL = "http://localhost:8761" + DEFAULT_PREFIX + "/";
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/loadbalancer/EurekaLoadBalancerClientConfiguration.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/support/ZoneUtils.java // public final class ZoneUtils { // // private ZoneUtils() { // throw new AssertionError("Must not instantiate utility class."); // } // // /** // * Approximates Eureka zones from a host n...
import com.netflix.appinfo.EurekaInstanceConfig; import com.netflix.discovery.EurekaClientConfig; import jakarta.annotation.PostConstruct; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.a...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/support/ZoneUtils.java // public final class ZoneUtils { // // private ZoneUtils() { // throw new AssertionError("Must not instantiate utility class."); // } // // /** // * Approximates Eureka zones from a host n...
LOG.debug("Setting the value of '" + LOADBALANCER_ZONE + "' to " + zone);
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/loadbalancer/EurekaLoadBalancerClientConfiguration.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/support/ZoneUtils.java // public final class ZoneUtils { // // private ZoneUtils() { // throw new AssertionError("Must not instantiate utility class."); // } // // /** // * Approximates Eureka zones from a host n...
import com.netflix.appinfo.EurekaInstanceConfig; import com.netflix.discovery.EurekaClientConfig; import jakarta.annotation.PostConstruct; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.a...
private final EurekaLoadBalancerProperties eurekaLoadBalancerProperties; public EurekaLoadBalancerClientConfiguration(@Autowired(required = false) EurekaClientConfig clientConfig, @Autowired(required = false) EurekaInstanceConfig eurekaInstanceConfig, LoadBalancerZoneConfig zoneConfig, EurekaLoadBalancerPrope...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/support/ZoneUtils.java // public final class ZoneUtils { // // private ZoneUtils() { // throw new AssertionError("Must not instantiate utility class."); // } // // /** // * Approximates Eureka zones from a host n...
return ZoneUtils.extractApproximateZone(this.eurekaConfig.getHostName(false));
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/EurekaHttpClientsOptionalArgsConfigurationNoWebfluxTest.java
// Path: spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/sample/EurekaSampleApplication.java // @Configuration(proxyBeanMethods = false) // @ComponentScan // @EnableAutoConfiguration // @RestController // public class EurekaSampleApplication implements ApplicationContextAware, ...
import org.apache.catalina.webresources.TomcatURLStreamHandlerFactory; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnv...
/* * Copyright 2017-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/sample/EurekaSampleApplication.java // @Configuration(proxyBeanMethods = false) // @ComponentScan // @EnableAutoConfiguration // @RestController // public class EurekaSampleApplication implements ApplicationContextAware, ...
@SpringBootTest(classes = EurekaSampleApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaConstants.java // public final class EurekaConstants { // // /** // * Default Eureka prefix. // */ // public static final String DEFAULT_PREFIX = "/eureka"; // // private EurekaConstants() { // throw new ...
import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.ws.rs.Path; import javax.ws.rs.core.Application; import javax.ws.rs.ext.Provider; import com.netflix.appinfo.ApplicationInfoManager; import com.netflix.discovery.EurekaClient; impor...
* @param resourceLoader a {@link ResourceLoader} instance to get classloader from * @return created {@link Application} object */ @Bean public javax.ws.rs.core.Application jerseyApplication(Environment environment, ResourceLoader resourceLoader) { ClassPathScanningCandidateComponentProvider provider = new Cl...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaConstants.java // public final class EurekaConstants { // // /** // * Default Eureka prefix. // */ // public static final String DEFAULT_PREFIX = "/eureka"; // // private EurekaConstants() { // throw new ...
EurekaConstants.DEFAULT_PREFIX + "/(fonts|images|css|js)/.*");
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/RefreshablePeerEurekaNodesWithCustomFiltersTests.java
// Path: spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.java // static class RefreshablePeerEurekaNodes extends PeerEurekaNodes // implements ApplicationListener<EnvironmentChangeEvent> { // // private ReplicationClientAdditionalFilters...
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Field; import java.util.Collections; import com.netflix.eureka.cluster.Peer...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.java // static class RefreshablePeerEurekaNodes extends PeerEurekaNodes // implements ApplicationListener<EnvironmentChangeEvent> { // // private ReplicationClientAdditionalFilters...
assertThat(peerEurekaNodes instanceof RefreshablePeerEurekaNodes)
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/config/EurekaConfigServerInstanceProvider.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaServiceInstance.java // public class EurekaServiceInstance implements ServiceInstance { // // private InstanceInfo instance; // // public EurekaServiceInstance(InstanceInfo instance) { // Assert.notNull(instan...
import java.util.ArrayList; import java.util.List; import com.netflix.appinfo.InstanceInfo; import com.netflix.discovery.EurekaClientConfig; import com.netflix.discovery.shared.Applications; import com.netflix.discovery.shared.transport.EurekaHttpClient; import com.netflix.discovery.shared.transport.EurekaHttpResponse;...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaServiceInstance.java // public class EurekaServiceInstance implements ServiceInstance { // // private InstanceInfo instance; // // public EurekaServiceInstance(InstanceInfo instance) { // Assert.notNull(instan...
instances.add(new EurekaServiceInstance(info));
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerReplicasTests.java
// Path: spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerTests.java // static void setInstance(ApplicationInfoManager infoManager) throws IllegalAccessException { // Field instance = ReflectionUtils.findField(ApplicationInfoManager.class, "instance"); //...
import java.util.HashMap; import java.util.Map; import com.netflix.appinfo.ApplicationInfoManager; import com.netflix.appinfo.InstanceInfo; import com.netflix.eureka.util.StatusInfo; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.ass...
/* * Copyright 2016-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerTests.java // static void setInstance(ApplicationInfoManager infoManager) throws IllegalAccessException { // Field instance = ReflectionUtils.findField(ApplicationInfoManager.class, "instance"); //...
setInstance(mock(ApplicationInfoManager.class));
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClientConfiguration.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaAutoServiceRegistration.java // public class EurekaAutoServiceRegistration // implements AutoServiceRegistration, SmartLifecycle, Ordered, SmartApplicationListener { // // private static final Lo...
import org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration; import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.netflix.appinfo.HealthCheckHandler; import co...
@Bean @ConditionalOnMissingBean public EurekaDiscoveryClient discoveryClient(EurekaClient client, EurekaClientConfig clientConfig) { return new EurekaDiscoveryClient(client, clientConfig); } @Configuration(proxyBeanMethods = false) @ConditionalOnProperty(value = "eureka.client.healthcheck.enabled", matchIfMiss...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaAutoServiceRegistration.java // public class EurekaAutoServiceRegistration // implements AutoServiceRegistration, SmartLifecycle, Ordered, SmartApplicationListener { // // private static final Lo...
private EurekaAutoServiceRegistration autoRegistration;
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerInitializerConfiguration.java
// Path: spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaRegistryAvailableEvent.java // @SuppressWarnings("serial") // public class EurekaRegistryAvailableEvent extends ApplicationEvent { // // /** // * @param eurekaServerConfig {@link EurekaServerConfig}...
import com.netflix.eureka.EurekaServerConfig; import jakarta.servlet.ServletContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.netflix.eureka.server.event.EurekaRegistryAvailableEve...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaRegistryAvailableEvent.java // @SuppressWarnings("serial") // public class EurekaRegistryAvailableEvent extends ApplicationEvent { // // /** // * @param eurekaServerConfig {@link EurekaServerConfig}...
publish(new EurekaRegistryAvailableEvent(getEurekaServerConfig()));
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerInitializerConfiguration.java
// Path: spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaRegistryAvailableEvent.java // @SuppressWarnings("serial") // public class EurekaRegistryAvailableEvent extends ApplicationEvent { // // /** // * @param eurekaServerConfig {@link EurekaServerConfig}...
import com.netflix.eureka.EurekaServerConfig; import jakarta.servlet.ServletContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.netflix.eureka.server.event.EurekaRegistryAvailableEve...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaRegistryAvailableEvent.java // @SuppressWarnings("serial") // public class EurekaRegistryAvailableEvent extends ApplicationEvent { // // /** // * @param eurekaServerConfig {@link EurekaServerConfig}...
publish(new EurekaServerStartedEvent(getEurekaServerConfig()));
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/EurekaHttpClientsOptionalArgsConfigurationTest.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestTemplateDiscoveryClientOptionalArgs.java // public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> { // // protected final EurekaClientHttpRequestFactorySupplier ...
import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.cloud.netflix.eurek...
/* * Copyright 2017-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestTemplateDiscoveryClientOptionalArgs.java // public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> { // // protected final EurekaClientHttpRequestFactorySupplier ...
@SpringBootTest(classes = EurekaSampleApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/EurekaHttpClientsOptionalArgsConfigurationTest.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestTemplateDiscoveryClientOptionalArgs.java // public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> { // // protected final EurekaClientHttpRequestFactorySupplier ...
import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.cloud.netflix.eurek...
/* * Copyright 2017-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestTemplateDiscoveryClientOptionalArgs.java // public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> { // // protected final EurekaClientHttpRequestFactorySupplier ...
assertThat(context).hasSingleBean(RestTemplateDiscoveryClientOptionalArgs.class);
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/EurekaHttpClientsOptionalArgsConfigurationTest.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestTemplateDiscoveryClientOptionalArgs.java // public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> { // // protected final EurekaClientHttpRequestFactorySupplier ...
import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.cloud.netflix.eurek...
/* * Copyright 2017-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/RestTemplateDiscoveryClientOptionalArgs.java // public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> { // // protected final EurekaClientHttpRequestFactorySupplier ...
assertThat(context).doesNotHaveBean(WebClientDiscoveryClientOptionalArgs.class);
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/reactive/EurekaReactiveDiscoveryClient.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaServiceInstance.java // public class EurekaServiceInstance implements ServiceInstance { // // private InstanceInfo instance; // // public EurekaServiceInstance(InstanceInfo instance) { // Assert.notNull(instan...
import com.netflix.discovery.EurekaClient; import com.netflix.discovery.EurekaClientConfig; import com.netflix.discovery.shared.Application; import com.netflix.discovery.shared.Applications; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.cloud.client.ServiceInstance; ...
/* * Copyright 2019-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaServiceInstance.java // public class EurekaServiceInstance implements ServiceInstance { // // private InstanceInfo instance; // // public EurekaServiceInstance(InstanceInfo instance) { // Assert.notNull(instan...
.map(EurekaServiceInstance::new);
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/sample/RefreshEurekaSampleApplication.java
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/CloudEurekaClient.java // public class CloudEurekaClient extends DiscoveryClient { // // private static final Log log = LogFactory.getLog(CloudEurekaClient.class); // // private final AtomicLong cacheRefreshedCount = ...
import com.netflix.discovery.EurekaClient; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.cloud.netflix.eureka.CloudEurekaClient; import org.springframework.context.annotation.Bean; import org.springframework.web...
/* * Copyright 2017-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
// Path: spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/CloudEurekaClient.java // public class CloudEurekaClient extends DiscoveryClient { // // private static final Log log = LogFactory.getLog(CloudEurekaClient.class); // // private final AtomicLong cacheRefreshedCount = ...
return mock(CloudEurekaClient.class);
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/impl/CloseableBlockingQueue.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ClosedWatchServiceException.java // public class ClosedWatchServiceException extends IllegalStateException { // // }
import java.util.logging.Logger; import name.pachler.nio.file.ClosedWatchServiceException; import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; import java.util.Queue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; import java.util.logging.Level;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ClosedWatchServiceException.java // public class ClosedWatchServiceException extends IllegalStateException { // // } // Path: jpathwatch-java/src/main/java/name/pachler/nio/file/impl/CloseableBlockingQueue.java import java.util.logging.Logger; import name....
throw new ClosedWatchServiceException();
sworisbreathing/jpathwatch
jpathwatch-java/src/test/java/name/pachler/nio/file/impl/BSDTest.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/impl/BSD.java // public static class kevent{ // static class IntStringMapping{ // int i; // String s; // IntStringMapping(int i, String s){ // this.i = i; // this.s = s; // } // } // // IntStringMapping [] flagsMapping = { // ne...
import name.pachler.nio.file.impl.BSD.kevent; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*;
int kqueueFD = BSD.kqueue(); assertFalse(kqueueFD == -1); // may not return error // clean up BSD.close(kqueueFD); } @Test public void testKqueueInThread() throws InterruptedException{ //int kqueueFD = BSD.kqueue(); System.out.println("kevent in thread"); Thread t = ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/impl/BSD.java // public static class kevent{ // static class IntStringMapping{ // int i; // String s; // IntStringMapping(int i, String s){ // this.i = i; // this.s = s; // } // } // // IntStringMapping [] flagsMapping = { // ne...
System.out.println("kevent");
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/Paths.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ext/Bootstrapper.java // public class Bootstrapper { // private static final int OSTYPE_UNKNOWN = 0; // private static final int OSTYPE_LINUX = 1; // private static final int OSTYPE_WINDOWS = 2; // private static final int OSTYPE_BSD = 3; // // private ...
import java.io.File; import java.net.URI; import name.pachler.nio.file.ext.Bootstrapper;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ext/Bootstrapper.java // public class Bootstrapper { // private static final int OSTYPE_UNKNOWN = 0; // private static final int OSTYPE_LINUX = 1; // private static final int OSTYPE_WINDOWS = 2; // private static final int OSTYPE_BSD = 3; // // private ...
return Bootstrapper.newPath(new File(path));
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/StandardWatchEventKind.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ext/ExtendedWatchEventKind.java // public class ExtendedWatchEventKind { // /** // * Indicates the old file name of a renamed file. The // * {@link WatchEvent}'s {@link WatchEvent#context} method will return // * a Path that indicates the previous name...
import name.pachler.nio.file.ext.ExtendedWatchEventKind; import name.pachler.nio.file.impl.VoidWatchEventKind; import name.pachler.nio.file.impl.PathWatchEventKind;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ext/ExtendedWatchEventKind.java // public class ExtendedWatchEventKind { // /** // * Indicates the old file name of a renamed file. The // * {@link WatchEvent}'s {@link WatchEvent#context} method will return // * a Path that indicates the previous name...
public static final WatchEvent.Kind<Void> OVERFLOW = new VoidWatchEventKind("OVERFLOW");
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/impl/PollingPathWatchKey.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
import java.io.File; import java.io.FileNotFoundException; import java.util.Arrays; import name.pachler.nio.file.Path; import name.pachler.nio.file.StandardWatchEventKind;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
PollingPathWatchKey(PathWatchService service, Path path, int flags) {
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/impl/PollingPathWatchKey.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
import java.io.File; import java.io.FileNotFoundException; import java.util.Arrays; import name.pachler.nio.file.Path; import name.pachler.nio.file.StandardWatchEventKind;
if(oldName == null){ ++oldIndex; continue; } } else comparison = 1; // if there's no old entry left, indicate // that the new one is 'larger', and will be picked up // below if(newIndex < newFileNames.length){ newName = newFileNames[newIndex]; if(newName == null){ ++new...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
PathWatchEvent e = new PathWatchEvent(StandardWatchEventKind.ENTRY_DELETE, p, 1);
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/FileSystems.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ext/Bootstrapper.java // public class Bootstrapper { // private static final int OSTYPE_UNKNOWN = 0; // private static final int OSTYPE_LINUX = 1; // private static final int OSTYPE_WINDOWS = 2; // private static final int OSTYPE_BSD = 3; // // private ...
import name.pachler.nio.file.ext.Bootstrapper;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/ext/Bootstrapper.java // public class Bootstrapper { // private static final int OSTYPE_UNKNOWN = 0; // private static final int OSTYPE_LINUX = 1; // private static final int OSTYPE_WINDOWS = 2; // private static final int OSTYPE_BSD = 3; // // private ...
return Bootstrapper.newWatchService();
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/impl/PathWatchEvent.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
import name.pachler.nio.file.Path; import name.pachler.nio.file.WatchEvent; import name.pachler.nio.file.WatchEvent.Kind;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
private Kind<Path> kind;
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/impl/PathWatchKey.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
import name.pachler.nio.file.Path; import java.util.List; import java.util.Vector; import name.pachler.nio.file.WatchEvent; import name.pachler.nio.file.WatchKey;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
private Vector<WatchEvent<?>> eventQueue = new Vector<WatchEvent<?>>();
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/impl/PathWatchKey.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
import name.pachler.nio.file.Path; import java.util.List; import java.util.Vector; import name.pachler.nio.file.WatchEvent; import name.pachler.nio.file.WatchKey;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java // public abstract class Path implements Watchable { // // protected Path(){ // } // // @Override // public abstract boolean equals(Object obj); // // @Override // public abstract int hashCode(); // // public abstract WatchKey register(Wa...
private final Path path;
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/WatchEvent.java // public static interface Kind<T> // { // /** // * @return the name of this modifier // */ // String name(); // /** // * @return the type of the WatchEvent's context value. // */ // Class<T> type(); // } // // Path: jpathwatch-java...
import java.io.IOException; import name.pachler.nio.file.WatchEvent.Kind; import name.pachler.nio.file.WatchEvent.Modifier;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/WatchEvent.java // public static interface Kind<T> // { // /** // * @return the name of this modifier // */ // String name(); // /** // * @return the type of the WatchEvent's context value. // */ // Class<T> type(); // } // // Path: jpathwatch-java...
public abstract WatchKey register(WatchService watcher, Kind<?>... events) throws IOException;
sworisbreathing/jpathwatch
jpathwatch-java/src/main/java/name/pachler/nio/file/Path.java
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/WatchEvent.java // public static interface Kind<T> // { // /** // * @return the name of this modifier // */ // String name(); // /** // * @return the type of the WatchEvent's context value. // */ // Class<T> type(); // } // // Path: jpathwatch-java...
import java.io.IOException; import name.pachler.nio.file.WatchEvent.Kind; import name.pachler.nio.file.WatchEvent.Modifier;
/* * Copyright 2008-2011 Uwe Pachler * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. This particular file ...
// Path: jpathwatch-java/src/main/java/name/pachler/nio/file/WatchEvent.java // public static interface Kind<T> // { // /** // * @return the name of this modifier // */ // String name(); // /** // * @return the type of the WatchEvent's context value. // */ // Class<T> type(); // } // // Path: jpathwatch-java...
public abstract WatchKey register(WatchService watcher, Kind<?>[] events, Modifier... modifiers) throws IOException;
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/cloudfunctions/CloudFunctionsFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; import com.oracle.svm.core.annotate.AutomaticFeature; import com.oracle.svm.core.configure.ResourcesRegistry; import ...
/* * Copyright 2020-2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
registerClassForReflection(
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/cloudfunctions/CloudFunctionsFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; import com.oracle.svm.core.annotate.AutomaticFeature; import com.oracle.svm.core.configure.ResourcesRegistry; import ...
resourcesRegistry.addResources( "\\QMETA-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder\\E"); resourcesRegistry.addResources("\\Qorg/eclipse/jetty/http/encoding.properties\\E"); resourcesRegistry.addResources("\\Qorg/eclipse/jetty/http/mime.properties\\E"); resourcesRegistry.a...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
registerClassHierarchyForReflection(access, argument.getTypeName());
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/core/GrpcNettyFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; import stati...
/* * Copyright 2020-2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
registerClassHierarchyForReflection(
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/core/GrpcNettyFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; import stati...
/* * Copyright 2020-2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
registerForReflectiveInstantiation(
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/core/GrpcNettyFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; import stati...
/* * Copyright 2020-2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
registerClassForReflection(
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/core/GrpcNettyFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassHierarchyForReflection; import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; import stati...
} } private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) { // For io.grpc:grpc-netty-shaded Class<?> nettyShadedClass = access.findClassByName(GRPC_NETTY_SHADED_CLASS); if (nettyShadedClass != null) { // Misc. classes used by grpc-netty-shaded registerForReflectiveInsta...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
registerForUnsafeFieldAccess(
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/core/OpenCensusFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerForReflectiveInstantiation(FeatureAccess access, String className) { // Class<?> clazz = access.findClassByName(className); // if (clazz != null) { // RuntimeReflection.register(...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerForReflectiveInstantiation; import com.oracle.svm.core.annotate.AutomaticFeature; import org.graalvm.nativeimage.hosted.Feature;
/* * Copyright 2020-2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerForReflectiveInstantiation(FeatureAccess access, String className) { // Class<?> clazz = access.findClassByName(className); // if (clazz != null) { // RuntimeReflection.register(...
registerForReflectiveInstantiation(
GoogleCloudPlatform/native-image-support-java
native-image-support/src/main/java/com/google/cloud/nativeimage/features/core/GoogleJsonClientFeature.java
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
import static com.google.cloud.nativeimage.features.NativeImageUtils.registerClassForReflection; import com.oracle.svm.core.annotate.AutomaticFeature; import com.oracle.svm.core.configure.ResourcesRegistry; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.hosted.Feature;
/* * Copyright 2020-2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: native-image-support/src/main/java/com/google/cloud/nativeimage/features/NativeImageUtils.java // public static void registerClassForReflection(FeatureAccess access, String name) { // Class<?> clazz = access.findClassByName(name); // if (clazz != null) { // RuntimeReflection.register(clazz); // Run...
(duringAccess, subtype) -> registerClassForReflection(access, subtype.getName()),
nfl/glitr
src/test/groovy/com/nfl/glitr/registry/type/TestInput.java
// Path: src/test/groovy/com/nfl/glitr/data/mutation/Bitrate.java // public class Bitrate implements Playable { // // private String id; // private Integer kbps; // private String url; // private Integer[] frames; // private Float gradeAverage; // private Double grade; // private Long durat...
import com.nfl.glitr.data.mutation.Bitrate;
package com.nfl.glitr.registry.type; public class TestInput { private String id; private String url;
// Path: src/test/groovy/com/nfl/glitr/data/mutation/Bitrate.java // public class Bitrate implements Playable { // // private String id; // private Integer kbps; // private String url; // private Integer[] frames; // private Float gradeAverage; // private Double grade; // private Long durat...
private Bitrate bitrate;
nfl/glitr
src/main/java/com/nfl/glitr/calculator/QueryComplexityCalculator.java
// Path: src/main/java/com/nfl/glitr/exception/GlitrException.java // public class GlitrException extends RuntimeException { // // public GlitrException(String message) { // super(message); // } // // public GlitrException(String message, Throwable cause) { // super(message, cause); // ...
import com.nfl.glitr.exception.GlitrException; import com.nfl.glitr.registry.schema.GlitrFieldDefinition; import com.nfl.glitr.registry.schema.GlitrMetaDefinition; import com.nfl.glitr.registry.schema.GraphQLConnectionList; import graphql.language.*; import graphql.parser.InvalidSyntaxException; import graphql.parser.P...
} public QueryComplexityCalculator(int maxCharacterLimit, int maxDepthLimit, int maxScoreLimit, int defaultMultiplier) { this.maxCharacterLimit = maxCharacterLimit; this.maxDepthLimit = maxDepthLimit; this.maxScoreLimit = maxScoreLimit; this.defaultMultiplier = defaultMultiplier...
// Path: src/main/java/com/nfl/glitr/exception/GlitrException.java // public class GlitrException extends RuntimeException { // // public GlitrException(String message) { // super(message); // } // // public GlitrException(String message, Throwable cause) { // super(message, cause); // ...
throw new GlitrException(String.format("query length has exceeded the maximum of %d characters.", maxCharacterLimit));