fbshipit-source-id: 5d9ecf33fca19e4a6b8c979b879ec9dd82af1ef9

This commit is contained in:
Daniel Buchele
2018-06-25 04:33:04 -07:00
parent ec0b3829e2
commit 6fda334a00
70 changed files with 896 additions and 1464 deletions

View File

@@ -1,81 +0,0 @@
load("//build_defs:fb_xplat_cxx_library.bzl", "fb_xplat_cxx_library")
load("@xplat//build_defs:fb_java_library.bzl", "fb_java_library")
ANNOTATIONS_SRCS = [
"java/com/facebook/jni/annotations/*.java",
]
fb_java_library(
name = "java_annotations",
srcs = glob(ANNOTATIONS_SRCS),
required_for_source_only_abi = True,
)
fb_java_library(
name = "java",
srcs = glob(
["java/**/*.java"],
exclude = ANNOTATIONS_SRCS,
),
required_for_source_only_abi = True,
visibility = ["PUBLIC"],
deps = [
"//libraries/soloader/java/com/facebook/soloader:soloader",
"//third-party/java/jsr-305:jsr-305",
],
exported_deps = [
":java_annotations",
],
)
fb_xplat_cxx_library(
name = "fbjni",
srcs = glob([
"cxx/fbjni/**/*.cpp",
]),
header_namespace = "",
exported_headers = subdir_glob([
("cxx", "fbjni/**/*.h"),
]),
allow_jni_merging = True,
compiler_flags = [
"-fexceptions",
"-fno-omit-frame-pointer",
"-frtti",
"-ffunction-sections",
],
enable_static_variant = True,
exported_platform_headers = [
(
"^(?!android-arm$).*$",
subdir_glob([
("cxx", "lyra/**/*.h"),
]),
),
],
fbandroid_deps = [
"xplat//third-party/linker_lib:atomic",
],
platform_srcs = [
(
"^(?!android-arm$).*$",
glob([
"cxx/lyra/*.cpp",
]),
),
],
preprocessor_flags = [
"-DLOG_TAG=\"libfbjni\"",
],
soname = "libfbjni.$(ext)",
visibility = [
"PUBLIC",
],
deps = [
"xplat//third-party/linker_lib:android",
],
exported_deps = [
"xplat//third-party/linker_lib:log",
"//native/jni-hack:jni-hack",
],
)

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fbjni/ByteBuffer.h>
#include <stdexcept>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <fbjni/fbjni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <fbjni/fbjni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <fbjni/fbjni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <fbjni/fbjni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <fbjni/fbjni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fbjni/fbjni.h>
#include <fbjni/NativeRunnable.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fbjni/ReadableByteChannel.h>
namespace facebook {

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <fbjni/fbjni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "CoreClasses.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @file Common.h
*
* Defining the stuff that don't deserve headers of their own...

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <string.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
/** @file CoreClasses.h

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fbjni/fbjni.h>
#include <functional>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <functional>
#include <string>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CoreClasses.h"
#include "Log.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Exceptions.h
*

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fbjni/fbjni.h>
namespace facebook {

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <memory>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
namespace facebook {

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "CoreClasses.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "CoreClasses.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @file ALog.h
*
* Very simple (android only) logging. Define LOG_TAG to enable the macros.

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
namespace facebook {

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <jni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @file meta.h
*
* Provides wrappers for meta data such as methods and fields.

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <jni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <cassert>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file ReferenceAllocators.h
*

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "ReferenceAllocators.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <new>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "References.h"
namespace facebook {

View File

@@ -1,20 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @file References.h
*
* Functionality similar to smart pointers, but for references into the VM. Four main reference

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "Exceptions.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <jni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <type_traits>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "utf8.h"
#include "Log.h"

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <string>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fbjni/fbjni.h>
#include <mutex>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <jni.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <atomic>
#include <stdexcept>
#include <cxxabi.h>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <lyra/lyra.h>
#include <atomic>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <iomanip>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <lyra/lyra.h>
namespace facebook {

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <lyra/lyra_exceptions.h>
#include <cstdlib>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <exception>

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import com.facebook.jni.annotations.DoNotStrip;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import com.facebook.jni.annotations.DoNotStrip;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import java.lang.ref.PhantomReference;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import com.facebook.jni.annotations.DoNotStrip;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import com.facebook.jni.annotations.DoNotStrip;

View File

@@ -1,17 +1,9 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;

View File

@@ -1,17 +1,9 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;

View File

@@ -1,17 +1,9 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import com.facebook.jni.annotations.DoNotStrip;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2018-present, Facebook, Inc.
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni;
import com.facebook.jni.annotations.DoNotStrip;

View File

@@ -1,19 +1,10 @@
/**
* Copyright 2004-present, Facebook, Inc.
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* 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
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.jni.annotations;
import static java.lang.annotation.RetentionPolicy.CLASS;
@@ -25,9 +16,8 @@ import java.lang.annotation.Target;
/**
* Add this annotation to a class, method, or field to instruct Proguard to not strip it out.
*
* This is useful for methods called via reflection that could appear as unused to Proguard.
* <p>This is useful for methods called via reflection that could appear as unused to Proguard.
*/
@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR })
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
@Retention(CLASS)
public @interface DoNotStrip {
}
public @interface DoNotStrip {}